Setting name for dynamic linker fails for gcc-4.2.4

Jitendra Nair jitendran@gslab.com
Tue Dec 23 15:04:00 GMT 2008


Hello list,

I am on Ubuntu Hardy,  I am compiling gcc 4.2.4 and gcc 4.1.2  and  
setting  the  "dynamic-linker" option to "ld"
via the CFLAGS environment variable  to set the name of the dynamic linker.

Here is my CFLGAS

export 
CFLAGS=-Wl,--dynamic-linker,/toolchain/x86_64-unknown-linux-gnu/lib/ld-linux-x86-64.so.2,--rpath,/toolchain/x86_64-unknown-linux-gnu/lib, 
--rpath,/toolchain/x86_64-unknown-linux-gnu/glibc-2.7/lib


1) The  dynamic linker path is  correctly set for gcc-4.1.2 , see the 
'ldd' ouput below

jnair@gslab-ux:~/downloads$ ldd /home/jnair/opt/gcc-4.1.2/bin/gcc
        linux-vdso.so.1 =>  (0x00007fffeb9ff000)
        libc.so.6 => /toolchain/x86_64-unknown-linux-gnu/lib/libc.so.6 
(0x00007f4ee3313000)
        /toolchain/x86_64-unknown-linux-gnu/lib/ld-linux-x86-64.so.2 
(0x00007f4ee365c000)

2)  But the  dynamic linker path is NOT correctly set for gcc-4.2.4. see 
below the 'ldd' output

jnair@gslab-ux:~/downloads$ ldd /home/jnair/opt/gcc-4.2.4/bin/gcc
        linux-vdso.so.1 =>  (0x00007fffee7fe000)
        libc.so.6 => /lib/libc.so.6 (0x00007fd6e6168000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd6e64ca000)



Any  reason why  the dynamic linker name is not being correctly set for 
gcc-4.2.4

Thanks a Lot
Regards
Jitendra Nair.
 





More information about the Gcc-help mailing list