aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2011-12-12 15:36:08 +0100
committerSebastian Hahn <sebastian@torproject.org>2011-12-13 07:43:53 +0100
commitbcca541da9f60d95fe7f0f7b3aa6ef4a8251b1e2 (patch)
tree1fb6199fbd760441fe84df36bf08d6878405e377 /configure.in
parent0582746e0d25ef07e925521f9e6eb272725f64ee (diff)
downloadtor-bcca541da9f60d95fe7f0f7b3aa6ef4a8251b1e2.tar.gz
tor-bcca541da9f60d95fe7f0f7b3aa6ef4a8251b1e2.zip
Build with warnings and clang 3.0
--enable-gcc-warnings enables two warnings that clang doesn't support, so the build fails. We had hoped clang 3.0 would add those, but it didn't, so let's just always disable those warnings when building with clang. We can still fix it later once they add support
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in10
1 files changed, 4 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index a9339cc922..424cccb874 100644
--- a/configure.in
+++ b/configure.in
@@ -940,10 +940,10 @@ 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__) || (__clang_major__ > 2) || (__clang_major__ == 2 && __clang_minor__ > 9)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
+#if !defined(__clang__)
#error
-#endif])], have_clang29orlower=yes, have_clang29orlower=no)
+#endif])], have_clang=yes, have_clang=no)
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wshorten-64-to-32"
@@ -980,10 +980,8 @@ if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xy
# We used to use -Wstrict-overflow=5, but that breaks us heavily under 4.3.
fi
- if test x$have_gcc42 = xyes && test x$have_clang29orlower = xno; then
+ if test x$have_gcc42 = xyes && test x$have_clang = xno; then
# These warnings break gcc 4.0.2 and clang, but work on gcc 4.2
- # We only disable these for clang 2.9 and lower, in case they are
- # supported in later versions.
CFLAGS="$CFLAGS -Wnormalized=id -Woverride-init"
fi