aboutsummaryrefslogtreecommitdiff
path: root/libphobos/src
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/src
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/src')
-rw-r--r--libphobos/src/Makefile.am2
-rw-r--r--libphobos/src/Makefile.in5
2 files changed, 5 insertions, 2 deletions
diff --git a/libphobos/src/Makefile.am b/libphobos/src/Makefile.am
index 2de8ab9..0dc2a26 100644
--- a/libphobos/src/Makefile.am
+++ b/libphobos/src/Makefile.am
@@ -24,7 +24,7 @@ D_EXTRA_DFLAGS=-nostdinc -I $(srcdir) \
# D flags for compilation
AM_DFLAGS= \
- $(phobos_compiler_pic_flag) \
+ $(phobos_lt_pic_flag) $(phobos_compiler_shared_flag) \
$(WARN_DFLAGS) $(CHECKING_DFLAGS) $(CET_DFLAGS)
# Flags for other kinds of sources
diff --git a/libphobos/src/Makefile.in b/libphobos/src/Makefile.in
index 2e72178..3345351 100644
--- a/libphobos/src/Makefile.in
+++ b/libphobos/src/Makefile.in
@@ -414,6 +414,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@
@@ -443,6 +445,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@
@@ -477,7 +480,7 @@ D_EXTRA_DFLAGS = -nostdinc -I $(srcdir) \
# D flags for compilation
AM_DFLAGS = \
- $(phobos_compiler_pic_flag) \
+ $(phobos_lt_pic_flag) $(phobos_compiler_shared_flag) \
$(WARN_DFLAGS) $(CHECKING_DFLAGS) $(CET_DFLAGS)