* Renamed orig-glibc -> orig-libc in some places, and in others, use

the new $NIX_GCC/nix-support/dynamic-linker file to locate the
  dynamic linker directly (don't hardcode ld-linux.so.2).

svn path=/nixpkgs/trunk/; revision=6873
This commit is contained in:
Eelco Dolstra 2006-10-27 12:43:32 +00:00
parent ee2b63c872
commit b90781ec21
13 changed files with 12 additions and 25 deletions

View File

@ -18,10 +18,9 @@ rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
find $out \( -type f -a -perm +0100 \) \
-print \
-exec patchelf --interpreter $glibc/lib/ld-linux.so.* \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
#find $out \( -type f -a -name "*.so*" \) \
# -print \

View File

@ -1,6 +1,6 @@
source $stdenv/setup
myglibc=`cat ${NIX_GCC}/nix-support/orig-glibc`
myglibc=`cat ${NIX_GCC}/nix-support/orig-libc`
echo "glibc: $myglibc"
postConfigure() {

View File

@ -1,6 +1,6 @@
source $stdenv/setup
myglibc=`cat ${NIX_GCC}/nix-support/orig-glibc`
myglibc=`cat ${NIX_GCC}/nix-support/orig-libc`
echo "glibc: $myglibc"
postConfigure() {

View File

@ -1,6 +1,6 @@
source $stdenv/setup
myglibc=`cat ${NIX_GCC}/nix-support/orig-glibc`
myglibc=`cat ${NIX_GCC}/nix-support/orig-libc`
echo "glibc: $myglibc"
postConfigure() {

View File

@ -17,13 +17,11 @@ if test -n "$fastStart"; then
rm -v $(ls $out/Reader/intellinux/plug_ins/*.api | grep -v SearchFind)
fi
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
fullPath=
for i in $libPath; do
fullPath=$fullPath${fullPath:+:}$i/lib
done
patchelf --interpreter $glibc/lib/ld-linux.so.* \
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath $fullPath \
$out/Reader/intellinux/bin/acroread

View File

@ -11,8 +11,6 @@ installPhase() {
# want to install icons in some system-wide directories.
echo no | ./install.sh --prefix=$out
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
rpath=/no-such-path
for i in $libPath; do
rpath="$rpath:$i/lib"
@ -24,7 +22,7 @@ installPhase() {
for i in $out/lib/opera/*/opera $out/lib/opera/plugins/opera*; do
patchelf \
--set-interpreter "$glibc/lib/ld-linux.so.2" \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" \
"$i"
done

View File

@ -9,8 +9,7 @@ skip=143273 # Look for "BZh91" in the executable.
rm -rf $out/real/Bin $out/real/postinst
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
patchelf --interpreter $glibc/lib/ld-linux.so.* $out/real/realplay.bin
patchelf --interpreter $(cat $NIX_GCC/nix-support/dynamic-linker) $out/real/realplay.bin
ensureDir $out/bin
makeWrapper "$out/real/realplay.bin" "$out/bin/realplay" \

View File

@ -2,9 +2,8 @@ source $stdenv/setup
postBuild=postBuild
postBuild () {
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
find . -type f -perm +100 \
-exec patchelf --interpreter $glibc/lib/ld-linux.so.* \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$readline/lib:$ncurses/lib" {} \;
}

View File

@ -35,9 +35,8 @@ rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
find $out -type f -perm +100 \
-exec patchelf --interpreter $glibc/lib/ld-linux.so.* \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
# Unpack .pack files.

View File

@ -1,6 +1,6 @@
source $stdenv/setup
if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE"; then
if test "$NIX_ENFORCE_PURITY" = "1"; then
GLIBC=$(cat $NIX_GCC/nix-support/orig-libc)
extraflags="-Dlocincpth=$GLIBC/include -Dloclibpth=$GLIBC/lib"
fi

View File

@ -2,10 +2,9 @@ source $stdenv/setup
buildPhase=buildPhase
buildPhase() {
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
for i in bin/*; do
patchelf \
--set-interpreter $glibc/lib/ld-linux.so.* \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath $libX11/lib:$libXext/lib \
$i
done

View File

@ -24,8 +24,6 @@ mkdir $out
# Set the ELF interpreter to our own Glibc.
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
for i in "$out/System/ucc-bin" "$out/System/ut2004-bin"; do
patchelf --set-interpreter "$glibc/lib/ld-linux.so.2" "$i"
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" "$i"
done

View File

@ -2,8 +2,6 @@ source $stdenv/setup
ensureDir $out/bin
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
cat > $out/bin/ut2004demo <<EOF
#! $SHELL -e