summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-11-21 23:16:37 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-11-21 23:16:37 (GMT)
commitcfb908d2ee16c86a0bf593eef6debfe8b99e33b8 (patch)
tree7a50266d23bddb222a475a0c5cbc15f12967e6d9
parent170091aa2a61a286d41b2f51cb9f33728b55b419 (diff)
libc/glib: pass installation subdir to backend
When building a multilib variant, install in a separate directory, to avoid clutering the default or any other variant. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
-rw-r--r--scripts/build/libc/glibc-eglibc.sh-common16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/build/libc/glibc-eglibc.sh-common b/scripts/build/libc/glibc-eglibc.sh-common
index 6441e84..2c66ad4 100644
--- a/scripts/build/libc/glibc-eglibc.sh-common
+++ b/scripts/build/libc/glibc-eglibc.sh-common
@@ -69,9 +69,11 @@ do_libc() {
# Parameter : Definition : Type : Default
# libc_mode : 'startfiles' or 'final' : string : (none)
# extra_flags : Extra CFLAGS to use (for multilib) : string : (empty)
+# extra_dir : Extra subdir for multilib : string : (empty)
do_libc_backend() {
local libc_mode
local extra_flags
+ local extra_dir
local src_dir="${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}"
local extra_cc_args
local -a extra_config
@@ -90,8 +92,8 @@ do_libc_backend() {
final) CT_DoStep INFO "Installing C library";;
*) CT_Abort "Unsupported (or unset) libc_mode='${libc_mode}'";;
esac
- mkdir -p "${CT_BUILD_DIR}/build-libc-${libc_mode}"
- cd "${CT_BUILD_DIR}/build-libc-${libc_mode}"
+ mkdir -p "${CT_BUILD_DIR}/build-libc-${libc_mode}${extra_dir//\//_}"
+ cd "${CT_BUILD_DIR}/build-libc-${libc_mode}${extra_dir//\//_}"
CT_DoLog EXTRA "Configuring C library"
@@ -269,7 +271,7 @@ do_libc_backend() {
# use the 'install-headers' makefile target to install the
# headers
CT_DoExecLog ALL make ${JOBSFLAGS} \
- install_root=${CT_SYSROOT_DIR} \
+ install_root=${CT_SYSROOT_DIR}${extra_dir} \
install-bootstrap-headers=yes \
"${extra_make_args[@]}" \
install-headers
@@ -306,12 +308,12 @@ do_libc_backend() {
# 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 mkdir -p "${CT_SYSROOT_DIR}${extra_dir}/usr/lib"
CT_DoExecLog ALL make ${JOBSFLAGS} \
"${extra_make_args[@]}" \
csu/subdir_lib
CT_DoExecLog ALL cp csu/crt1.o csu/crti.o csu/crtn.o \
- "${CT_SYSROOT_DIR}/usr/lib"
+ "${CT_SYSROOT_DIR}${extra_dir}/usr/lib"
# Finally, 'libgcc_s.so' requires a 'libc.so' to link against.
# However, since we will never actually execute its code,
@@ -321,7 +323,7 @@ do_libc_backend() {
-nostartfiles \
-shared \
-x c /dev/null \
- -o "${CT_SYSROOT_DIR}/usr/lib/libc.so"
+ -o "${CT_SYSROOT_DIR}${extra_dir}/usr/lib/libc.so"
fi # threads == nptl
else # libc_mode = final
CT_DoLog EXTRA "Building C library"
@@ -332,7 +334,7 @@ do_libc_backend() {
CT_DoLog EXTRA "Installing C library"
CT_DoExecLog ALL make ${JOBSFLAGS} \
"${extra_make_args[@]}" \
- install_root="${CT_SYSROOT_DIR}" \
+ install_root="${CT_SYSROOT_DIR}${extra_dir}" \
install
if [ "${CT_BUILD_MANUALS}" = "y" ]; then