From: Nick Mathewson Date: Wed, 13 Jun 2012 20:37:23 +0000 (-0400) Subject: Only use -Qunused-arguments when building with clang. fix on 5210 fix. X-Git-Tag: tor-0.2.3.17-beta~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7826eef93e8a3b1f90198596bfd19b589f58cc88;p=thirdparty%2Ftor.git Only use -Qunused-arguments when building with clang. fix on 5210 fix. --- diff --git a/configure.in b/configure.in index 18869a1158..e690cb2e41 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,