This is the mail archive of the crossgcc@sources.redhat.com 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]

Re: Static linked cross tools


On Wed, 20 Oct 2004, Dan Kegel wrote:

http://sources.redhat.com/ml/crossgcc/2004-04/msg00003.html

FWIW, we have (almost) completely abandonded static linking, as it does not serve the purpose to get reliable binaries for ANY workstation. It is much safer to let references resolve dynamically until the point where it just doesn't work.

Marius, you're right in general, but for toolchains, the problems you note with static executables do not seem to be an issue. (gcc doesn't do any networking, for instance, so it doesn't matter that the DNS calls won't work). Or have you run into problems with statically linked copies of *gcc* (as opposed to, say, Mozilla :-)?

So did I think ... until the tools crashed because the NLS (nat'l language support) mapped errno messages didn't resolve any more. What happens is that the statically(!) linked glibc gettext stuff accesses locally(!) installed text catalogs. Since gettext() does not do any version control on those files, the sh*t hits the fan.


Depending on your configuration, prefixes used during the compiling, etc you MAY GET AWAY, but chances are you won't. Just strace the tools and see their heuristics to locate external stuff...

You may not run into this problem if you have LANG=en, but typical european workstations are configured to run with the coresponding language. Which makes it a particularly nasty kind of "works just fine over here" bug. And no, you can't turn off NLS for all packages that easily. Some don't compile any more.

Personally, I find all of this way too uncontrollable, so I switched back to dynamic linking.

You have been warned... :-)

Regards,
Marius

--
Marius Groeger <mgroeger@sysgo.com>
SYSGO AG                      Embedded and Real-Time Software
Voice: +49 6136 9948 0                  FAX: +49 6136 9948 10
www.sysgo.com | www.elinos.com | www.osek.de | www.imerva.com


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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