summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-03-30 17:03:58 -0400
committerBen Gamari <ben@smart-cactus.org>2020-03-31 13:10:00 -0400
commit2290eb02cf95e9cfffcb15fc9c593d5ef79c75d9 (patch)
tree0524c2172cefaa122f31f458bb0ff7d36448b1b2
parenteba58110538686d8fe57d5dd372624b50f1fa2b7 (diff)
downloadhaskell-wip/T17962.tar.gz
iserv: Don't pass --export-dynamic on FreeBSDwip/T17962
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.
-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