fdfcb5353c
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.
58 lines
1.4 KiB
Bash
Executable File
58 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
#
|
|
# This script computes the various flags needed to run D Phobos unittests.
|
|
#
|
|
|
|
# Print a message saying how this script is intended to be invoked
|
|
print_usage() {
|
|
cat <<EOF
|
|
Usage:
|
|
testsuite_flags --gdc
|
|
--gdcflags
|
|
--gdcpaths
|
|
--gdcldflags
|
|
|
|
EOF
|
|
}
|
|
|
|
# Establish configure-generated directory structure.
|
|
BUILD_DIR=@libphobos_builddir@
|
|
SRC_DIR=@libphobos_srcdir@
|
|
query=$1
|
|
|
|
case ${query} in
|
|
--gdc)
|
|
GDC="@GDC@"
|
|
echo ${GDC}
|
|
;;
|
|
--gdcflags)
|
|
GDCFLAGS_default="-fmessage-length=0 -fno-show-column"
|
|
GDCFLAGS_config="@WARN_DFLAGS@ @GDCFLAGS@ @CET_DFLAGS@
|
|
@phobos_compiler_shared_flag@ -fno-release -funittest"
|
|
echo ${GDCFLAGS_default} ${GDCFLAGS_config}
|
|
;;
|
|
--gdcpaths)
|
|
GDCPATHS_default="-nostdinc"
|
|
GDCPATHS_config="-B${BUILD_DIR}/src
|
|
-I${BUILD_DIR}/libdruntime
|
|
-I${SRC_DIR}/libdruntime"
|
|
# Include phobos in search path if compiling in library.
|
|
if [ "x@ENABLE_LIBDRUNTIME_ONLY_FALSE@" = "x" ]; then
|
|
GDCPATHS_config="${GDCPATHS_config} -I${SRC_DIR}/src"
|
|
fi
|
|
echo ${GDCPATHS_default} ${GDCPATHS_config}
|
|
;;
|
|
--gdcldflags)
|
|
GDCLDFLAGS="-B${BUILD_DIR}/src
|
|
-B${BUILD_DIR}/libdruntime/gcc
|
|
-L${BUILD_DIR}/src/.libs"
|
|
echo ${GDCLDFLAGS}
|
|
;;
|
|
*)
|
|
print_usage
|
|
;;
|
|
esac
|
|
|
|
exit 0
|