summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-06-05 17:12:06 -0700
committerGitHub <noreply@github.com>2018-06-05 17:12:06 -0700
commitd6e789c402330905b1bd9103538d1027fcfb08a4 (patch)
tree50c7a2503483ee9a88bac98e8ef9f4749a48dd0f /configure
parente135032ffa08ad66caea8205488e037da85d2bf8 (diff)
downloadcpython-git-d6e789c402330905b1bd9103538d1027fcfb08a4.tar.gz
bpo-5755: Move -Wstrict-prototypes to CFLAGS_NODIST (GH-7395)
(cherry picked from commit e33648484775fa533fc8f1e5cc45f60061d29d54) Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure46
1 files changed, 41 insertions, 5 deletions
diff --git a/configure b/configure
index fc70866aa0..5a2afe57f5 100755
--- a/configure
+++ b/configure
@@ -6731,9 +6731,6 @@ if test "${OPT-unset}" = "unset"
then
case $GCC in
yes)
- if test "$CC" != 'g++' ; then
- STRICT_PROTO="-Wstrict-prototypes"
- fi
# For gcc 4.x we need to use -fwrapv so lets check if its supported
if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
WRAP="-fwrapv"
@@ -6780,8 +6777,6 @@ then
;;
esac
- OPT="$OPT $STRICT_PROTO"
-
case $ac_sys_system in
SCO_SV*) OPT="$OPT -m486 -DSCO5"
;;
@@ -7190,6 +7185,47 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
+$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
+ ac_save_cc="$CC"
+ CC="$CC -Werror -Wstrict-prototypes"
+ if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ ac_cv_enable_strict_prototypes_warning=yes
+
+else
+
+ ac_cv_enable_strict_prototypes_warning=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ CC="$ac_save_cc"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
+$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
+
+ if test $ac_cv_enable_strict_prototypes_warning = yes
+ then
+ CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
ac_save_cc="$CC"