small fix to remove false gcc-4.9-prerelease warning
[k8jam.git] / 0build.sh
blob4c55cc10356eda3ebba2e86833094c43ea579d5b
1 #!/bin/sh
3 CC="gcc -pipe"
4 LINK="gcc -pipe"
5 LINKFLAGS="-s"
6 AR="ar sru"
7 #RANLIB="ranlib"
8 CFLAGS="-O2 -Wall -DMKJAMBASE_COMPACT -fwrapv -march=native -mtune=native"
9 checkoldcompiler="ona"
10 if [ `uname -m` = "armv7l" ]; then
11 # n900 native
12 checkoldcompiler="tan"
13 elif [ `uname -m` = "arm" ]; then
14 # armel scratchbox
15 checkoldcompiler="tan"
17 # check for n900 and old compiler
18 if [ "$checkoldcompiler" = "tan" ]; then
19 ver=`gcc -v 2>&1 | grep version`
20 if [ "z$ver" = "zgcc version 4.2.1" ]; then
21 echo "MSG: using n900 configuration..."
22 CFLAGS="-O0 -Wall -DMKJAMBASE_COMPACT -fno-strict-aliasing"
23 else
24 which awk >/dev/null 2>&1
25 if test "$?" = "0"; then
26 ver=`gcc -v 2>&1 | grep version | awk '{print $3}'`
27 if [ "z$ver" = "z4.7.2" ]; then
28 echo "MSG: using n900 thumb2 configuration..."
29 CFLAGS="-O2 -Wall -DMKJAMBASE_COMPACT -fgnu89-inline"
31 else
32 echo "MSG: no awk, it's so unsexy..."
36 DESTPATH="bin.unix"
37 BUILDPATH="_build"
38 XOS="unix"
39 WINE=""
40 EXESFX=""
41 CROSS="ona"
43 . ./0build_common.sh