-
Notifications
You must be signed in to change notification settings - Fork 13
/
gcc-linux.sh
35 lines (31 loc) · 1.3 KB
/
gcc-linux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /bin/sh
# If the SNAP_TARGET_ARCH variable is set, it means we have already called
# one of these scripts before so we should use the same architecture
# for subsqeuent invocation. To change architectures, call one of the
# architecture specific scripts directly.
if [ "$SNAP_TARGET_ARCH" == ppc-be ]; then
. $SCITECH/bin-linux/gcc-linux-ppc-be.sh
elif [ "$SNAP_TARGET_ARCH" == axp-be ]; then
. $SCITECH/bin-linux/gcc-linux-axp-be.sh
elif [ "$SNAP_TARGET_ARCH" == x86-64 ]; then
. $SCITECH/bin-linux/gcc-linux-x86-64.sh
elif [ "$SNAP_TARGET_ARCH" == mips-le ]; then
. $SCITECH/bin-linux/gcc-linux-mips-le.sh
elif [ "$SNAP_TARGET_ARCH" == x86 ]; then
. $SCITECH/bin-linux/gcc-linux-x86.sh
else
# Determine the host machine and call the proper script to set up
# compiling natively for the host processor by default for new shells.
HOST_MACHINE=`(uname -m) 2>/dev/null` || HOST_MACHINE=unknown
if [ "$HOST_MACHINE" == ppc ]; then
. $SCITECH/bin-linux/gcc-linux-ppc-be.sh
elif [ "$HOST_MACHINE" == alpha ]; then
. $SCITECH/bin-linux/gcc-linux-axp-be.sh
elif [ "$HOST_MACHINE" == x86_64 ]; then
. $SCITECH/bin-linux/gcc-linux-x86-64.sh
elif [ "$HOST_MACHINE" == mips ]; then
. $SCITECH/bin-linux/gcc-linux-mips-le.sh
else
. $SCITECH/bin-linux/gcc-linux-x86.sh
fi
fi