mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-30 15:24:07 +08:00
f4aa644dbb
The regressions here are primarily from duplicated '-B' additions. We remove the duplicate on the link line. We also make sure that platforms with extensions other than .so for shared libs will have the correct paths. PR target/112864 libphobos/ChangeLog: * testsuite/lib/libphobos.exp: Use ${shlib_ext} instead of hard-wiring '.so'. * testsuite/testsuite_flags.in: Remove duplicate -B option for spec file path.
59 lines
1.4 KiB
Bash
Executable File
59 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@
|
|
-fall-instantiations -fpreview=dip1000
|
|
-fno-release -funittest"
|
|
echo ${GDCFLAGS_default} ${GDCFLAGS_config}
|
|
;;
|
|
--gdcpaths)
|
|
GDCPATHS_default="-nostdinc"
|
|
GDCPATHS_config="-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
|
|
-B${BUILD_DIR}/src/.libs"
|
|
echo ${GDCLDFLAGS}
|
|
;;
|
|
*)
|
|
print_usage
|
|
;;
|
|
esac
|
|
|
|
exit 0
|