commit 7826eef93e8a3b1f90198596bfd19b589f58cc88 Author: Nick Mathewson nickm@torproject.org Date: Wed Jun 13 16:37:23 2012 -0400
Only use -Qunused-arguments when building with clang. fix on 5210 fix. --- configure.in | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/configure.in b/configure.in index 18869a1..e690cb2 100644 --- a/configure.in +++ b/configure.in @@ -563,9 +563,16 @@ dnl use it with a build of a library. all_ldflags_for_check="$TOR_LDFLAGS_zlib $TOR_LDFLAGS_openssl $TOR_LDFLAGS_libevent" all_libs_for_check="$TOR_ZLIB_LIBS $TOR_LIB_MATH $TOR_LIBEVENT_LIBS $TOR_OPENSSL_LIBS $TOR_LIB_WS32 $TOR_LIB_GDI"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ +#if !defined(__clang__) +#error +#endif])], have_clang=yes, have_clang=no) + if test x$enable_gcc_hardening != xno; then CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" - TOR_CHECK_CFLAGS(-Qunused-arguments) + if test x$have_clang = xyes; then + TOR_CHECK_CFLAGS(-Qunused-arguments) + fi TOR_CHECK_CFLAGS(-fstack-protector-all) TOR_CHECK_CFLAGS(-Wstack-protector) TOR_CHECK_CFLAGS(-fwrapv) @@ -1243,11 +1250,6 @@ if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xy #error #endif])], have_gcc43=yes, have_gcc43=no)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ -#if !defined(__clang__) -#error -#endif])], have_clang=yes, have_clang=no) - save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wshorten-64-to-32" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], have_shorten64_flag=yes,
tor-commits@lists.torproject.org