This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[CT-NG] Preparing the next release - Issue with static linking


Hello All!

I've stumbled against some oddity with static linking, and the way we
currently handle it.

So far, some systems crostool-NG runs on do support static linking. This
is the case, for example, for Linux and Cygwin, and probably mingw32.
Other systems on which this is expected to work, but has not been tested
and/or reported to, are the BSD-like systems (exception made of MacOS-X,
see below).

On the other hand, crosstool-NG is also expected to work on systems that
do not support static linking, such as MacOS-X.

So, here are a few questions, with their answers, that will explain why
I believe we have a problem. Well, it'll explain why I'm _sure_ we have
a problem. ;-)

Q What does "building a statically-linked toolchain" means?
A It means that the executables of the toolchain, eg. gcc, ld et al. are
  statically linked.

Q Where do those binaries run?
A They run on the _host_ machine.

Q Where do we check if static linking is possible?
A We check in the ./configure script.

Q Where is ./configure run?
A It is run on the _build_ machine.

Oh, hey! Wait! Don't we have an issue here?... We want to check a feature
of the host machine, but we apply the check to the build machine... ARGH!!!

So, we can't rely on checks in ./configure to enable/disable the many
static options (global static, gdb static, static libstdc++...). We can
only post-pone the check until we know the host machine.

And this is in the infrastructure scripts. For example, in:
    scripts/crostool-NG.sh.in

But then, the problem is really, really much more complex than that. Every
library checks we do in ./configure are borked, because they only make
sense IFF build==host, which is cross, but break whenever build!=host,
which is canadian.

So in the light of the above, here is what I suggest we do:
 - remove headers+libs checks from ./configure
 - add them to infrastructure, in scripts/crosstool-NG.sh.in

I will be doing this in the WE. Then next week will be dedicated to the
preparation of the next release, then I'm off the last ten days of
October, with almost no time to dedicate to crosstool-NG. If the release
is ready by next WE (October the 22nd), I'll release it. Otherwise, I'll
attend to the most important things as much as I can, and prepare the
release for the end of October.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]