summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@well-typed.com>2022-07-13 12:35:07 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-07-16 23:50:37 -0400
commit5b0ed8a8baaa32e03fee7af2c08656b462b62770 (patch)
treed431f5bd5866c3f6630281d30fd8c5635beccbec
parentfbb171100f1d5bd9e78cbb9072fb48d3422458a5 (diff)
downloadhaskell-5b0ed8a8baaa32e03fee7af2c08656b462b62770.tar.gz
testsuite: Use system-cxx-std-lib instead of config.stdcxx_impl
-rw-r--r--testsuite/config/ghc1
-rw-r--r--testsuite/driver/runtests.py2
-rw-r--r--testsuite/driver/testglobals.py3
-rw-r--r--testsuite/mk/boilerplate.mk11
-rw-r--r--testsuite/tests/ghci/linking/Makefile12
-rw-r--r--testsuite/tests/rts/T10672/Makefile4
-rw-r--r--testsuite/tests/rts/all.T2
-rw-r--r--testsuite/tests/th/all.T2
8 files changed, 11 insertions, 26 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index 36b987ce25..c4d5a60e11 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -54,7 +54,6 @@ if ghc_with_dynamic_rts:
if windows:
config.supports_dynamic_hs = False
- config.stdcxx_impl = 'c++'
# WinIO I/O manager for Windows
if windows:
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index a7abfdf3b9..8a0524248b 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -235,8 +235,6 @@ else:
print('WARNING: No UTF8 locale found.')
print('You may get some spurious test failures.')
-ghc_env['LIBCXX'] = config.stdcxx_impl
-
# https://stackoverflow.com/a/22254892/1308058
def supports_colors():
"""
diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py
index 8a68ffd33e..7ccbaa3024 100644
--- a/testsuite/driver/testglobals.py
+++ b/testsuite/driver/testglobals.py
@@ -217,9 +217,6 @@ class TestConfig:
# The path specifies the file in which to write the dependencies
self.only_report_hadrian_deps = None # type: Optional[Path]
- # C++ standard library implementation
- self.stdcxx_impl = 'stdc++' # or c++ for LLVM/libc++ based platforms
-
def validate(self) -> None:
""" Check the TestConfig for self-consistency """
def assert_implies(a: bool, b: bool):
diff --git a/testsuite/mk/boilerplate.mk b/testsuite/mk/boilerplate.mk
index 8ce5dafb7b..8f017f7a4c 100644
--- a/testsuite/mk/boilerplate.mk
+++ b/testsuite/mk/boilerplate.mk
@@ -303,16 +303,7 @@ DARWIN = YES
else
DARWIN = NO
endif
-# The platform is known to use libc++ as its main C++ library.
-ifeq "$(HostOS)" "freebsd"
-LIBCXX_PLATFORM = YES
-else ifeq "$(HostOS)" "openbsd"
-LIBCXX_PLATFORM = YES
-else ifeq "$(HostOS)" "mingw32"
-LIBCXX_PLATFORM = YES
-else
-LIBCXX_PLATFORM = NO
-endif
+
ifeq "$(HostOS)" "openbsd"
# None required, dlopen and the like are in libc.
LIBDL_NAME =
diff --git a/testsuite/tests/ghci/linking/Makefile b/testsuite/tests/ghci/linking/Makefile
index 7b77e91c09..2e5e785832 100644
--- a/testsuite/tests/ghci/linking/Makefile
+++ b/testsuite/tests/ghci/linking/Makefile
@@ -32,13 +32,13 @@ ghcilink002 :
"$(TEST_HC)" -no-auto-link-packages -shared -v0 -o dir002/$(call DLL,foo) dir002/foo.o
echo "test" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) -Ldir002 -lfoo TestLink.hs
-# Test 3: ghci -lstdc++
-# where libstdc++.so is normally found in a directory private to gcc,
-# so only gcc can find it (see #5289)
+# Test 3: ghci -package system-cxx-std-lib
+# where the C++ standard library is normally found in a directory private to
+# gcc, so only gcc can find it (see #5289)
.PHONY: ghcilink003
ghcilink003 :
- echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) -l$(LIBCXX)
+ echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) -package system-cxx-std-lib
# Test 4:
# package P
@@ -98,7 +98,7 @@ ghcilink005 :
# Test 6:
# package P
-# extra-libraries: stdc++
+# build-depends: system-cxx-std-lib
LOCAL_PKGCONF006=dir006/ghcilink006.package.conf
PKG006=dir006/pkg.conf
@@ -112,7 +112,7 @@ ghcilink006 :
echo "version: 1.0" >>$(PKG006)
echo "id: test-XXX" >>$(PKG006)
echo "key: test-XXX" >>$(PKG006)
- echo "extra-libraries: $(LIBCXX)" >>$(PKG006)
+ echo "build-depends: system-cxx-std-lib" >>$(PKG006)
'$(GHC_PKG)' init $(LOCAL_PKGCONF006)
'$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF006) register $(PKG006) -v0
#
diff --git a/testsuite/tests/rts/T10672/Makefile b/testsuite/tests/rts/T10672/Makefile
index bcc9a5c22b..481441ebb8 100644
--- a/testsuite/tests/rts/T10672/Makefile
+++ b/testsuite/tests/rts/T10672/Makefile
@@ -3,9 +3,9 @@ include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
T10672_x64:
- '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -rtsopts=none -fforce-recomp -lgcc_s_seh-1 -l${LIBCXX} \
+ '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -rtsopts=none -fforce-recomp -lgcc_s_seh-1 -package system-cxx-std-lib
Main.hs Printf.hs cxxy.cpp
T10672_x86:
- '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -rtsopts=none -fforce-recomp -lgcc_s_dw2-1 -${LIBCXX} \
+ '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -rtsopts=none -fforce-recomp -lgcc_s_dw2-1 -package system-cxx-std-lib \
Main.hs Printf.hs cxxy.cpp
diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T
index 0c541dd480..7f65f2ca22 100644
--- a/testsuite/tests/rts/all.T
+++ b/testsuite/tests/rts/all.T
@@ -474,7 +474,7 @@ test('keep-cafs',
# Test proper functioning of C++ exceptions within a C++ program.
# On darwin, this requires -fcompact-unwind.
test('T11829', [ check_errmsg("This is a test") ], compile_and_run,
- ['T11829_c.cpp -l{}'.format(config.stdcxx_impl)])
+ ['T11829_c.cpp -package system-cxx-std-lib'])
test('T16514', normal, compile_and_run, ['T16514_c.c'])
test('test-zeroongc', extra_run_opts('-DZ'), compile_and_run, ['-debug'])
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index 9b606a70e4..72a1340e71 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -403,7 +403,7 @@ test('T13366Cxx',
when(opsys('darwin'), expect_broken(16083))
],
compile_and_run,
- ['-l{} -v0'.format(config.stdcxx_impl)])
+ ['-package system-cxx-std-lib -v0'])
test('T13473', normal, multimod_compile_and_run,
['T13473.hs', '-v0 ' + config.ghc_th_way_flags])
test('T13587', expect_broken(13587), compile_and_run, ['-v0'])