mirror of git://sourceware.org/git/glibc.git
configure: Use -Wno-maybe-uninitialized iff compiler supports it
clang does not support the flag.
This commit is contained in:
parent
dc0261830b
commit
05697f4402
|
@ -7557,6 +7557,32 @@ config_vars="$config_vars
|
|||
config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
|
||||
printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
|
||||
if test ${libc_cv_wno_maybe_uninitialized+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else case e in #(
|
||||
e) if { ac_try='${CC-cc} -Werror -Wno-maybe-uninitialized -xc /dev/null -S -o /dev/null'
|
||||
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; }
|
||||
then :
|
||||
libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized
|
||||
else case e in #(
|
||||
e) libc_cv_wno_maybe_uninitialized= ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
|
||||
printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
|
||||
config_vars="$config_vars
|
||||
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
|
||||
printf %s "checking whether cc puts quotes around section names... " >&6; }
|
||||
if test ${libc_cv_have_section_quotes+y}
|
||||
|
|
|
@ -1425,6 +1425,15 @@ LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
|
|||
[$libc_cv_wno_ignored_attributes])
|
||||
AC_SUBST(libc_cv_test_wno_ignored_attributes)
|
||||
|
||||
AC_CACHE_CHECK([for -Wno-maybe-uninitialized],
|
||||
libc_cv_wno_maybe_uninitialized, [dnl
|
||||
LIBC_TRY_CC_OPTION([-Werror -Wno-maybe-uninitialized],
|
||||
[libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized],
|
||||
[libc_cv_wno_maybe_uninitialized=])
|
||||
])
|
||||
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
|
||||
[$libc_cv_wno_maybe_uninitialized])
|
||||
|
||||
AC_CACHE_CHECK(whether cc puts quotes around section names,
|
||||
libc_cv_have_section_quotes,
|
||||
[cat > conftest.c <<EOF
|
||||
|
|
|
@ -68,7 +68,7 @@ tz-cflags = -DTZDIR='"$(zonedir)"' \
|
|||
-DTZDEFRULES='"$(posixrules-file)"' \
|
||||
-DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone \
|
||||
-DHAVE_GETTEXT -DUSE_LTZ=0 -D_ISOMAC -DTZ_DOMAIN='"libc"' \
|
||||
-include $(common-objpfx)config.h -Wno-maybe-uninitialized
|
||||
-include $(common-objpfx)config.h $(config-cflags-wno-maybe-uninitialized)
|
||||
|
||||
# The -Wno-unused-variable flag is used to prevent GCC 6
|
||||
# from warning about time_t_min and time_t_max which are
|
||||
|
|
Loading…
Reference in New Issue