diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-06-13 16:37:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-13 16:37:23 -0400 |
commit | 7826eef93e8a3b1f90198596bfd19b589f58cc88 (patch) | |
tree | 08d9211582a799f2a79ea672b0128b28a1597651 /configure.in | |
parent | 54ef039ba527acba4cbcde158b17674e91ede904 (diff) | |
download | tor-7826eef93e8a3b1f90198596bfd19b589f58cc88.tar.gz tor-7826eef93e8a3b1f90198596bfd19b589f58cc88.zip |
Only use -Qunused-arguments when building with clang. fix on 5210 fix.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 14 |
1 files changed, 8 insertions, 6 deletions
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, |