libc/glibc: only install start files for NPTL
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Feb 21 19:20:19 2011 +0100 (2011-02-21)
changeset 23136336f985e2c0
parent 2312 8b9938edd3d8
child 2314 9e1a17fdf363
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" <yann.morin.1998@anciens.enib.fr>
scripts/build/libc/glibc-eglibc.sh-common
     1.1 --- a/scripts/build/libc/glibc-eglibc.sh-common	Mon Feb 21 23:39:46 2011 +0100
     1.2 +++ b/scripts/build/libc/glibc-eglibc.sh-common	Mon Feb 21 19:20:19 2011 +0100
     1.3 @@ -86,24 +86,26 @@
     1.4          [ "${CT_ARCH}" != "arm" ] && CT_DoExecLog ALL cp -v misc/syscall-list.h "${CT_HEADERS_DIR}/bits/syscall.h" || true
     1.5      fi
     1.6  
     1.7 -    CT_DoLog EXTRA "Installing C library start files"
     1.8 +    if [ "${CT_THREADS}" = "nptl" ]; then
     1.9 +        CT_DoLog EXTRA "Installing C library start files"
    1.10  
    1.11 -    # there are a few object files needed to link shared libraries,
    1.12 -    # which we build and install by hand
    1.13 -    CT_DoExecLog ALL mkdir -p "${CT_SYSROOT_DIR}/usr/lib"
    1.14 -    CT_DoExecLog ALL make ${JOBSFLAGS} csu/subdir_lib
    1.15 -    CT_DoExecLog ALL cp csu/crt1.o csu/crti.o csu/crtn.o \
    1.16 -                        "${CT_SYSROOT_DIR}/usr/lib"
    1.17 +        # there are a few object files needed to link shared libraries,
    1.18 +        # which we build and install by hand
    1.19 +        CT_DoExecLog ALL mkdir -p "${CT_SYSROOT_DIR}/usr/lib"
    1.20 +        CT_DoExecLog ALL make ${JOBSFLAGS} csu/subdir_lib
    1.21 +        CT_DoExecLog ALL cp csu/crt1.o csu/crti.o csu/crtn.o \
    1.22 +                            "${CT_SYSROOT_DIR}/usr/lib"
    1.23  
    1.24 -    # Finally, 'libgcc_s.so' requires a 'libc.so' to link against.
    1.25 -    # However, since we will never actually execute its code,
    1.26 -    # it doesn't matter what it contains.  So, treating '/dev/null'
    1.27 -    # as a C source file, we produce a dummy 'libc.so' in one step
    1.28 -    CT_DoExecLog ALL "${cross_cc}" -nostdlib        \
    1.29 -                                   -nostartfiles    \
    1.30 -                                   -shared          \
    1.31 -                                   -x c /dev/null   \
    1.32 -                                   -o "${CT_SYSROOT_DIR}/usr/lib/libc.so"
    1.33 +        # Finally, 'libgcc_s.so' requires a 'libc.so' to link against.
    1.34 +        # However, since we will never actually execute its code,
    1.35 +        # it doesn't matter what it contains.  So, treating '/dev/null'
    1.36 +        # as a C source file, we produce a dummy 'libc.so' in one step
    1.37 +        CT_DoExecLog ALL "${cross_cc}" -nostdlib        \
    1.38 +                                       -nostartfiles    \
    1.39 +                                       -shared          \
    1.40 +                                       -x c /dev/null   \
    1.41 +                                       -o "${CT_SYSROOT_DIR}/usr/lib/libc.so"
    1.42 +    fi # threads == nptl
    1.43  
    1.44      CT_EndStep
    1.45  }