GCC wrapper: Don't create dangling symlinks; create a `gcj' symlink.
svn path=/nixpkgs/trunk/; revision=16645
This commit is contained in:
parent
92f8b3767f
commit
09ab84a431
@ -83,7 +83,7 @@ mkGccWrapper() {
|
|||||||
|
|
||||||
if ! test -f "$src"; then
|
if ! test -f "$src"; then
|
||||||
echo "$src does not exist (skipping)"
|
echo "$src does not exist (skipping)"
|
||||||
return
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gccProg="$src"
|
gccProg="$src"
|
||||||
@ -91,18 +91,24 @@ mkGccWrapper() {
|
|||||||
chmod +x "$dst"
|
chmod +x "$dst"
|
||||||
}
|
}
|
||||||
|
|
||||||
mkGccWrapper $out/bin/gcc $gccPath/gcc
|
if mkGccWrapper $out/bin/gcc $gccPath/gcc
|
||||||
ln -s gcc $out/bin/cc
|
then
|
||||||
|
ln -sv gcc $out/bin/cc
|
||||||
mkGccWrapper $out/bin/g++ $gccPath/g++
|
|
||||||
ln -s g++ $out/bin/c++
|
|
||||||
|
|
||||||
if test -e $gccPath/gfortran; then
|
|
||||||
mkGccWrapper $out/bin/gfortran $gccPath/gfortran
|
|
||||||
ln -s gfortran $out/bin/g77
|
|
||||||
ln -s gfortran $out/bin/f77
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if mkGccWrapper $out/bin/g++ $gccPath/g++
|
||||||
|
then
|
||||||
|
ln -sv g++ $out/bin/c++
|
||||||
|
fi
|
||||||
|
|
||||||
|
if mkGccWrapper $out/bin/gfortran $gccPath/gfortran
|
||||||
|
then
|
||||||
|
ln -sv gfortran $out/bin/g77
|
||||||
|
ln -sv gfortran $out/bin/f77
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkGccWrapper $out/bin/gcj $gccPath/gcj
|
||||||
|
|
||||||
|
|
||||||
# Create a symlink to as (the assembler). This is useful when a
|
# Create a symlink to as (the assembler). This is useful when a
|
||||||
# gcc-wrapper is installed in a user environment, as it ensures that
|
# gcc-wrapper is installed in a user environment, as it ensures that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user