[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

static linking?



So, I have an old libc5 system that I'm wasting time on for various
reasons, and I want to build a statically-linked version of ld on a
different system (due to very different versions of libc, among others)
to use there.  So, I pulled down the latest binutils from gnu.org, and
did this:

  export CFLAGS=-static
  export LDFLAGS=-static
  ./configure --prefix=/tmp/gnu --enable-static --disable-shared
  make
  make check
  make install

But this still happens:
  sauer@midnight:/tmp/binutils-2.17$ file /tmp/gnu/bin/ld
  /tmp/gnu/bin/ld: ELF 32-bit LSB executable, Intel 80386, version 1
  (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), not
  stripped

WTF?  I'm clearly missing something - I thought that specifying -static
to gcc should do it alone, but it's not (the flag is getting passed to
gcc and ld, as expected).  Maybe I'm being too emphatic, and the gnu
toolchain thinks I'm lying?  If I specify fewer "don't build shared
things, darn it" flags, maybe it'll work better? :)  Thoughts?

Thanks.
--Danny

-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.