]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove superfluous -g -O2 compiler argument
authorSebastian Hahn <sebastian@torproject.org>
Fri, 18 Mar 2011 16:04:01 +0000 (17:04 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Fri, 18 Mar 2011 16:04:01 +0000 (17:04 +0100)
Autoconf adds -g -O2 by default, so adding it ourselves is not required.
It also caused a warning with clang for every source file, so remove it
here. Fixes last issue of ticket 2696.

configure.in

index 9999f6034ba61650d376c37c648c9a37e1c8807d..4436fe20751c6ebed143fd8020de81295a1fe823 100644 (file)
@@ -865,12 +865,13 @@ fi
 # Set CFLAGS _after_ all the above checks, since our warnings are stricter
 # than autoconf's macros like.
 if test "$GCC" = yes; then
-  CFLAGS="$CFLAGS -Wall -g -O2"
   # Disable GCC's strict aliasing checks.  They are an hours-to-debug
   # accident waiting to happen.
-  CFLAGS="$CFLAGS -fno-strict-aliasing"
+  CFLAGS="$CFLAGS -Wall -fno-strict-aliasing"
 else
-  CFLAGS="$CFLAGS -g -O"
+  # Autoconf sets -g -O2 by default. Override optimization level
+  # for non-gcc compilers
+  CFLAGS="$CFLAGS -O"
   enable_gcc_warnings=no
   enable_gcc_warnings_advisory=no
 fi