Merge lp:~mordred/gearmand/fix-attributes-warning into lp:gearmand/1.0

Proposed by Monty Taylor
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mordred/gearmand/fix-attributes-warning
Merge into: lp:gearmand/1.0
Diff against target: 78 lines
2 files modified
m4/pandora_canonical.m4 (+1/-1)
m4/pandora_warnings.m4 (+41/-5)
To merge this branch: bzr merge lp:~mordred/gearmand/fix-attributes-warning
Reviewer Review Type Date Requested Status
Gearman-developers Pending
Review via email: mp+13659@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote :

This fixes the issues with RHEL4 and GCC 3.4. It actually allows us to build on GCC 3.3.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'm4/pandora_canonical.m4'
2--- m4/pandora_canonical.m4 2009-09-29 04:30:01 +0000
3+++ m4/pandora_canonical.m4 2009-10-20 18:35:17 +0000
4@@ -4,7 +4,7 @@
5 dnl with or without modifications, as long as this notice is preserved.
6
7 dnl Which version of the canonical setup we're using
8-AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.62])
9+AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.63])
10
11 AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
12 dnl Force dependency tracking on for Sun Studio builds
13
14=== modified file 'm4/pandora_warnings.m4'
15--- m4/pandora_warnings.m4 2009-09-29 04:30:01 +0000
16+++ m4/pandora_warnings.m4 2009-10-20 18:35:17 +0000
17@@ -147,7 +147,25 @@
18 AS_IF([test "${ac_cv_assert}" = "no"],
19 [NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"])
20
21- BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wextra -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"
22+ AC_CACHE_CHECK([whether it is safe to use -Wextra],
23+ [ac_cv_safe_to_use_Wextra_],
24+ [save_CFLAGS="$CFLAGS"
25+ CFLAGS="${W_FAIL} -pedantic -Wextra ${AM_CFLAGS} ${CFLAGS}"
26+ AC_COMPILE_IFELSE([
27+ AC_LANG_PROGRAM(
28+ [[
29+#include <stdio.h>
30+ ]], [[]])
31+ ],
32+ [ac_cv_safe_to_use_Wextra_=yes],
33+ [ac_cv_safe_to_use_Wextra_=no])
34+ CFLAGS="$save_CFLAGS"])
35+
36+ BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"
37+ AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"],
38+ [BASE_WARNINGS="${BASE_WARNINGS} -Wextra"],
39+ [BASE_WARNINGS="${BASE_WARNINGS} -W"])
40+
41 CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}"
42 CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}"
43
44@@ -240,13 +258,31 @@
45 [ac_cv_safe_to_use_Wattributes_=no])
46 CXXFLAGS="${save_CXXFLAGS}"
47 AC_LANG_POP()])
48- AS_IF([test "$ac_cv_safe_to_use_Wattributes_" = "yes"],
49- [],
50- [CXX_WARNINGS="${CXX_WARNINGS} -Wno-attributes"])
51+ AC_CACHE_CHECK([whether it is safe to use -Wno-attributes],
52+ [ac_cv_safe_to_use_Wno_attributes_],
53+ [save_CFLAGS="$CFLAGS"
54+ CFLAGS="${W_FAIL} -pedantic -Wno_attributes_ ${AM_CFLAGS} ${CFLAGS}"
55+ AC_COMPILE_IFELSE([
56+ AC_LANG_PROGRAM(
57+ [[
58+#include <stdio.h>
59+ ]], [[]])
60+ ],
61+ [ac_cv_safe_to_use_Wno_attributes_=yes],
62+ [ac_cv_safe_to_use_Wno_attributes_=no])
63+ CFLAGS="$save_CFLAGS"])
64+
65+ dnl GCC 3.4 doesn't have -Wno-attributes, so we can't turn them off
66+ dnl by using that.
67+ AS_IF([test "$ac_cv_safe_to_use_Wattributes_" != "yes"],[
68+ AS_IF([test "$ac_cv_safe_to_use_Wno_attributes_" = "yes"],[
69+ CC_WARNINGS="${CC_WARNINGS} -Wno-attributes"
70+ NO_ATTRIBUTES="-Wno-attributes"])])
71+
72
73 NO_REDUNDANT_DECLS="-Wno-redundant-decls"
74 dnl TODO: Figure out a better way to deal with this:
75- PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces -Wno-attributes"
76+ PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}"
77 NO_WERROR="-Wno-error"
78 INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align"
79

Subscribers

People subscribed via source and target branches