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.
This commit is contained in:
Iain Buclaw 2020-03-29 23:54:01 +02:00
parent 845d451e1f
commit 38c3017f25
10 changed files with 44 additions and 11 deletions

View 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>

View 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@

12
libphobos/configure vendored
View File

@ -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 :

View 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.])])

View 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) \

View 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) \

View 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)

View 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)

View 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@

View File

@ -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)