Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

Commit

Permalink
Use the same style of gcc4.8 detection rules as elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
avsm committed Jan 26, 2015
1 parent dc81796 commit d5db075
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions xen-ocaml/core/build.sh
Expand Up @@ -10,14 +10,20 @@ armv*)
m_file="arm"
;;
*)
ARCH_CFLAGS="-momit-leaf-frame-pointer -mfancy-math-387 -fno-tree-loop-distribute-patterns -fno-stack-protector"
ARCH_CFLAGS="-momit-leaf-frame-pointer -mfancy-math-387"
m_file="x86_64"
;;
esac

# This extra flag only needed for gcc 4.8+
GCC_MVER2=`gcc -dumpversion | cut -f2 -d.`
if [ $GCC_MVER2 -ge 8 ]; then
EXTRA_CFLAGS="-fno-tree-loop-distribute-patterns -fno-stack-protector"
fi

CC=${CC:-cc}
PWD=`pwd`
CFLAGS="-Wno-attributes ${ARCH_CFLAGS} -DSYS_xen -USYS_linux \
CFLAGS="-Wno-attributes ${ARCH_CFLAGS} ${EXTRA_CFLAGS} -DSYS_xen -USYS_linux \
$(pkg-config --cflags $PKG_CONFIG_DEPS) \
-I `opam config var prefix`/include/mirage-xen/include"

Expand Down

0 comments on commit d5db075

Please sign in to comment.