diff options
author | Gleb Popov <6yearold@gmail.com> | 2021-06-09 21:17:12 +0300 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2021-09-21 22:28:30 +0530 |
commit | 07716580c63a53aa3b302186309d66f786a17160 (patch) | |
tree | c4ffb5966be2368ed500e73eba8368e11d7640a1 | |
parent | 1f66634630a000c19d0806e7a6b30c1358bad271 (diff) | |
download | haskell-07716580c63a53aa3b302186309d66f786a17160.tar.gz |
Pass -DLIBICONV_PLUG when building base library on FreeBSD.
If libiconv is installed from packages on the build machine, there is a high
chance that the build system will pick up /usr/local/include/iconv.h instead
of base /usr/include/iconv.h
This additional preprocessor define makes package's libiconv header compatible
with system one, fixing the build.
Closes issue #19958
-rw-r--r-- | libraries/base/base.cabal | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal index 4a7fe6e133..734ac5f7cb 100644 --- a/libraries/base/base.cabal +++ b/libraries/base/base.cabal @@ -436,6 +436,12 @@ Library System.CPUTime.Posix.RUsage System.CPUTime.Unsupported + -- The Ports framework always passes this flag when building software that + -- uses iconv to make iconv from Ports compatible with iconv from the base system + -- See /usr/ports/Mk/Uses/iconv.mk + if os(freebsd) + cc-options: -DLIBICONV_PLUG + -- We need to set the unit id to base (without a version number) -- as it's magic. ghc-options: -this-unit-id base |