0b6e3127e8
libphobos: PR d/87864 * configure.ac (DRTSTUFF_SPEC): New variable. Substitute it. * libdruntime/m4/druntime/os.m4 (DRUNTIME_OS_MINFO_BRACKETING): New automake conditional. * configure: Regenerate. * libdruntime/gcc/drtstuff.c: New file. * libdruntime/Makefile.am [!DRUNTIME_OS_MINFO_BRACKETING] (DRTSTUFF, toolexeclib_DATA): New variables. (gcc/drtbegin.lo, gcc/drtend.lo): New rules. (libgdruntime_la_LDFLAGS): Use -Wc instead of -Xcompiler. Add -dstartfiles -B../src -Bgcc. (libgdruntime_la_DEPENDENCIES): New variable. (unittest_static_LDFLAGS): Use -Wc instead of -Xcompiler. (libgdruntime_t_la_LDFLAGS): Likewise. (unittest_LDFLAGS): Likewise. * src/Makefile.am (libgphobos_la_LDFLAGS): Use -Wc instead of -Xcompiler. Add -dstartfiles -B../libdruntime/gcc. (unittest_static_LDFLAGS): Use -Wc instead of -Xcompiler. (libgphobos_t_la_LDFLAGS): Likewise. (unittest_LDFLAGS): Likewise. * libdruntime/Makefile.in, src/Makefile.in: Regenerate. * Makefile.in, testsuite/Makefile.in: Regenerate. * libdruntime/rt/sections_elf_shared.d (Minfo_Bracketing): Don't assert. * libdruntime/gcc/config.d.in (Minfo_Bracketing): Remove. * src/drtstuff.spec: New file. * src/libgphobos.spec.in (DRTSTUFF_SPEC): Substitute. (*lib): Only pass SPEC_PHOBOS_DEPS without -debuglib, -defaultlib, -nophoboslib. * testsuite/testsuite_flags.in <--gdcldflags> (GDCLDFLAGS): Add -B${BUILD_DIR}/libdruntime/gcc. gcc/d: PR d/87864 * lang.opt (dstartfiles): New option. * d-spec.cc (need_spec): New variable. (lang_specific_driver) <OPT_dstartfiles>: Enable need_spec. (lang_specific_pre_link): Also load libgphobos.spec if need_spec. gcc/testsuite: PR d/87864 * lib/gdc.exp (gdc_link_flags): Add path to drtbegin.o/drtend.o if present. From-SVN: r268886
54 lines
1.2 KiB
Bash
Executable File
54 lines
1.2 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="@GDCFLAGSX@"
|
|
echo ${GDCFLAGS_default} ${GDCFLAGS_config}
|
|
;;
|
|
--gdcpaths)
|
|
GDCPATHS_default="-nostdinc"
|
|
GDCPATHS_config="-B${BUILD_DIR}/src
|
|
-I${BUILD_DIR}/libdruntime
|
|
-I${SRC_DIR}/libdruntime"
|
|
echo ${GDCPATHS_default} ${GDCPATHS_config}
|
|
;;
|
|
--gdcldflags)
|
|
GDCLDFLAGS="-B${BUILD_DIR}/src
|
|
-B${BUILD_DIR}/libdruntime/gcc
|
|
-L${BUILD_DIR}/libdruntime/.libs
|
|
-L${BUILD_DIR}/src/.libs"
|
|
echo ${GDCLDFLAGS}
|
|
;;
|
|
*)
|
|
print_usage
|
|
;;
|
|
esac
|
|
|
|
exit 0
|