Skip to content

Instantly share code, notes, and snippets.

@ewencp
Created October 14, 2011 22:54
Show Gist options
  • Save ewencp/1288593 to your computer and use it in GitHub Desktop.
Save ewencp/1288593 to your computer and use it in GitHub Desktop.
GCC_VERSION=`gcc --version | grep ^gcc | cut -d " " -f 4`
GCC_VERSION_MAJOR=`gcc --version | grep ^gcc | cut -d " " -f 4 | cut -d "." -f 1`
GCC_VERSION_MINOR=`gcc --version | grep ^gcc | cut -d " " -f 4 | cut -d "." -f 2`
GCC_VERSION_REV=`gcc --version | grep ^gcc | cut -d " " -f 4 | cut -d "." -f 3`
if [ "${GCC_VERSION_MAJOR}" -gt "4" -o "${GCC_VERSION_MAJOR}" -eq "4" -a "${GCC_VERSION_MINOR}" -ge "6" ]; then
GCC_46_FIX_CXXFLAGS="-Wno-conversion-null -Wno-unused-but-set-variable -Wno-unused-result -Wno-int-to-pointer-cast"
else
GCC_46_FIX_CXXFLAGS=""
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment