Fix bug which missed flags in NATIVE and SEQ variables
[charm.git] / src / arch / common / cc-gcc.sh
blobb2b5c7daeeebbbdb49ea2078e8432a80451d8558
1 CMK_CPP_CHARM='cpp -P'
2 CMK_CPP_C='gcc -E'
3 CMK_CC='gcc'
4 CMK_CXX='g++'
5 CMK_LD='gcc'
6 CMK_LDXX='g++'
8 CMK_LD_SHARED='-shared'
9 CMK_RANLIB='ranlib'
10 CMK_LIBS='-lckqt'
12 if [ "$CMK_MACOSX" ]; then
13 # find real gcc (not Apple's clang) in $PATH on darwin, works with homebrew/macports
14 candidates=$(which gcc gcc-{4..19} gcc-mp-{4..19} 2>/dev/null)
15 for cand in $candidates; do
16 $cand -v 2>&1 | grep -q clang
17 if [ $? -eq 1 ]; then
18 cppcand=$(echo $cand | sed s,cc,++,)
19 CMK_CPP_C="$cand -E "
20 CMK_CC="$cand -fPIC "
21 CMK_LD="$cand "
22 CMK_CXX="$cppcand -fPIC -Wno-deprecated "
23 CMK_LDXX="$cppcand "
24 found=1
25 break
27 done
28 if [ -z "$found" ]; then
29 echo "No suitable non-clang gcc found, exiting"
30 exit 1