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.
This commit is contained in:
Danie Roux 2013-09-08 02:04:43 +02:00 committed by Vladimír Čunát
parent 123ab78ee0
commit 055e646bfc

View File

@ -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";