]> git.stg.codes - stg.git/blobdiff - projects/rscriptd/build
Do not mix CFLAGS and CXXFLAGS
[stg.git] / projects / rscriptd / build
index 38ec5fc1388c6a7d2db4e1e55e20e74f96db5239..31070a6fab176c27605769cf7aa77386f3d30925 100755 (executable)
@@ -24,7 +24,7 @@ else
     then
         DEFS="-DDEBUG"
         MAKEOPTS="-j1"
-        CXXFLAGS="$CXXFLAGS -g3 -W -Wall"
+        CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
     else
         MAKEOPTS="-j1"
     fi
@@ -125,7 +125,7 @@ echo "found"
 
 echo -n "Checking endianess... "
 echo "int main() { int probe = 0x00000001; return *(char *)&probe; }" > build_check.c
-$CC $CXXFLAGS $LDFLAGS build_check.c -o fake > /dev/null 2> /dev/null
+$CC $CFLAGS $LDFLAGS build_check.c -o fake > /dev/null 2> /dev/null
 if [ $? != 0 ]
 then
     echo "FAIL!"
@@ -137,10 +137,12 @@ else
     then
         ARCH=le
         CXXFLAGS="$CXXFLAGS -DARCH_LE"
+        CFLAGS="$CFLAGS -DARCH_LE"
         echo "Little Endian"
     else
         ARCH=be
         CXXFLAGS="$CXXFLAGS -DARCH_BE"
+        CFLAGS="$CFLAGS -DARCH_BE"
         echo "Big Endian"
     fi
 fi
@@ -164,6 +166,7 @@ echo "" >> $CONFFILE
 echo "LIB_THREAD=$LIB_THREAD" >> $CONFFILE
 echo "SHELL=$SHELL" >> $CONFFILE
 echo "CXXFLAGS=$CXXFLAGS" >> $CONFFILE
+echo "CFLAGS=$CFLAGS" >> $CONFFILE
 echo "LDFLAGS=$LDFLAGS" >> $CONFFILE
 echo "PREFIX=$PREFIX" >> $CONFFILE
 echo "BIN_MODE=$BIN_MODE" >> $CONFFILE