summaryrefslogtreecommitdiffstats
path: root/current
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2015-08-04 06:08:38 +0000
committer Eric Hameleers <alien@slackware.com>2015-08-04 06:08:38 +0000
commit6300d1e59c5e0e14b57c71f617b429629de8044b (patch)
treeb5863a72cb8c93105fbe540f6c21941738cd0161 /current
parentb7292f4f195ff93ff401597b189a74c51272e475 (diff)
downloadmultilib-6300d1e59c5e0e14b57c71f617b429629de8044b.tar.gz
multilib-6300d1e59c5e0e14b57c71f617b429629de8044b.tar.xz
gcc-multilib: use the (fixed) ARCH detection block from official script
Diffstat (limited to 'current')
-rwxr-xr-xcurrent/gcc/gcc-multilib.SlackBuild11
1 files changed, 5 insertions, 6 deletions
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