libstdc++: Only add valid -L paths to testsuite linker options

The MacOS linker warns about -L arguments that don't exist, which causes
all tests to fail for the defauly configuration (because libbacktrace
isn't built).

libstdc++-v3/ChangeLog:

	* scripts/testsuite_flags.in: Only add src/filesystem/.libs and
	src/libbacktrace/.libs to LDFLAGS if those directories exist.
This commit is contained in:
Jonathan Wakely 2022-01-20 11:15:27 +00:00
parent 9b42782366
commit 5929f253fc

View File

@ -77,9 +77,15 @@ case ${query} in
echo ${PCHFLAGS} echo ${PCHFLAGS}
;; ;;
--cxxldflags) --cxxldflags)
SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@ FS_LDFLAGS=
-L${BUILD_DIR}/src/filesystem/.libs BT_LDFLAGS=
-L${BUILD_DIR}/src/libbacktrace/.libs" if [ -d ${BUILD_DIR}/src/filesystem/.libs ]; then
FS_LDFLAGS=-L${BUILD_DIR}/src/filesystem/.libs
fi
if [ -d ${BUILD_DIR}/src/libbacktrace/.libs ]; then
BT_LDFLAGS=-L${BUILD_DIR}/src/libbacktrace/.libs
fi
SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@ $FS_LDFLAGS $BT_LDFLAGS"
echo ${SECTIONLDFLAGS} echo ${SECTIONLDFLAGS}
;; ;;
*) *)