From 6300d1e59c5e0e14b57c71f617b429629de8044b Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 4 Aug 2015 06:08:38 +0000 Subject: gcc-multilib: use the (fixed) ARCH detection block from official script --- current/gcc/gcc-multilib.SlackBuild | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'current') diff --git a/current/gcc/gcc-multilib.SlackBuild b/current/gcc/gcc-multilib.SlackBuild index 2f370ac..63bb31d 100755 --- a/current/gcc/gcc-multilib.SlackBuild +++ b/current/gcc/gcc-multilib.SlackBuild @@ -65,15 +65,14 @@ LANGS=${LANGS:-'ada,c,c++,fortran,go,java,lto,objc'} echo "Building these compilers: $LANGS"; sleep 5 # Automatically determine the architecture we're building on: -export MARCH=$( uname -m ) if [ -z "$ARCH" ]; then - case "$MARCH" in - i?86) export ARCH=i586 ;; - armv7hl) export ARCH=$MARCH ;; - arm*) export ARCH=arm ;; + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; + *) ARCH=$(uname -m) ;; esac + export ARCH fi if [ "$ARCH" = "i386" ]; then -- cgit v1.2.3