nixpkgs/pkgs/stdenv-linux/stdenv-build.sh
Eelco Dolstra 6b66d16116 * Provide an ld-wrapper that sets the linker search path correctly (just like
gcc-wrapper).  Useful for builds that call ld directly.

svn path=/nixpkgs/trunk/; revision=363
2003-08-27 12:37:38 +00:00

36 lines
546 B
Bash
Executable File

#! /bin/sh
export PATH=/bin:/usr/bin
mkdir $out || exit 1
p=
first=1
for i in $tools $gcc $binutils $shell; do
if test "$first" == 1; then
first=
else
p=$p:
fi
p=$p$i/bin
done
cc=$gcc/bin/gcc
cxx=$gcc/bin/g++
ld=$binutils/bin/ld
shell=$shell/bin/sh
echo "########## $p"
sed \
-e s^@GLIBC\@^$glibc^g \
-e s^@LINUX\@^$linux^g \
-e s^@GCC\@^$gcc^g \
-e s^@CC\@^$cc^g \
-e s^@CXX\@^$cxx^g \
-e s^@LD\@^$ld^g \
-e s^@BASEENV\@^$baseenv^g \
-e s^@PATH\@^$p^g \
-e s^@SHELL\@^$shell^g \
< $setup > $out/setup || exit 1