aboutsummaryrefslogtreecommitdiff
path: root/libphobos/testsuite
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2021-03-26 15:46:24 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2021-03-26 16:14:32 +0100
commitfdfcb5353cc2b06fc80205cfcb3bc5ba25556264 (patch)
tree1ebb7f503eb0a4de98c3da2bdb0c41e76816843d /libphobos/testsuite
parent8f5e18db259c8a9790feb1d73bb0348182264f15 (diff)
downloadgcc-fdfcb5353cc2b06fc80205cfcb3bc5ba25556264.zip
gcc-fdfcb5353cc2b06fc80205cfcb3bc5ba25556264.tar.gz
gcc-fdfcb5353cc2b06fc80205cfcb3bc5ba25556264.tar.bz2
libphobos: Build all modules with -fversion=Shared when configured with --enable-shared
The libgdruntime_convenience library was built with `-fversion=Shared', but the libphobos part wasn't when creating the static library. As there are no issues compiling in Shared code into the static library, to avoid mismatches the flag is now always present when --enable-shared is turned on. Libtool's compiler PIC D flag is now the combination of compiler PIC and D Shared flags, and AM_DFLAGS passes `-prefer-pic' to libtool unless --enable-shared is turned off. libphobos/ChangeLog: * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Substitute enable_shared, enable_static, and phobos_lt_pic_flag. * libdruntime/Makefile.am (AM_DFLAGS): Replace phobos_compiler_pic_flag with phobos_lt_pic_flags, and phobos_compiler_shared_flag. * libdruntime/Makefile.in: Regenerate. * src/Makefile.am (AM_DFLAGS): Replace phobos_compiler_pic_flag with phobos_lt_pic_flag, and phobos_compiler_shared_flag. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * testsuite/libphobos.druntime_shared/druntime_shared.exp: Remove -fversion=Shared and -fno-moduleinfo from default extra test flags. * testsuite/libphobos.phobos_shared/phobos_shared.exp: Likewise. * testsuite/testsuite_flags.in: Add phobos_compiler_shared_flag to --gdcflags.
Diffstat (limited to 'libphobos/testsuite')
-rw-r--r--libphobos/testsuite/Makefile.in3
-rw-r--r--libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp4
-rw-r--r--libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp4
-rwxr-xr-xlibphobos/testsuite/testsuite_flags.in3
4 files changed, 9 insertions, 5 deletions
diff --git a/libphobos/testsuite/Makefile.in b/libphobos/testsuite/Makefile.in
index c38a468..51eb4ef 100644
--- a/libphobos/testsuite/Makefile.in
+++ b/libphobos/testsuite/Makefile.in
@@ -242,6 +242,8 @@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
exec_prefix = @exec_prefix@
gcc_version = @gcc_version@
gdc_include_dir = @gdc_include_dir@
@@ -271,6 +273,7 @@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
phobos_compiler_pic_flag = @phobos_compiler_pic_flag@
phobos_compiler_shared_flag = @phobos_compiler_shared_flag@
+phobos_lt_pic_flag = @phobos_lt_pic_flag@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
diff --git a/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp b/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp
index 6ca62a3..2b25613 100644
--- a/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp
+++ b/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp
@@ -34,8 +34,8 @@ dg-init
# Main loop.
foreach test $tests {
set libphobos_test_name "$subdir/[dg-trim-dirname $srcdir/../libdruntime $test]"
- dg-runtest $test "-fversion=Shared -shared-libphobos" \
- "-fmain -fbuilding-libphobos-tests -fno-moduleinfo $version_flags"
+ dg-runtest $test "-shared-libphobos" \
+ "-fmain -fbuilding-libphobos-tests $version_flags"
set libphobos_test_name ""
}
diff --git a/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp b/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp
index da31304..3a847e7 100644
--- a/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp
+++ b/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp
@@ -45,8 +45,8 @@ dg-init
# Main loop.
foreach test $tests {
set libphobos_test_name "$subdir/[dg-trim-dirname $srcdir/../src $test]"
- dg-runtest $test "-fversion=Shared -shared-libphobos" \
- "-fmain -fbuilding-libphobos-tests -fno-moduleinfo $version_flags"
+ dg-runtest $test "-shared-libphobos" \
+ "-fmain -fbuilding-libphobos-tests $version_flags"
set libphobos_test_name ""
}
diff --git a/libphobos/testsuite/testsuite_flags.in b/libphobos/testsuite/testsuite_flags.in
index 6a2d79f..bafd5ad4 100755
--- a/libphobos/testsuite/testsuite_flags.in
+++ b/libphobos/testsuite/testsuite_flags.in
@@ -28,7 +28,8 @@ case ${query} in
;;
--gdcflags)
GDCFLAGS_default="-fmessage-length=0 -fno-show-column"
- GDCFLAGS_config="@WARN_DFLAGS@ @GDCFLAGS@ @CET_DFLAGS@ -fno-release -funittest"
+ GDCFLAGS_config="@WARN_DFLAGS@ @GDCFLAGS@ @CET_DFLAGS@
+ @phobos_compiler_shared_flag@ -fno-release -funittest"
echo ${GDCFLAGS_default} ${GDCFLAGS_config}
;;
--gdcpaths)