diff options
author | Jan Kanis <jan.code@jankanis.nl> | 2013-01-03 14:24:41 +0100 |
---|---|---|
committer | Jan Kanis <jan.code@jankanis.nl> | 2013-01-07 14:32:20 +0100 |
commit | 5b173dafae0fe8d5013f89f5bd6daa44217862eb (patch) | |
tree | c44ff44ba10c59890b2df968c06cb34128517703 /configure.ac | |
parent | c939f2ee45a585f34d1f260d90523faf71e057f6 (diff) |
remove -fno-optimize-sibling-calls flag for non-buggy setups; add extra comment regarding ./configure arguments
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 3a603f88..262f5b3b 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,8 @@ AC_INIT(fish,2.0.0,fish-users@lists.sf.net) # -# preserve configure arguments for xsel +# preserve configure arguments for xsel. This breaks if arguments +# contain whitespace, so don't do that. # conf_arg=$@ @@ -264,7 +265,18 @@ if test "$GCC" = yes; then # bug has been verified to not exist on Linux using GCC 3.3.3. # - CXXFLAGS="$CXXFLAGS -fno-optimize-sibling-calls" + GCC_VERSION=$($CC -dumpversion) + GCC_VERSION_MAJOR=$(echo $GCC_VERSION | cut -d'.' -f1) + GCC_VERSION_MINOR=$(echo $GCC_VERSION | cut -d'.' -f2) + GCC_VERSION_PATCH=$(echo $GCC_VERSION | cut -d'.' -f3) + + if test "$GCC_VERSION_MAJOR" -le 3; then + if test 0"$GCC_VERSION_MINOR" -le 3; then + if test 0"$GCC_VERSION_PATCH" -le 3; then + CXXFLAGS="$CXXFLAGS -fno-optimize-sibling-calls" + fi + fi + fi # |