This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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 linking / HOSTING_LIBS


> On Sun, Nov 16, 2003 at 03:12:53PM -0500, Pragnesh Sampat wrote:
> > I have binutils-2.14.90.0.6 and Alan Modra's patch:
> > 
> > http://sources.redhat.com/ml/binutils/2003-11/msg00125.html
> 
> You didn't say where you found a problem, or the target you were
> building for.  Note that my patch only affects the testsuite, not the
> actual build of any of the tools.

I was trying to trying to compile glibc cross tools for host, with nptl
turned on.  Pretty much everything else in this pass of glibc, except
for sln and ldconfig appear to build ok.  I also had similar failures in
the nptl testsuite (some of the tests failed with the same undefined
references).

Build is a i686-linux system and host and target are i586-linux.

Below is the output when trying to compile sln:

i586-linux-gcc -O2  -nostdlib -nostartfiles -static -o
/opt/pss/pss-linux-main/linux/rootfs/packages/glibc/glibc-build/elf/sln   /opt/pss/pss-linux-main/linux/rootfs/packages/glibc/glibc-build/csu/crt1.o /opt/pss/pss-linux-main/linux/rootfs/packages/glibc/glibc-build/csu/crti.o `i586-linux-gcc -O2  --print-file-name=crtbegin.o` /opt/pss/pss-linux-main/linux/rootfs/packages/glibc/glibc-build/elf/sln.o  /opt/pss/pss-linux-main/linux/rootfs/packages/glibc/glibc-build/libc.a -lgcc /opt/pss/pss-linux-main/linux/rootfs/packages/glibc/glibc-build/libc.a `i586-linux-gcc -O2  --print-file-name=crtend.o` /opt/pss/pss-linux-main/linux/rootfs/packages/glibc/glibc-build/csu/crtn.o
/opt/pss/pss-linux-main/linux/rootfs/packages/glibc/glibc-build/libc.a(iofclose.o)(.text+0x12a): In function `_IO_new_fclose':
/opt/pss/pss-linux-main/linux/rootfs/packages/glibc/glibc-2.3.X/libio/libioP.h:990: undefined reference to `_Unwind_Resume'
/opt/pss/pss-linux-main/linux/rootfs/packages/glibc/glibc-build/libc.a(iofclose.o)(.eh_frame+0x12): In function `_IO_new_fclose':

For testing, I could get past the sln problem by replacing -static with
"--start-group -lgcc -lgcc_eh -lc --end-group".  ldconfig, however,
failed with similar messages to above, even with the --start-group etc. 
With ldconfig, In addition to the above, there were also a BFD_ASSERT
from elflink.c.  I don't have the log right now, but can easily get it
if we go down that path.

gcc 3.3.2 ChangeLog mentions a problem with static linking that was
apparently resolved by defining the LINK_GCC_C_SEQUENCE.  I am not sure
if this is related, but here's a reference I founf to the patch:

http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00799.html

-Pragnesh


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