aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Geoff Nixon <g-nix@users.noreply.github.com>2013-10-26 21:28:50 -0700
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2013-10-29 10:39:12 +0800
commit3c65cd41a5c7cd1ec9deafa66ea10b95e9701483 (patch)
tree8452b91fab625bcec03a29f27c12e9863027dd37
parent8376a44f65d0f0acab3e6ab2802e7ab4a32f728e (diff)
Link with $CXXFLAGS; disable GCC-specific autoconf check (squash fixes).
-rw-r--r--Makefile.in15
-rw-r--r--configure.ac56
2 files changed, 19 insertions, 52 deletions
diff --git a/Makefile.in b/Makefile.in
index dc3a5353..a8a24070 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,3 @@
-
# Copyright (C) 2005-2006 Axel Liljencrantz
#
# This program is free software; you can redistribute it and/or modify
@@ -742,7 +741,7 @@ uninstall-translations:
#
fish: $(FISH_OBJS) fish.o
- $(CXX) $(FISH_OBJS) fish.o $(LDFLAGS_FISH) -o $@
+ $(CXX) $(CXXFLAGS) $(FISH_OBJS) fish.o $(LDFLAGS_FISH) -o $@
#
@@ -750,7 +749,7 @@ fish: $(FISH_OBJS) fish.o
#
fish_pager: $(FISH_PAGER_OBJS)
- $(CXX) $(FISH_PAGER_OBJS) $(LDFLAGS_FISH_PAGER) -o $@
+ $(CXX) $(CXXFLAGS) $(FISH_PAGER_OBJS) $(LDFLAGS_FISH_PAGER) -o $@
#
@@ -758,7 +757,7 @@ fish_pager: $(FISH_PAGER_OBJS)
#
fishd: $(FISHD_OBJS)
- $(CXX) $(FISHD_OBJS) $(LDFLAGS_FISHD) -o $@
+ $(CXX) $(CXXFLAGS) $(FISHD_OBJS) $(LDFLAGS_FISHD) -o $@
#
@@ -766,7 +765,7 @@ fishd: $(FISHD_OBJS)
#
fish_tests: $(FISH_TESTS_OBJS)
- $(CXX) $(FISH_TESTS_OBJS) $(LDFLAGS_FISH) -o $@
+ $(CXX) $(CXXFLAGS) $(FISH_TESTS_OBJS) $(LDFLAGS_FISH) -o $@
#
@@ -776,7 +775,7 @@ fish_tests: $(FISH_TESTS_OBJS)
#
mimedb: $(MIME_OBJS)
- $(CXX) $(MIME_OBJS) $(LDFLAGS_MIMEDB) -o $@
+ $(CXX) $(CXXFLAGS) $(MIME_OBJS) $(LDFLAGS_MIMEDB) -o $@
#
@@ -784,7 +783,7 @@ mimedb: $(MIME_OBJS)
#
fish_indent: $(FISH_INDENT_OBJS)
- $(CXX) $(FISH_INDENT_OBJS) $(LDFLAGS_FISH_INDENT) -o $@
+ $(CXX) $(CXXFLAGS) $(FISH_INDENT_OBJS) $(LDFLAGS_FISH_INDENT) -o $@
#
@@ -792,7 +791,7 @@ fish_indent: $(FISH_INDENT_OBJS)
#
key_reader: key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o
- $(CXX) key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o $(LDFLAGS_FISH) -o $@
+ $(CXX) $(CXXFLAGS) key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o $(LDFLAGS_FISH) -o $@
#
diff --git a/configure.ac b/configure.ac
index ea7c592f..a531b710 100644
--- a/configure.ac
+++ b/configure.ac
@@ -238,56 +238,24 @@ AS_IF([test "$use_doxygen" != "no"],
CXXFLAGS="$CXXFLAGS -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64"
-#
-# If we are using gcc, set some flags that increase the odds of the
-# compiler producing a working binary...
-#
-
-if test "$GCC" = yes; then
-
- #
- # -fno-optimize-sibling-calls seems to work around a bug where
- # sending a SIGWINCH to fish on NetBSD 3.0 causes fish to exit when
- # compiled with GCC 3.3.3. This is probably either a compiler bug
- # or a libc bug, but adding this flag seems to fix things for
- # now. Long term, the real problem should be tracked down and
- # truly fixed, at which point we can remove this silly flag. This
- # bug has been verified to not exist on Linux using GCC 3.3.3.
- #
-
- 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
- # fish does not use exceptions
- # Disabling exceptions saves about 20% (!) of the compiled code size
- CXXFLAGS="$CXXFLAGS -fno-exceptions"
+# fish does not use exceptions
+# Disabling exceptions saves about 20% (!) of the compiled code size
+CXXFLAGS="$CXXFLAGS -fno-exceptions"
- #
- # -Wall is there to keep me on my toes
- #
-
- # Some day...
- CXXFLAGS="$CXXFLAGS -Wall"
+#
+# -Wall is there to keep me on my toes
+#
- #
- # This is needed in order to get the really cool backtraces on Linux
- #
+CXXFLAGS="$CXXFLAGS -Wall"
- if test `uname` != "Darwin"; then
- LDFLAGS_FISH="$LDFLAGS_FISH -rdynamic"
- fi
+#
+# This is needed in order to get the really cool backtraces on Linux
+#
+if test `uname` != "Darwin"; then
+ LDFLAGS_FISH="$LDFLAGS_FISH -rdynamic"
fi