From 020e2c7fe954d9a04d13f3d9883e6f83ac7ad063 Mon Sep 17 00:00:00 2001 From: Tiago Marques Date: Tue, 29 Aug 2017 19:19:46 +0100 Subject: [PATCH] rules/gcc/cross: Fixed bug for 64 bit systems, causing libraries to be searched in the wrong directory. --- rules/gcc/cross.bash | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rules/gcc/cross.bash b/rules/gcc/cross.bash index 22fa522..a0ddde5 100644 --- a/rules/gcc/cross.bash +++ b/rules/gcc/cross.bash @@ -49,10 +49,15 @@ host_install() target_install() { - $cmd_mkdir \ - "$cfg_dir_rootfs/usr/lib" && + libdir=lib + if [ -d "$cfg_dir_toolchain/$cfg_target_canonical/lib64" ]; then + libdir=lib64 + fi - for f in "$cfg_dir_toolchain/$cfg_target_canonical/lib/"{libgcc_s,libstdc++}.so*; do + $cmd_mkdir \ + "$cfg_dir_rootfs/usr/$libdir" && + + for f in "$cfg_dir_toolchain/$cfg_target_canonical/$libdir/"{libgcc_s,libstdc++}.so*; do base="$(basename $f)" if [ $(echo "$base" | grep '\.py' 2> /dev/null) ]; then