Revision | 8a643cc36cf121de3a9131f95547eba927413710 (tree) |
---|---|
Zeit | 2015-07-15 00:39:12 |
Autor | H.J. Lu <hjl.tools@gmai...> |
Commiter | H.J. Lu |
Sync config/warnings.m4 with GCC
config/
Sync with GCC
2015-05-27 Jason Merrill <jason@redhat.com>
PR bootstrap/66304
* warnings.m4 (ACX_PROG_CXX_WARNING_OPTS)
(ACX_PROG_CXX_WARNINGS_ARE_ERRORS)
(ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC): New.
(ACX_PROG_CC_WARNING_OPTS, ACX_PROG_CC_WARNING_ALMOST_PEDANTIC)
(ACX_PROG_CC_WARNINGS_ARE_ERRORS): Push into C language context.
libdecnumber/
* configure: Regenerated.
libiberty/
* configure: Regenerated.
opcodes/
* configure: Regenerated.
@@ -1,6 +1,18 @@ | ||
1 | 1 | 2015-07-14 H.J. Lu <hongjiu.lu@intel.com> |
2 | 2 | |
3 | 3 | Sync with GCC |
4 | + 2015-05-27 Jason Merrill <jason@redhat.com> | |
5 | + | |
6 | + PR bootstrap/66304 | |
7 | + * warnings.m4 (ACX_PROG_CXX_WARNING_OPTS) | |
8 | + (ACX_PROG_CXX_WARNINGS_ARE_ERRORS) | |
9 | + (ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC): New. | |
10 | + (ACX_PROG_CC_WARNING_OPTS, ACX_PROG_CC_WARNING_ALMOST_PEDANTIC) | |
11 | + (ACX_PROG_CC_WARNINGS_ARE_ERRORS): Push into C language context. | |
12 | + | |
13 | +2015-07-14 H.J. Lu <hongjiu.lu@intel.com> | |
14 | + | |
15 | + Sync with GCC | |
4 | 16 | * mh-alpha-linux: Restored. |
5 | 17 | |
6 | 18 | 2015-06-30 H.J. Lu <hongjiu.lu@intel.com> |
@@ -18,11 +18,12 @@ | ||
18 | 18 | #along with GCC; see the file COPYING3. If not see |
19 | 19 | #<http://www.gnu.org/licenses/>. |
20 | 20 | |
21 | -# ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS) | |
21 | +# ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS]) | |
22 | 22 | # Sets @VARIABLE@ to the subset of the given options which the |
23 | 23 | # compiler accepts. |
24 | 24 | AC_DEFUN([ACX_PROG_CC_WARNING_OPTS], |
25 | 25 | [AC_REQUIRE([AC_PROG_CC])dnl |
26 | +AC_LANG_PUSH(C) | |
26 | 27 | m4_pushdef([acx_Var], [m4_default([$2], [WARN_CFLAGS])])dnl |
27 | 28 | AC_SUBST(acx_Var)dnl |
28 | 29 | m4_expand_once([acx_Var= |
@@ -48,6 +49,7 @@ for real_option in $1; do | ||
48 | 49 | done |
49 | 50 | CFLAGS="$save_CFLAGS" |
50 | 51 | m4_popdef([acx_Var])dnl |
52 | +AC_LANG_POP(C) | |
51 | 53 | ])# ACX_PROG_CC_WARNING_OPTS |
52 | 54 | |
53 | 55 | # ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC]) |
@@ -55,6 +57,7 @@ m4_popdef([acx_Var])dnl | ||
55 | 57 | # and accepts all of those options simultaneously, otherwise to nothing. |
56 | 58 | AC_DEFUN([ACX_PROG_CC_WARNING_ALMOST_PEDANTIC], |
57 | 59 | [AC_REQUIRE([AC_PROG_CC])dnl |
60 | +AC_LANG_PUSH(C) | |
58 | 61 | m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl |
59 | 62 | AC_SUBST(acx_Var)dnl |
60 | 63 | m4_expand_once([acx_Var= |
@@ -77,6 +80,7 @@ AS_IF([test AS_VAR_GET(acx_Pedantic) = yes], | ||
77 | 80 | AS_VAR_POPDEF([acx_Pedantic])dnl |
78 | 81 | m4_popdef([acx_Woptions])dnl |
79 | 82 | m4_popdef([acx_Var])dnl |
83 | +AC_LANG_POP(C) | |
80 | 84 | ])# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC |
81 | 85 | |
82 | 86 | # ACX_PROG_CC_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR]) |
@@ -88,6 +92,7 @@ m4_popdef([acx_Var])dnl | ||
88 | 92 | # appeared on the configure command line. |
89 | 93 | AC_DEFUN([ACX_PROG_CC_WARNINGS_ARE_ERRORS], |
90 | 94 | [AC_REQUIRE([AC_PROG_CC])dnl |
95 | +AC_LANG_PUSH(C) | |
91 | 96 | m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl |
92 | 97 | AC_SUBST(acx_Var)dnl |
93 | 98 | m4_expand_once([acx_Var= |
@@ -114,4 +119,109 @@ AS_IF([test $enable_werror_always = yes], | ||
114 | 119 | [acx_Var="$acx_Var${acx_Var:+ }-Werror"]) |
115 | 120 | AS_VAR_POPDEF([acx_GCCvers])]) |
116 | 121 | m4_popdef([acx_Var])dnl |
122 | +AC_LANG_POP(C) | |
117 | 123 | ])# ACX_PROG_CC_WARNINGS_ARE_ERRORS |
124 | + | |
125 | +# ACX_PROG_CXX_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CXXFLAGS]) | |
126 | +# Sets @VARIABLE@ to the subset of the given options which the | |
127 | +# compiler accepts. | |
128 | +AC_DEFUN([ACX_PROG_CXX_WARNING_OPTS], | |
129 | +[AC_REQUIRE([AC_PROG_CXX])dnl | |
130 | +AC_LANG_PUSH(C++) | |
131 | +m4_pushdef([acx_Var], [m4_default([$2], [WARN_CXXFLAGS])])dnl | |
132 | +AC_SUBST(acx_Var)dnl | |
133 | +m4_expand_once([acx_Var= | |
134 | +],m4_quote(acx_Var=))dnl | |
135 | +save_CXXFLAGS="$CXXFLAGS" | |
136 | +for real_option in $1; do | |
137 | + # Do the check with the no- prefix removed since gcc silently | |
138 | + # accepts any -Wno-* option on purpose | |
139 | + case $real_option in | |
140 | + -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;; | |
141 | + *) option=$real_option ;; | |
142 | + esac | |
143 | + AS_VAR_PUSHDEF([acx_Woption], [acx_cv_prog_cc_warning_$option]) | |
144 | + AC_CACHE_CHECK([whether $CXX supports $option], acx_Woption, | |
145 | + [CXXFLAGS="$option" | |
146 | + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], | |
147 | + [AS_VAR_SET(acx_Woption, yes)], | |
148 | + [AS_VAR_SET(acx_Woption, no)]) | |
149 | + ]) | |
150 | + AS_IF([test AS_VAR_GET(acx_Woption) = yes], | |
151 | + [acx_Var="$acx_Var${acx_Var:+ }$real_option"]) | |
152 | + AS_VAR_POPDEF([acx_Woption])dnl | |
153 | +done | |
154 | +CXXFLAGS="$save_CXXFLAGS" | |
155 | +m4_popdef([acx_Var])dnl | |
156 | +AC_LANG_POP(C++) | |
157 | +])# ACX_PROG_CXX_WARNING_OPTS | |
158 | + | |
159 | +# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC]) | |
160 | +# Append to VARIABLE "-pedantic" + the argument, if the compiler is G++ | |
161 | +# and accepts all of those options simultaneously, otherwise to nothing. | |
162 | +AC_DEFUN([ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC], | |
163 | +[AC_REQUIRE([AC_PROG_CXX])dnl | |
164 | +AC_LANG_PUSH(C++) | |
165 | +m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl | |
166 | +AC_SUBST(acx_Var)dnl | |
167 | +m4_expand_once([acx_Var= | |
168 | +],m4_quote(acx_Var=))dnl | |
169 | +# Do the check with the no- prefix removed from the warning options | |
170 | +# since gcc silently accepts any -Wno-* option on purpose | |
171 | +m4_pushdef([acx_Woptions], [m4_bpatsubst([$1], [-Wno-], [-W])])dnl | |
172 | +AS_VAR_PUSHDEF([acx_Pedantic], [acx_cv_prog_cc_pedantic_]acx_Woptions)dnl | |
173 | +AS_IF([test "$GXX" = yes], | |
174 | +[AC_CACHE_CHECK([whether $CXX supports -pedantic ]acx_Woptions, acx_Pedantic, | |
175 | +[save_CXXFLAGS="$CXXFLAGS" | |
176 | +CXXFLAGS="-pedantic acx_Woptions" | |
177 | +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], | |
178 | + [AS_VAR_SET(acx_Pedantic, yes)], | |
179 | + [AS_VAR_SET(acx_Pedantic, no)]) | |
180 | +CXXFLAGS="$save_CXXFLAGS"]) | |
181 | +AS_IF([test AS_VAR_GET(acx_Pedantic) = yes], | |
182 | + [acx_Var="$acx_Var${acx_Var:+ }-pedantic $1"]) | |
183 | +]) | |
184 | +AS_VAR_POPDEF([acx_Pedantic])dnl | |
185 | +m4_popdef([acx_Woptions])dnl | |
186 | +m4_popdef([acx_Var])dnl | |
187 | +AC_LANG_POP(C++) | |
188 | +])# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC | |
189 | + | |
190 | +# ACX_PROG_CXX_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR]) | |
191 | +# sets @VARIABLE@ to "-Werror" if the compiler is G++ >=x.y.z, or if | |
192 | +# --enable-werror-always was given on the command line, otherwise | |
193 | +# to nothing. | |
194 | +# If the argument is the word "manual" instead of a version number, | |
195 | +# then @VARIABLE@ will be set to -Werror only if --enable-werror-always | |
196 | +# appeared on the configure command line. | |
197 | +AC_DEFUN([ACX_PROG_CXX_WARNINGS_ARE_ERRORS], | |
198 | +[AC_REQUIRE([AC_PROG_CXX])dnl | |
199 | +AC_LANG_PUSH(C++) | |
200 | +m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl | |
201 | +AC_SUBST(acx_Var)dnl | |
202 | +m4_expand_once([acx_Var= | |
203 | +],m4_quote(acx_Var=))dnl | |
204 | +AC_ARG_ENABLE(werror-always, | |
205 | + AS_HELP_STRING([--enable-werror-always], | |
206 | + [enable -Werror despite compiler version]), | |
207 | +[], [enable_werror_always=no]) | |
208 | +AS_IF([test $enable_werror_always = yes], | |
209 | + [acx_Var="$acx_Var${acx_Var:+ }-Werror"]) | |
210 | + m4_if($1, [manual],, | |
211 | + [AS_VAR_PUSHDEF([acx_GXXvers], [acx_cv_prog_cxx_gxx_$1_or_newer])dnl | |
212 | + AC_CACHE_CHECK([whether $CXX is G++ >=$1], acx_GXXvers, | |
213 | + [set fnord `echo $1 | tr '.' ' '` | |
214 | + shift | |
215 | + AC_PREPROC_IFELSE( | |
216 | +[#if __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ \ | |
217 | + < [$]1 * 10000 + [$]2 * 100 + [$]3 | |
218 | +#error insufficient | |
219 | +#endif], | |
220 | + [AS_VAR_SET(acx_GXXvers, yes)], | |
221 | + [AS_VAR_SET(acx_GXXvers, no)])]) | |
222 | + AS_IF([test AS_VAR_GET(acx_GXXvers) = yes], | |
223 | + [acx_Var="$acx_Var${acx_Var:+ }-Werror"]) | |
224 | + AS_VAR_POPDEF([acx_GXXvers])]) | |
225 | +m4_popdef([acx_Var])dnl | |
226 | +AC_LANG_POP(C++) | |
227 | +])# ACX_PROG_CXX_WARNINGS_ARE_ERRORS |
@@ -1,3 +1,7 @@ | ||
1 | +2015-07-14 H.J. Lu <hongjiu.lu@intel.com> | |
2 | + | |
3 | + * configure: Regenerated. | |
4 | + | |
1 | 5 | 2015-06-30 H.J. Lu <hongjiu.lu@intel.com> |
2 | 6 | |
3 | 7 | * configure: Regenerated. |
@@ -3272,6 +3272,12 @@ test -n "$AUTOHEADER" || AUTOHEADER="$MISSING autoheader" | ||
3272 | 3272 | # See config/warnings.m4 for details. |
3273 | 3273 | |
3274 | 3274 | |
3275 | +ac_ext=c | |
3276 | +ac_cpp='$CPP $CPPFLAGS' | |
3277 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3278 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3279 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3280 | + | |
3275 | 3281 | WARN_CFLAGS= |
3276 | 3282 | save_CFLAGS="$CFLAGS" |
3277 | 3283 | for real_option in -W -Wall -Wwrite-strings -Wstrict-prototypes \ |
@@ -3318,6 +3324,18 @@ $as_echo "$ac_res" >&6; } | ||
3318 | 3324 | fi |
3319 | 3325 | done |
3320 | 3326 | CFLAGS="$save_CFLAGS" |
3327 | +ac_ext=c | |
3328 | +ac_cpp='$CPP $CPPFLAGS' | |
3329 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3330 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3331 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3332 | + | |
3333 | + | |
3334 | +ac_ext=c | |
3335 | +ac_cpp='$CPP $CPPFLAGS' | |
3336 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3337 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3338 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3321 | 3339 | |
3322 | 3340 | WARN_PEDANTIC= |
3323 | 3341 | # Do the check with the no- prefix removed from the warning options |
@@ -3356,10 +3374,22 @@ if test $acx_cv_prog_cc_pedantic__Wlong_long = yes; then : | ||
3356 | 3374 | fi |
3357 | 3375 | |
3358 | 3376 | fi |
3377 | +ac_ext=c | |
3378 | +ac_cpp='$CPP $CPPFLAGS' | |
3379 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3380 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3381 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3382 | + | |
3359 | 3383 | |
3360 | 3384 | |
3361 | 3385 | # Only enable with --enable-werror-always until existing warnings are |
3362 | 3386 | # corrected. |
3387 | +ac_ext=c | |
3388 | +ac_cpp='$CPP $CPPFLAGS' | |
3389 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3390 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3391 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3392 | + | |
3363 | 3393 | WERROR= |
3364 | 3394 | # Check whether --enable-werror-always was given. |
3365 | 3395 | if test "${enable_werror_always+set}" = set; then : |
@@ -3372,6 +3402,12 @@ if test $enable_werror_always = yes; then : | ||
3372 | 3402 | WERROR="$WERROR${WERROR:+ }-Werror" |
3373 | 3403 | fi |
3374 | 3404 | |
3405 | +ac_ext=c | |
3406 | +ac_cpp='$CPP $CPPFLAGS' | |
3407 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3408 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3409 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3410 | + | |
3375 | 3411 | |
3376 | 3412 | |
3377 | 3413 | # Checks for header files. |
@@ -1,3 +1,7 @@ | ||
1 | +2015-07-14 H.J. Lu <hongjiu.lu@intel.com> | |
2 | + | |
3 | + * configure: Regenerated. | |
4 | + | |
1 | 5 | 2015-06-01 Jason Merrill <jason@redhat.com> |
2 | 6 | |
3 | 7 | * cp-demangle.c (cplus_demangle_type): Handle arguments to vendor |
@@ -4389,6 +4389,12 @@ fi | ||
4389 | 4389 | |
4390 | 4390 | ac_c_preproc_warn_flag=yes |
4391 | 4391 | |
4392 | +ac_ext=c | |
4393 | +ac_cpp='$CPP $CPPFLAGS' | |
4394 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4395 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4396 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4397 | + | |
4392 | 4398 | ac_libiberty_warn_cflags= |
4393 | 4399 | save_CFLAGS="$CFLAGS" |
4394 | 4400 | for real_option in -W -Wall -Wwrite-strings -Wc++-compat \ |
@@ -4434,6 +4440,18 @@ $as_echo "$ac_res" >&6; } | ||
4434 | 4440 | fi |
4435 | 4441 | done |
4436 | 4442 | CFLAGS="$save_CFLAGS" |
4443 | +ac_ext=c | |
4444 | +ac_cpp='$CPP $CPPFLAGS' | |
4445 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4446 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4447 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4448 | + | |
4449 | + | |
4450 | +ac_ext=c | |
4451 | +ac_cpp='$CPP $CPPFLAGS' | |
4452 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4453 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4454 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4437 | 4455 | |
4438 | 4456 | # Do the check with the no- prefix removed from the warning options |
4439 | 4457 | # since gcc silently accepts any -Wno-* option on purpose |
@@ -4471,6 +4489,12 @@ if test $acx_cv_prog_cc_pedantic_ = yes; then : | ||
4471 | 4489 | fi |
4472 | 4490 | |
4473 | 4491 | fi |
4492 | +ac_ext=c | |
4493 | +ac_cpp='$CPP $CPPFLAGS' | |
4494 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4495 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4496 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4497 | + | |
4474 | 4498 | |
4475 | 4499 | |
4476 | 4500 | if test "x$CC" != xcc; then |
@@ -1,3 +1,7 @@ | ||
1 | +2015-07-14 H.J. Lu <hongjiu.lu@intel.com> | |
2 | + | |
3 | + * configure: Regenerated. | |
4 | + | |
1 | 5 | 2015-07-03 Alan Modra <amodra@gmail.com> |
2 | 6 | |
3 | 7 | * ppc-opc.c (PPC750, PPC7450, PPC860): Define using PPC_OPCODE_*. |
@@ -11576,6 +11576,12 @@ fi | ||
11576 | 11576 | |
11577 | 11577 | |
11578 | 11578 | |
11579 | +ac_ext=c | |
11580 | +ac_cpp='$CPP $CPPFLAGS' | |
11581 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
11582 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
11583 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
11584 | + | |
11579 | 11585 | NO_WMISSING_FIELD_INITIALIZERS= |
11580 | 11586 | save_CFLAGS="$CFLAGS" |
11581 | 11587 | for real_option in -Wno-missing-field-initializers; do |
@@ -11620,6 +11626,12 @@ $as_echo "$ac_res" >&6; } | ||
11620 | 11626 | fi |
11621 | 11627 | done |
11622 | 11628 | CFLAGS="$save_CFLAGS" |
11629 | +ac_ext=c | |
11630 | +ac_cpp='$CPP $CPPFLAGS' | |
11631 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
11632 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
11633 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
11634 | + | |
11623 | 11635 | |
11624 | 11636 | |
11625 | 11637 | ac_config_headers="$ac_config_headers config.h:config.in" |