summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-02-21 18:20:19 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-02-21 18:20:19 (GMT)
commit43e89c8dddfb0c6ef90a1e72a3f7b569ac44e82a (patch)
tree240112d051e847e9076a59101975b4d0d5180c3c
parentb93e67f07ca3cbca6fd3b35274208cb5dce7739e (diff)
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>
-rw-r--r--scripts/build/libc/glibc-eglibc.sh-common38
1 files changed, 20 insertions, 18 deletions
diff --git a/scripts/build/libc/glibc-eglibc.sh-common b/scripts/build/libc/glibc-eglibc.sh-common
index 8ec8e8d..5ead4b3 100644
--- a/scripts/build/libc/glibc-eglibc.sh-common
+++ b/scripts/build/libc/glibc-eglibc.sh-common
@@ -86,24 +86,26 @@ do_libc_start_files() {
[ "${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"
-
- # 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"
+ 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"
+
+ # 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
}