diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-03-29 23:54:01 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-04-08 09:08:16 +0200 |
commit | 38c3017f257484a6739e2fba821d95794f7f175c (patch) | |
tree | 0533df94a36e00c17f59d19a51782eeb690aae35 /libphobos | |
parent | 845d451e1f73d8a9a84382c3c6d4fca9c8220403 (diff) | |
download | gcc-38c3017f257484a6739e2fba821d95794f7f175c.tar.gz |
libphobos: Always build with warning flags enabled
This moves WARN_DFLAGS from GDCFLAGS to AM_DFLAGS so it is always
included in the build and testsuite of libphobos. Currently, this
doesn't happen as GDCFLAGS is overriden by it being set at the
top-level.
libphobos/ChangeLog:
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Substite WARN_DFLAGS independently of GDCFLAGS.
* libdruntime/Makefile.am: Add WARN_DFLAGS to AM_DFLAGS.
* libdruntime/Makefile.in: Regenerate.
* src/Makefile.am: Add WARN_DFLAGS to AM_DFLAGS.
* src/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* testsuite/testsuite_flags.in: Add WARN_DFLAGS to --gdcflags.
Diffstat (limited to 'libphobos')
-rw-r--r-- | libphobos/ChangeLog | 12 | ||||
-rw-r--r-- | libphobos/Makefile.in | 1 | ||||
-rwxr-xr-x | libphobos/configure | 12 | ||||
-rw-r--r-- | libphobos/configure.ac | 7 | ||||
-rw-r--r-- | libphobos/libdruntime/Makefile.am | 4 | ||||
-rw-r--r-- | libphobos/libdruntime/Makefile.in | 6 | ||||
-rw-r--r-- | libphobos/src/Makefile.am | 4 | ||||
-rw-r--r-- | libphobos/src/Makefile.in | 6 | ||||
-rw-r--r-- | libphobos/testsuite/Makefile.in | 1 | ||||
-rwxr-xr-x | libphobos/testsuite/testsuite_flags.in | 2 |
10 files changed, 44 insertions, 11 deletions
diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog index 86468e15029..a67f2283533 100644 --- a/libphobos/ChangeLog +++ b/libphobos/ChangeLog @@ -1,3 +1,15 @@ +2020-04-08 Iain Buclaw <ibuclaw@gdcproject.org> + + * Makefile.in: Regenerate. + * configure: Regenerate. + * configure.ac: Substite WARN_DFLAGS independently of GDCFLAGS. + * libdruntime/Makefile.am: Add WARN_DFLAGS to AM_DFLAGS. + * libdruntime/Makefile.in: Regenerate. + * src/Makefile.am: Add WARN_DFLAGS to AM_DFLAGS. + * src/Makefile.in: Regenerate. + * testsuite/Makefile.in: Regenerate. + * testsuite/testsuite_flags.in: Add WARN_DFLAGS to --gdcflags. + 2020-04-07 Robin Dapp <rdapp@linux.ibm.com> Stefan Liebler <stli@linux.ibm.com> diff --git a/libphobos/Makefile.in b/libphobos/Makefile.in index 6a774e96126..98d35641a95 100644 --- a/libphobos/Makefile.in +++ b/libphobos/Makefile.in @@ -272,6 +272,7 @@ SHELL = @SHELL@ SPEC_PHOBOS_DEPS = @SPEC_PHOBOS_DEPS@ STRIP = @STRIP@ VERSION = @VERSION@ +WARN_DFLAGS = @WARN_DFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/libphobos/configure b/libphobos/configure index 04a6e6aeb0f..65e32d88f45 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -633,6 +633,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +WARN_DFLAGS GDCFLAGSX libtool_VERSION SPEC_PHOBOS_DEPS @@ -11648,7 +11649,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11651 "configure" +#line 11652 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11754,7 +11755,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11757 "configure" +#line 11758 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15390,15 +15391,18 @@ libtool_VERSION=1:0:0 # Set default flags (after DRUNTIME_WERROR!) if test -z "$GDCFLAGS"; then - GDCFLAGS="-Wall $WERROR_FLAG -g -frelease -O2" + GDCFLAGS="-g -frelease -O2" fi if test -z "$GDCFLAGSX"; then - GDCFLAGSX="-Wall $WERROR_FLAG -g -fno-release -funittest" + GDCFLAGSX="-g -fno-release -funittest" fi +WARN_DFLAGS="-Wall $WERROR_FLAG" + + # Sanity check for the cross-compilation case: ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : diff --git a/libphobos/configure.ac b/libphobos/configure.ac index 69c635f405b..09e334d2045 100644 --- a/libphobos/configure.ac +++ b/libphobos/configure.ac @@ -206,15 +206,18 @@ AC_SUBST(libtool_VERSION) # Set default flags (after DRUNTIME_WERROR!) if test -z "$GDCFLAGS"; then - GDCFLAGS="-Wall $WERROR_FLAG -g -frelease -O2" + GDCFLAGS="-g -frelease -O2" fi AC_SUBST(GDCFLAGS) if test -z "$GDCFLAGSX"; then - GDCFLAGSX="-Wall $WERROR_FLAG -g -fno-release -funittest" + GDCFLAGSX="-g -fno-release -funittest" fi AC_SUBST(GDCFLAGSX) +WARN_DFLAGS="-Wall $WERROR_FLAG" +AC_SUBST(WARN_DFLAGS) + # Sanity check for the cross-compilation case: AC_CHECK_HEADER(stdio.h,:, [AC_MSG_ERROR([cannot find stdio.h.])]) diff --git a/libphobos/libdruntime/Makefile.am b/libphobos/libdruntime/Makefile.am index b6f43299064..b7e4575e0f1 100644 --- a/libphobos/libdruntime/Makefile.am +++ b/libphobos/libdruntime/Makefile.am @@ -22,7 +22,9 @@ include $(top_srcdir)/d_rules.am D_EXTRA_DFLAGS=-nostdinc -I $(srcdir) -I . # D flags for compilation -AM_DFLAGS=$(phobos_compiler_pic_flag) +AM_DFLAGS= \ + $(phobos_compiler_pic_flag) \ + $(WARN_DFLAGS) # Install all D and DI files ALL_DRUNTIME_INSTALL_DSOURCES = $(DRUNTIME_DSOURCES) \ diff --git a/libphobos/libdruntime/Makefile.in b/libphobos/libdruntime/Makefile.in index cbbe6298537..61dd0d496e3 100644 --- a/libphobos/libdruntime/Makefile.in +++ b/libphobos/libdruntime/Makefile.in @@ -620,6 +620,7 @@ SHELL = @SHELL@ SPEC_PHOBOS_DEPS = @SPEC_PHOBOS_DEPS@ STRIP = @STRIP@ VERSION = @VERSION@ +WARN_DFLAGS = @WARN_DFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -712,7 +713,10 @@ libgphobos_la_LINK = $(LIBTOOL) --tag=D $(libgphobos_la_LIBTOOLFLAGS) \ D_EXTRA_DFLAGS = -nostdinc -I $(srcdir) -I . # D flags for compilation -AM_DFLAGS = $(phobos_compiler_pic_flag) +AM_DFLAGS = \ + $(phobos_compiler_pic_flag) \ + $(WARN_DFLAGS) + # Install all D and DI files ALL_DRUNTIME_INSTALL_DSOURCES = $(DRUNTIME_DSOURCES) \ diff --git a/libphobos/src/Makefile.am b/libphobos/src/Makefile.am index 764e225ff3d..5c17538613a 100644 --- a/libphobos/src/Makefile.am +++ b/libphobos/src/Makefile.am @@ -23,7 +23,9 @@ D_EXTRA_DFLAGS=-nostdinc -I $(srcdir) \ -I $(top_srcdir)/libdruntime -I ../libdruntime -I . # D flags for compilation -AM_DFLAGS=$(phobos_compiler_pic_flag) +AM_DFLAGS= \ + $(phobos_compiler_pic_flag) \ + $(WARN_DFLAGS) # Install all D files ALL_PHOBOS_INSTALL_DSOURCES = $(PHOBOS_DSOURCES) diff --git a/libphobos/src/Makefile.in b/libphobos/src/Makefile.in index c30b66d086c..e58dafb5e7c 100644 --- a/libphobos/src/Makefile.in +++ b/libphobos/src/Makefile.in @@ -343,6 +343,7 @@ SHELL = @SHELL@ SPEC_PHOBOS_DEPS = @SPEC_PHOBOS_DEPS@ STRIP = @STRIP@ VERSION = @VERSION@ +WARN_DFLAGS = @WARN_DFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -437,7 +438,10 @@ D_EXTRA_DFLAGS = -nostdinc -I $(srcdir) \ # D flags for compilation -AM_DFLAGS = $(phobos_compiler_pic_flag) +AM_DFLAGS = \ + $(phobos_compiler_pic_flag) \ + $(WARN_DFLAGS) + # Install all D files ALL_PHOBOS_INSTALL_DSOURCES = $(PHOBOS_DSOURCES) diff --git a/libphobos/testsuite/Makefile.in b/libphobos/testsuite/Makefile.in index 72e6d04793b..b70a996d95d 100644 --- a/libphobos/testsuite/Makefile.in +++ b/libphobos/testsuite/Makefile.in @@ -216,6 +216,7 @@ SHELL = @SHELL@ SPEC_PHOBOS_DEPS = @SPEC_PHOBOS_DEPS@ STRIP = @STRIP@ VERSION = @VERSION@ +WARN_DFLAGS = @WARN_DFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/libphobos/testsuite/testsuite_flags.in b/libphobos/testsuite/testsuite_flags.in index fa57de27a5a..990221a3d0f 100755 --- a/libphobos/testsuite/testsuite_flags.in +++ b/libphobos/testsuite/testsuite_flags.in @@ -28,7 +28,7 @@ case ${query} in ;; --gdcflags) GDCFLAGS_default="-fmessage-length=0 -fno-show-column" - GDCFLAGS_config="@GDCFLAGSX@" + GDCFLAGS_config="@WARN_DFLAGS@ @GDCFLAGSX@" echo ${GDCFLAGS_default} ${GDCFLAGS_config} ;; --gdcpaths) |