libphobos: Always build with warning flags enabled
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 29 Mar 2020 21:54:01 +0000 (23:54 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Wed, 8 Apr 2020 07:08:16 +0000 (09:08 +0200)
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.

libphobos/ChangeLog
libphobos/Makefile.in
libphobos/configure
libphobos/configure.ac
libphobos/libdruntime/Makefile.am
libphobos/libdruntime/Makefile.in
libphobos/src/Makefile.am
libphobos/src/Makefile.in
libphobos/testsuite/Makefile.in
libphobos/testsuite/testsuite_flags.in

index 86468e150290b69a726889eec65577d071e235cf..a67f2283533a371a1ef898ca9450a6af183e2b51 100644 (file)
@@ -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>
 
index 6a774e96126991ac37da86eff1e4761f9eefc6f8..98d35641a95ab2460660a4d8d7a38b31e6739395 100644 (file)
@@ -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@
index 04a6e6aeb0fabd303b6954cfa1cef1f9329e82ed..65e32d88f4568b34a9466f0ffd0e0a3f89ced99b 100755 (executable)
@@ -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 :
index 69c635f405bedc79fcf9daed0ac1a20f4ef93cf7..09e334d2045a27cb9bf81e977e3a62b6fdc8c6da 100644 (file)
@@ -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.])])
index b6f4329906419a0f32d346a2a16c9ec054e4e975..b7e4575e0f1698cc8a86bf0ee3e27d8231737e50 100644 (file)
@@ -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) \
index cbbe6298537fcab7c0525b98829348f9724eb41b..61dd0d496e3f58d81d6719bf0bdd808ce6b35a70 100644 (file)
@@ -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) \
index 764e225ff3db958c0aad84783459de094526d345..5c17538613a095d881ee9b4cb65ece4536526c68 100644 (file)
@@ -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)
index c30b66d086c907725d8c12b07f22aa4c05350368..e58dafb5e7c11070912001a20846b12b34dcf083 100644 (file)
@@ -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)
index 72e6d04793b305a1441fc85def9fe133a37f4a65..b70a996d95d3b4744de19f5d6c3fdff6c0d163a1 100644 (file)
@@ -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@
index fa57de27a5a3e29b5518323fa712bf26e719675a..990221a3d0f1ef34100178328bc978a7f626807d 100755 (executable)
@@ -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)