diff options
author | Danie Roux <danie@danieroux.com> | 2013-09-07 16:36:10 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2013-09-14 14:45:06 +0200 |
commit | 14109047bdda9d3522a1968b59d75e5520c11775 (patch) | |
tree | f651df3f720390d96d9f3b3187b2f4e2cca10cdf | |
parent | 76ca653d7b280287c875b67a5476ead6d33307a7 (diff) | |
download | nixlib-14109047bdda9d3522a1968b59d75e5520c11775.tar nixlib-14109047bdda9d3522a1968b59d75e5520c11775.tar.gz nixlib-14109047bdda9d3522a1968b59d75e5520c11775.tar.bz2 nixlib-14109047bdda9d3522a1968b59d75e5520c11775.tar.lz nixlib-14109047bdda9d3522a1968b59d75e5520c11775.tar.xz nixlib-14109047bdda9d3522a1968b59d75e5520c11775.tar.zst nixlib-14109047bdda9d3522a1968b59d75e5520c11775.zip |
gettext: Guard against compiler not supporting __builtin_stpncpy
From https://lists.macosforge.org/pipermail/macports-dev/2011-July/015263.html: 5) Building with a compiler that doesn't support newer __builtins If your port uses MacPorts compilers rather than the default compiler, you may run into trouble with string functions. You'll see errors at link time about undefined __builtin_* functions. If this happens, you may want to compile with -D_FORTIFY_SOURCE=0 to tell the headers to use unfortified versions which do not use compiler builtins.
-rw-r--r-- | pkgs/development/libraries/gettext/default.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 5468c9f2336d..dbc17ffa1bb2 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -19,6 +19,9 @@ stdenv.mkDerivation (rec { "--config-cache" ]); + makeFlags = stdenv.lib.optionalString stdenv.isDarwin + "CFLAGS=-D_FORTIFY_SOURCE=0"; + # On cross building, gettext supposes that the wchar.h from libc # does not fulfill gettext needs, so it tries to work with its # own wchar.h file, which does not cope well with the system's |