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@
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@
get_gcc_base_ver
phobos_compiler_shared_flag
phobos_compiler_pic_flag
+phobos_lt_pic_flag
+enable_static
+enable_shared
OTOOL64
OTOOL
LIPO
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11749 "configure"
+#line 11752 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11855 "configure"
+#line 11858 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
GDCFLAGS=$gdc_save_DFLAGS
+
+
# libtool variables for Phobos shared and position-independent compiles.
#
+# Use phobos_lt_pic_flag to designate the automake variable
+# used to encapsulate the default libtool approach to creating objects
+# with position-independent code. Default: -prefer-pic.
+#
# Use phobos_compiler_shared_flag to designate the compile-time flags for
# creating shared objects. Default: -fversion=Shared.
#
# libtool, and so we make it here. How it is handled is that in shared
# compilations the `lt_prog_compiler_pic_D' variable is used to instead
# ensure that conditional compilation of shared runtime code is compiled in.
-# The original PIC flags are then used in the compilation of every object.
-#
-# Why are objects destined for libgphobos.a compiled with -fPIC?
-# Because -fPIC is not harmful to use for objects destined for static
-# libraries. In addition, using -fPIC will allow the use of static
-# libgphobos.a in the creation of other D shared libraries.
if test "$enable_shared" = yes; then
+ phobos_lt_pic_flag="-prefer-pic"
phobos_compiler_pic_flag="$lt_prog_compiler_pic_D"
phobos_compiler_shared_flag="-fversion=Shared"
else
+ phobos_lt_pic_flag=
phobos_compiler_pic_flag=
phobos_compiler_shared_flag=
fi
+
# Override the libtool's pic_flag and pic_mode.
# Do this step after AM_PROG_LIBTOOL, but before AC_OUTPUT.
# NB: this impacts --with-pic and --without-pic.
-lt_prog_compiler_pic_D="$phobos_compiler_shared_flag"
+lt_prog_compiler_pic_D="$phobos_compiler_pic_flag $phobos_compiler_shared_flag"
pic_mode='default'
# Determine what GCC version number to use in filesystem paths.
LT_INIT(dlopen)
AM_PROG_LIBTOOL
WITH_LOCAL_DRUNTIME([LT_LANG([D])], [])
+AC_SUBST(enable_shared)
+AC_SUBST(enable_static)
# libtool variables for Phobos shared and position-independent compiles.
#
+# Use phobos_lt_pic_flag to designate the automake variable
+# used to encapsulate the default libtool approach to creating objects
+# with position-independent code. Default: -prefer-pic.
+#
# Use phobos_compiler_shared_flag to designate the compile-time flags for
# creating shared objects. Default: -fversion=Shared.
#
# libtool, and so we make it here. How it is handled is that in shared
# compilations the `lt_prog_compiler_pic_D' variable is used to instead
# ensure that conditional compilation of shared runtime code is compiled in.
-# The original PIC flags are then used in the compilation of every object.
-#
-# Why are objects destined for libgphobos.a compiled with -fPIC?
-# Because -fPIC is not harmful to use for objects destined for static
-# libraries. In addition, using -fPIC will allow the use of static
-# libgphobos.a in the creation of other D shared libraries.
if test "$enable_shared" = yes; then
+ phobos_lt_pic_flag="-prefer-pic"
phobos_compiler_pic_flag="$lt_prog_compiler_pic_D"
phobos_compiler_shared_flag="-fversion=Shared"
else
+ phobos_lt_pic_flag=
phobos_compiler_pic_flag=
phobos_compiler_shared_flag=
fi
+AC_SUBST(phobos_lt_pic_flag)
AC_SUBST(phobos_compiler_pic_flag)
AC_SUBST(phobos_compiler_shared_flag)
# Override the libtool's pic_flag and pic_mode.
# Do this step after AM_PROG_LIBTOOL, but before AC_OUTPUT.
# NB: this impacts --with-pic and --without-pic.
-lt_prog_compiler_pic_D="$phobos_compiler_shared_flag"
+lt_prog_compiler_pic_D="$phobos_compiler_pic_flag $phobos_compiler_shared_flag"
pic_mode='default'
# Determine what GCC version number to use in filesystem paths.
# 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
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@
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@
# D flags for compilation
AM_DFLAGS = \
- $(phobos_compiler_pic_flag) \
+ $(phobos_lt_pic_flag) $(phobos_compiler_shared_flag) \
$(WARN_DFLAGS) $(CHECKING_DFLAGS) $(CET_DFLAGS)
# 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
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@
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@
# D flags for compilation
AM_DFLAGS = \
- $(phobos_compiler_pic_flag) \
+ $(phobos_lt_pic_flag) $(phobos_compiler_shared_flag) \
$(WARN_DFLAGS) $(CHECKING_DFLAGS) $(CET_DFLAGS)
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@
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@
# 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 ""
}
# 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 ""
}
;;
--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)