Skip to contentSkip to conversation

static gcc from toolchain: howto?

Linux-ia64 Francis Galiegue 2 participants 2 messages Dec 6, 2000

lore
Share & tools
lore
#0 lore raw

Hi all,

I've been trying for two days now to compile a static gcc (and possibly other tools too) but failed. When I try and set LDFLAGS or LDFLAGS_FOR_TARGET to -static, I get lots of multiple to _nl_* stuff, hence only i18n stuff... And I cannot seem to get out of it, no matter how I try. There's no static-* target either.

What is the solution? Or is there a static toolchain binary tree to be d/led somewhere?

(BTW I've succeeded at the very last to get glibc 2.2 to compile - phew)

Signature · 4 lines
Francis Galiegue, [email protected]
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race"  -- R. Cook
#1 lore raw
Quoted 2 lines

When I try and set LDFLAGS or LDFLAGS_FOR_TARGET to
-static, I get lots of multiple to _nl_* stuff, hence only i18n stuff...

What I used to do was just replace the intl/libintl.a files with empty archives.

cd intl
rm libintl.a
ar rc libintl.a
cd ..

There are two of these directories, intl, and gcc/intl. I think this is the easiest solution.

The real solution is to build and install gettext before running configure. autoconf checks to see if the host has i18n support by trying to run xgettext. If the program isn't there, then it assumes that we need to build our own i18n library. If you link against a shared glibc, this isn't a problem. If you link against a static glibc, then you get the multiple definitions link error. I suppose if you don't have gcc yet, then building gettext might be a problem. So you will need to use a workaround once to bootstrap.

Bill Nottingham's suggestion of using --disable-nls should work too, but you have to remember to use it before running configure.

Jim