summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authorDanie Roux <danie@danieroux.com>2013-09-08 02:04:43 +0200
committerVladimír Čunát <vcunat@gmail.com>2013-09-14 14:45:07 +0200
commit055e646bfc1fc0b06ac61ee88f1d31b1698f287f (patch)
treee8ffacb2d9e2f3f84107e78eb4d28ec50cdb8804 /pkgs/tools/misc
parent123ab78ee037f80a7ed98010f95168c48b2aa78b (diff)
downloadnixpkgs-055e646bfc1fc0b06ac61ee88f1d31b1698f287f.tar
nixpkgs-055e646bfc1fc0b06ac61ee88f1d31b1698f287f.tar.gz
nixpkgs-055e646bfc1fc0b06ac61ee88f1d31b1698f287f.tar.bz2
nixpkgs-055e646bfc1fc0b06ac61ee88f1d31b1698f287f.tar.lz
nixpkgs-055e646bfc1fc0b06ac61ee88f1d31b1698f287f.tar.xz
nixpkgs-055e646bfc1fc0b06ac61ee88f1d31b1698f287f.tar.zst
nixpkgs-055e646bfc1fc0b06ac61ee88f1d31b1698f287f.zip
coreutils: Guard against compiler not supporting __builtin_stpncpy_chk
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.
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/coreutils/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index da3e8d09a23..c4066c89d1d 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -59,6 +59,9 @@ let
 
     NIX_LDFLAGS = stdenv.lib.optionalString selinuxSupport "-lsepol";
 
+    makeFlags = stdenv.lib.optionalString stdenv.isDarwin
+      "CFLAGS=-D_FORTIFY_SOURCE=0";
+
     meta = {
       homepage = http://www.gnu.org/software/coreutils/;
       description = "The basic file, shell and text manipulation utilities of the GNU operating system";