# HG changeset patch # User "Yann E. MORIN" # Date 1298312419 -3600 # Node ID 6336f985e2c00af16669d138eb1b1b47c35b145b # Parent 8b9938edd3d8124ed171c76b98108e687425859f libc/glibc: only install start files for NPTL Building the start files requires a shared-capable compiler, which we do not have when the threading implementation is LinuxThreads. So, only build the start files when the threading implementations is NPTL. Signed-off-by: "Yann E. MORIN" diff -r 8b9938edd3d8 -r 6336f985e2c0 scripts/build/libc/glibc-eglibc.sh-common --- a/scripts/build/libc/glibc-eglibc.sh-common Mon Feb 21 23:39:46 2011 +0100 +++ b/scripts/build/libc/glibc-eglibc.sh-common Mon Feb 21 19:20:19 2011 +0100 @@ -86,24 +86,26 @@ [ "${CT_ARCH}" != "arm" ] && CT_DoExecLog ALL cp -v misc/syscall-list.h "${CT_HEADERS_DIR}/bits/syscall.h" || true fi - CT_DoLog EXTRA "Installing C library start files" + if [ "${CT_THREADS}" = "nptl" ]; then + CT_DoLog EXTRA "Installing C library start files" - # there are a few object files needed to link shared libraries, - # which we build and install by hand - CT_DoExecLog ALL mkdir -p "${CT_SYSROOT_DIR}/usr/lib" - CT_DoExecLog ALL make ${JOBSFLAGS} csu/subdir_lib - CT_DoExecLog ALL cp csu/crt1.o csu/crti.o csu/crtn.o \ - "${CT_SYSROOT_DIR}/usr/lib" + # there are a few object files needed to link shared libraries, + # which we build and install by hand + CT_DoExecLog ALL mkdir -p "${CT_SYSROOT_DIR}/usr/lib" + CT_DoExecLog ALL make ${JOBSFLAGS} csu/subdir_lib + CT_DoExecLog ALL cp csu/crt1.o csu/crti.o csu/crtn.o \ + "${CT_SYSROOT_DIR}/usr/lib" - # Finally, 'libgcc_s.so' requires a 'libc.so' to link against. - # However, since we will never actually execute its code, - # it doesn't matter what it contains. So, treating '/dev/null' - # as a C source file, we produce a dummy 'libc.so' in one step - CT_DoExecLog ALL "${cross_cc}" -nostdlib \ - -nostartfiles \ - -shared \ - -x c /dev/null \ - -o "${CT_SYSROOT_DIR}/usr/lib/libc.so" + # Finally, 'libgcc_s.so' requires a 'libc.so' to link against. + # However, since we will never actually execute its code, + # it doesn't matter what it contains. So, treating '/dev/null' + # as a C source file, we produce a dummy 'libc.so' in one step + CT_DoExecLog ALL "${cross_cc}" -nostdlib \ + -nostartfiles \ + -shared \ + -x c /dev/null \ + -o "${CT_SYSROOT_DIR}/usr/lib/libc.so" + fi # threads == nptl CT_EndStep }