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: Linking with -lc


On Wed, May 07, 2003 at 04:40:19PM -0400, Harris, Jeff wrote:
> The enclosed test works fine.  Looking at the glibc Versions file for the
> nofpu powerpc, it looks as if it is ppc specific.  I've included a small
> test case which demonstrates the problem.
> 
> > CC=/usr/local/ai/ppc8xx-lx2.4-1.00rc4/bin/powerpc-ai-linux-gcc make all
> /usr/local/ai/ppc8xx-lx2.4-1.00rc4/bin/powerpc-ai-linux-gcc -fPIC   -c -o
> fplib.o fplib.c
> /usr/local/ai/ppc8xx-lx2.4-1.00rc4/bin/powerpc-ai-linux-gcc -shared -o
> libcfp.so fplib.o
> /usr/local/ai/ppc8xx-lx2.4-1.00rc4/bin/powerpc-ai-linux-gcc -fPIC   -c -o
> fp1.o fp1.c
> /usr/local/ai/ppc8xx-lx2.4-1.00rc4/bin/powerpc-ai-linux-gcc -g fp1.o -o cfp
> -L. -lcfp
> 
> Compiles just fine.  However:
> 
> > CC=/usr/local/ai/ppc8xx-lx2.4-1.00rc4/bin/powerpc-ai-linux-gcc make all
> SOFLAGS=-lc
> /usr/local/ai/ppc8xx-lx2.4-1.00rc4/bin/powerpc-ai-linux-gcc -fPIC   -c -o
> fplib.o fplib.c
> /usr/local/ai/ppc8xx-lx2.4-1.00rc4/bin/powerpc-ai-linux-gcc -shared -o
> libcfp.so fplib.o -lc
> /usr/local/ai/ppc8xx-lx2.4-1.00rc4/bin/powerpc-ai-linux-gcc -fPIC   -c -o
> fp1.o fp1.c
> /usr/local/ai/ppc8xx-lx2.4-1.00rc4/bin/powerpc-ai-linux-gcc -g fp1.o -o cfp
> -L. -lcfp
> ./libcfp.so: undefined reference to `__muldf3@GLIBC_2.3.2'
> collect2: ld returned 1 exit status
> make: *** [cfp] Error 1
> 
> Fails.  The test also succeeds using a compiler for Linux/x86.
> 

You are testing different libc/libgcc on ppc and x86. Please try to
come up with a testcase which doesn't involve libc nor libgcc.


H.J.


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