From 5b173dafae0fe8d5013f89f5bd6daa44217862eb Mon Sep 17 00:00:00 2001 From: Jan Kanis Date: Thu, 3 Jan 2013 14:24:41 +0100 Subject: remove -fno-optimize-sibling-calls flag for non-buggy setups; add extra comment regarding ./configure arguments --- configure.ac | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'configure.ac') 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 # -- cgit v1.2.3