summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Steuck <greg@nest.cx>2021-12-18 14:51:02 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-21 01:47:17 -0500
commit9bc5ab64de16f786ede145755d52f5452af453f9 (patch)
tree80fcc14ef9eac30d236e19225e4b377ad32c69a7
parent9728d6c2b62f38f79c8833b1819200985fe173dc (diff)
downloadhaskell-9bc5ab64de16f786ede145755d52f5452af453f9.tar.gz
Use libc++ instead of libstdc++ on openbsd in addition to freebsd
This is not entirely accurate because some openbsd architectures use gcc. Yet we don't have ghc ported to them and thus the approximation is good enough. Fixes ghcilink006 test
-rw-r--r--testsuite/mk/boilerplate.mk7
-rw-r--r--testsuite/tests/ghci/linking/Makefile2
2 files changed, 6 insertions, 3 deletions
diff --git a/testsuite/mk/boilerplate.mk b/testsuite/mk/boilerplate.mk
index 942e6e32c2..2f5c23bc0c 100644
--- a/testsuite/mk/boilerplate.mk
+++ b/testsuite/mk/boilerplate.mk
@@ -295,8 +295,11 @@ DARWIN = YES
else
DARWIN = NO
endif
+# The platform is known to use libc++ as its main C++ library.
ifeq "$(HostOS)" "freebsd"
-FREEBSD = YES
+LIBCXX_PLATFORM = YES
+else ifeq "$(HostOS)" "openbsd"
+LIBCXX_PLATFORM = YES
else
-FREEBSD = NO
+LIBCXX_PLATFORM = NO
endif
diff --git a/testsuite/tests/ghci/linking/Makefile b/testsuite/tests/ghci/linking/Makefile
index f9553b5594..78d13c6e8a 100644
--- a/testsuite/tests/ghci/linking/Makefile
+++ b/testsuite/tests/ghci/linking/Makefile
@@ -24,7 +24,7 @@ else
DLL = lib$1.so
endif
-ifeq "$(FREEBSD)" "YES"
+ifeq "$(LIBCXX_PLATFORM)" "YES"
LIBCXX=c++
else
LIBCXX=stdc++