summaryrefslogtreecommitdiff
path: root/scripts/crosstool-NG.sh.in
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-10-07 20:37:06 (GMT)
committerAnthony Foiani <anthony.foiani@gmail.com>2010-10-07 20:37:06 (GMT)
commit96c2e118944d4f2052dd3849cc8c6993c2bcc7a2 (patch)
tree2c3eac8b5905f579453185fe88c3f594561dc731 /scripts/crosstool-NG.sh.in
parentbd8723cd92bd039855a011159ae34c2ae07b63ad (diff)
scripts: always create lib32 and lib64 symlinks
Unconditionally create the lib32 -> lib/ and lib64 -> lib/ symlinks. This is reportedly a fix to build a toolchain for a 32-bit target on a 'pure' 64-bit host (eg. on Fedora FC12, host libs are in lib64/, and there is no lib -> lib64 symlink, as we can see on other distors, as Debian). As gcc only puts static host lib in lib64/ (along with target files in subdirs), we can safely create the symlinks. Also note that the symlinks are summarily removed at the end of the build. Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com> [Yann E. MORIN: fix a comment, rephrase the commit log] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r--scripts/crosstool-NG.sh.in33
1 files changed, 16 insertions, 17 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 2d28c3e..9ea7664 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -328,23 +328,22 @@ if [ -z "${CT_RESTART}" ]; then
CT_DoExecLog ALL ln -sf "./${CT_SYSROOT_DIR_PREFIX}/sys-root/usr/include" "${CT_PREFIX_DIR}/${CT_TARGET}/include"
fi
- # Now, in case we're 64 bits, just have lib64/ be a symlink to lib/
- # so as to have all libraries in the same directory (we can do that
- # because we are *not* multilib).
- # Mips64 with n32 emulation install its libs in lib32, so also prepare
- # these symlinks
- # Not all the symlinks are necessary, but better safe than sorry...
- if [ "${CT_ARCH_64}" = "y" ]; then
- for d in \
- "${CT_PREFIX_DIR}" \
- "${CT_SYSROOT_DIR}" \
- "${CT_SYSROOT_DIR}/usr" \
- "${CT_PREFIX_DIR}/${CT_TARGET}" \
- ; do
- CT_DoExecLog ALL ln -sf "lib" "${d}/lib32"
- CT_DoExecLog ALL ln -sf "lib" "${d}/lib64"
- done
- fi
+ # Since we're *not* multilib on the target side, we want all the
+ # libraries to end up in "lib". We create "lib64" (for 64-bit
+ # build or host architectures) and "lib32" (for 32-bit emulation
+ # on 64-bit) as symlinks to "lib".
+ #
+ # Not all of these symlinks are necessary, but better safe than
+ # sorry. They are summarily removed by build/internals.sh:do_finish.
+ for d in \
+ "${CT_PREFIX_DIR}" \
+ "${CT_SYSROOT_DIR}" \
+ "${CT_SYSROOT_DIR}/usr" \
+ "${CT_PREFIX_DIR}/${CT_TARGET}" \
+ ; do
+ CT_DoExecLog ALL ln -sf "lib" "${d}/lib32"
+ CT_DoExecLog ALL ln -sf "lib" "${d}/lib64"
+ done
# Determine build system if not set by the user
if [ -z "${CT_BUILD}" ]; then