summaryrefslogtreecommitdiff
path: root/scripts/crosstool.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-07-27 16:54:28 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-07-27 16:54:28 (GMT)
commit64dd9107e4240e4c7ce3d1aae75d1e916732e2f6 (patch)
treeb89e167bec5ae170d80506792591bce2c8deb612 /scripts/crosstool.sh
parentf37915ff064c466e275683b7b429db9ba5caa23b (diff)
Backport #878 from trunk:
Fix building x86_64 on x86_64 (and hopefully all other *64 archs on the same *64). /branches/1.2/scripts/build/cc_gcc.sh | 26 0 26 0 -------------------------- /branches/1.2/scripts/crosstool.sh | 14 14 0 0 ++++++++++++++ 2 files changed, 14 insertions(+), 26 deletions(-)
Diffstat (limited to 'scripts/crosstool.sh')
-rwxr-xr-xscripts/crosstool.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh
index e170915..a393d87 100755
--- a/scripts/crosstool.sh
+++ b/scripts/crosstool.sh
@@ -350,6 +350,20 @@ if [ -z "${CT_RESTART}" ]; then
mkdir -p "${CT_SYSROOT_DIR}/lib"
mkdir -p "${CT_SYSROOT_DIR}/usr/lib"
+ # Prevent gcc from installing its libraries outside of the sys-root
+ ln -sf "sys-root/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
+
+ # 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).
+ case "${CT_TARGET}" in
+ powerpc64*|ppc64*|x86_64*)
+ ln -sf "lib" "${CT_SYSROOT_DIR}/lib64"
+ ln -sf "lib" "${CT_SYSROOT_DIR}/usr/lib64"
+ ln -sf "sys-root/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib64"
+ ;;
+ esac
+
# Canadian-cross are really picky on the way they are built. Tweak the values.
CT_UNIQ_BUILD=$(echo "${CT_BUILD}" |sed -r -e 's/-/-build_/')
if [ "${CT_CANADIAN}" = "y" ]; then