summaryrefslogtreecommitdiff
path: root/utils/iserv
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-03-30 17:03:58 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-04-09 16:17:21 -0400
commitfa66f143a61f2285618c611a27c23815ca588299 (patch)
tree00bafa7e63f4316e04d8c3d27f0d8655c11ae54c /utils/iserv
parentce481361fc95405cfadcd8f930629381e80e7f84 (diff)
downloadhaskell-fa66f143a61f2285618c611a27c23815ca588299.tar.gz
iserv: Don't pass --export-dynamic on FreeBSD
This is definitely a hack but it's probably the best we can do for now. Hadrian does the right thing here by passing --export-dynamic only to the linker.
Diffstat (limited to 'utils/iserv')
-rw-r--r--utils/iserv/ghc.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/iserv/ghc.mk b/utils/iserv/ghc.mk
index 74f90e60b7..b6a50e4ce1 100644
--- a/utils/iserv/ghc.mk
+++ b/utils/iserv/ghc.mk
@@ -30,8 +30,9 @@ endif
# refer to the RTS. This is harmless if you don't use it (adds a bit
# of overhead to startup and increases the binary sizes) but if you
# need it there's no alternative.
+# Don't do this on FreeBSD to work around #17962.
ifeq "$(TargetElf)" "YES"
-ifneq "$(TargetOS_CPP)" "solaris2"
+ifeq "$(findstring $(TargetOS_CPP), solaris2 freebsd)" ""
# The Solaris linker does not support --export-dynamic option. It also
# does not need it since it exports all dynamic symbols by default
utils/iserv_stage2_MORE_HC_OPTS += -optl-Wl,--export-dynamic