From 9bc5ab64de16f786ede145755d52f5452af453f9 Mon Sep 17 00:00:00 2001 From: Greg Steuck Date: Sat, 18 Dec 2021 14:51:02 -0800 Subject: 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 --- testsuite/mk/boilerplate.mk | 7 +++++-- testsuite/tests/ghci/linking/Makefile | 2 +- 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++ -- cgit v1.2.1