gcc-wrapper now:

dynamicLinker =
if !nativeLibc then
(if stdenv.system == “i686-linux” then “ld-linux.so.2” else
if stdenv.system == “x86_64-linux” then “ld-linux-x86-64.so.2” else
if stdenv.system == “powerpc-linux” then “ld.so.1” else
abort “dont know the name of the dynamic linker for this platform”)
else "";
}

Of course, when cross compiling, for another architecture, or when using uClibc for one of the already supported architectures this wont work, but it would be ld-uClibc.so.0. So, you would probably need some check somewhere for the C library youre linking with. Or so.

Submitted on 27 March 2007 at 01:48

Log in to post comments