1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 14:41:17 +00:00
nixpkgs/pkgs/build-support/gcc-wrapper/add-flags

29 lines
968 B
Plaintext
Raw Normal View History

# `-B@out@/bin' forces gcc to use ld-wrapper.sh when calling ld.
export NIX_CFLAGS_COMPILE="-B@out@/bin/ $NIX_CFLAGS_COMPILE"
2014-10-10 13:25:23 +01:00
if [ -e @out@/nix-support/libc-cflags ]; then
export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/libc-cflags) $NIX_CFLAGS_COMPILE"
fi
2014-10-10 13:25:23 +01:00
if [ -e @out@/nix-support/gcc-cflags ]; then
export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/gcc-cflags) $NIX_CFLAGS_COMPILE"
fi
2014-10-10 13:25:23 +01:00
if [ -e @out@/nix-support/gnat-cflags ]; then
export NIX_GNATFLAGS_COMPILE="$(cat @out@/nix-support/gnat-cflags) $NIX_GNATFLAGS_COMPILE"
fi
2014-10-10 13:25:23 +01:00
if [ -e @out@/nix-support/libc-ldflags ]; then
2014-10-10 14:23:16 +01:00
export NIX_LDFLAGS+=" $(cat @out@/nix-support/libc-ldflags)"
fi
2014-10-10 13:25:23 +01:00
if [ -e @out@/nix-support/gcc-ldflags ]; then
2014-10-10 14:23:16 +01:00
export NIX_LDFLAGS+=" $(cat @out@/nix-support/gcc-ldflags)"
fi
2014-10-10 13:25:23 +01:00
if [ -e @out@/nix-support/libc-ldflags-before ]; then
export NIX_LDFLAGS_BEFORE="$(cat @out@/nix-support/libc-ldflags-before) $NIX_LDFLAGS_BEFORE"
fi
export NIX_GCC_WRAPPER_FLAGS_SET=1