about summary refs log tree commit diff
path: root/pkgs/stdenv/generic/ld-wrapper.sh
blob: e6a2fe74c5e8b95b2aa0fd1ccc166d0b963405f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/sh

IFS=" "
extra=($NIX_CFLAGS_LINK $NIX_LDFLAGS)
if test "$NIX_STRIP_DEBUG" == "1"; then
    extra=(${extra[@]} -s)
fi

if test "$NIX_DEBUG" == "1"; then
  echo "extra flags to @LD@:" >&2
  for i in ${extra[@]}; do
      echo "  $i" >&2
  done
fi

IFS=
exec $NIX_LD $@ ${extra[@]}