2016-02-05 11:59:18 +01:00
|
|
|
# `-B@out@/bin' forces cc to use ld-wrapper.sh when calling ld.
|
2008-06-26 13:07:46 +02:00
|
|
|
export NIX_CFLAGS_COMPILE="-B@out@/bin/ $NIX_CFLAGS_COMPILE"
|
|
|
|
|
2017-08-02 18:48:51 +02:00
|
|
|
# Export and assign separately in order that a failing $(..) will fail
|
|
|
|
# the script.
|
|
|
|
|
2014-10-10 14:25:23 +02:00
|
|
|
if [ -e @out@/nix-support/libc-cflags ]; then
|
2017-08-02 18:48:51 +02:00
|
|
|
export NIX_CFLAGS_COMPILE
|
|
|
|
NIX_CFLAGS_COMPILE="$(< @out@/nix-support/libc-cflags) $NIX_CFLAGS_COMPILE"
|
2008-06-26 13:07:46 +02:00
|
|
|
fi
|
|
|
|
|
2016-02-05 11:59:18 +01:00
|
|
|
if [ -e @out@/nix-support/cc-cflags ]; then
|
2017-08-02 18:48:51 +02:00
|
|
|
export NIX_CFLAGS_COMPILE
|
|
|
|
NIX_CFLAGS_COMPILE="$(< @out@/nix-support/cc-cflags) $NIX_CFLAGS_COMPILE"
|
2008-06-26 13:07:46 +02:00
|
|
|
fi
|
|
|
|
|
2014-10-10 14:25:23 +02:00
|
|
|
if [ -e @out@/nix-support/gnat-cflags ]; then
|
2017-08-02 18:48:51 +02:00
|
|
|
export NIX_GNATFLAGS_COMPILE
|
|
|
|
NIX_GNATFLAGS_COMPILE="$(< @out@/nix-support/gnat-cflags) $NIX_GNATFLAGS_COMPILE"
|
2010-01-16 22:32:44 +01:00
|
|
|
fi
|
|
|
|
|
2014-10-10 14:25:23 +02:00
|
|
|
if [ -e @out@/nix-support/libc-ldflags ]; then
|
2017-08-02 18:48:51 +02:00
|
|
|
export NIX_LDFLAGS
|
|
|
|
NIX_LDFLAGS+=" $(< @out@/nix-support/libc-ldflags)"
|
2009-02-01 22:26:28 +01:00
|
|
|
fi
|
|
|
|
|
2016-02-05 11:59:18 +01:00
|
|
|
if [ -e @out@/nix-support/cc-ldflags ]; then
|
2017-08-02 18:48:51 +02:00
|
|
|
export NIX_LDFLAGS
|
|
|
|
NIX_LDFLAGS+=" $(< @out@/nix-support/cc-ldflags)"
|
2008-06-26 13:07:46 +02:00
|
|
|
fi
|
|
|
|
|
2014-10-10 14:25:23 +02:00
|
|
|
if [ -e @out@/nix-support/libc-ldflags-before ]; then
|
2017-08-02 18:48:51 +02:00
|
|
|
export NIX_LDFLAGS_BEFORE
|
|
|
|
NIX_LDFLAGS_BEFORE="$(< @out@/nix-support/libc-ldflags-before) $NIX_LDFLAGS_BEFORE"
|
2008-06-26 13:07:46 +02:00
|
|
|
fi
|
|
|
|
|
2014-12-17 19:11:30 +01:00
|
|
|
export NIX_CC_WRAPPER_FLAGS_SET=1
|