Merge pull request #51455 from matthewbauer/fix-46814
ghc: don’t add libiconv automatically
This commit is contained in:
commit
69e898eb36
|
@ -2525,6 +2525,23 @@ addEnvHooks "$hostOffset" myBashFunction
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
libiconv, libintl
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
A few libraries automatically add to
|
||||||
|
<literal>NIX_LDFLAGS</literal> their library, making their
|
||||||
|
symbols automatically available to the linker. This includes
|
||||||
|
libiconv and libintl (gettext). This is done to provide
|
||||||
|
compatibility between GNU Linux, where libiconv and libintl
|
||||||
|
are bundled in, and other systems where that might not be the
|
||||||
|
case. Sometimes, this behavior is not desired. To disable
|
||||||
|
this behavior, set <literal>dontAddExtraLibs</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
cmake
|
cmake
|
||||||
|
|
|
@ -206,6 +206,9 @@ stdenv.mkDerivation (rec {
|
||||||
"--disable-large-address-space"
|
"--disable-large-address-space"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
|
||||||
|
dontAddExtraLibs = true;
|
||||||
|
|
||||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,9 @@ stdenv.mkDerivation (rec {
|
||||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
|
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
|
||||||
|
dontAddExtraLibs = true;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
perl autoconf automake m4 python3 sphinx
|
perl autoconf automake m4 python3 sphinx
|
||||||
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
||||||
|
|
|
@ -167,6 +167,9 @@ stdenv.mkDerivation (rec {
|
||||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
|
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
|
||||||
|
dontAddExtraLibs = true;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
perl autoconf automake m4 python3 sphinx
|
perl autoconf automake m4 python3 sphinx
|
||||||
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
||||||
|
|
|
@ -167,6 +167,9 @@ stdenv.mkDerivation (rec {
|
||||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
|
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
|
||||||
|
dontAddExtraLibs = true;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
perl autoconf automake m4 python3 sphinx
|
perl autoconf automake m4 python3 sphinx
|
||||||
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
||||||
|
|
|
@ -149,6 +149,9 @@ stdenv.mkDerivation (rec {
|
||||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
|
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
|
||||||
|
dontAddExtraLibs = true;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
perl autoconf automake m4 python3
|
perl autoconf automake m4 python3
|
||||||
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
||||||
|
|
|
@ -10,7 +10,7 @@ addEnvHooks "$hostOffset" gettextDataDirsHook
|
||||||
|
|
||||||
# libintl must be listed in load flags on non-Glibc
|
# libintl must be listed in load flags on non-Glibc
|
||||||
# it doesn't hurt to have it in Glibc either though
|
# it doesn't hurt to have it in Glibc either though
|
||||||
if [ ! -z "@gettextNeedsLdflags@" ]; then
|
if [ -n "@gettextNeedsLdflags@" -a -z "$dontAddExtraLibs" ]; then
|
||||||
# See pkgs/build-support/setup-hooks/role.bash
|
# See pkgs/build-support/setup-hooks/role.bash
|
||||||
getHostRole
|
getHostRole
|
||||||
export NIX_${role_pre}LDFLAGS+=" -lintl"
|
export NIX_${role_pre}LDFLAGS+=" -lintl"
|
||||||
|
|
|
@ -2,5 +2,7 @@
|
||||||
# it doesn't hurt to have it in Glibc either though
|
# it doesn't hurt to have it in Glibc either though
|
||||||
|
|
||||||
# See pkgs/build-support/setup-hooks/role.bash
|
# See pkgs/build-support/setup-hooks/role.bash
|
||||||
getHostRole
|
if [ -z "$dontAddExtraLibs" ]; then
|
||||||
export NIX_${role_pre}LDFLAGS+=" -liconv"
|
getHostRole
|
||||||
|
export NIX_${role_pre}LDFLAGS+=" -liconv"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue