summaryrefslogtreecommitdiff
path: root/stage2-fhs-dirs.morph.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'stage2-fhs-dirs.morph.yaml')
-rw-r--r--stage2-fhs-dirs.morph.yaml13
1 files changed, 9 insertions, 4 deletions
diff --git a/stage2-fhs-dirs.morph.yaml b/stage2-fhs-dirs.morph.yaml
index e58fff6..d7f7d15 100644
--- a/stage2-fhs-dirs.morph.yaml
+++ b/stage2-fhs-dirs.morph.yaml
@@ -4,11 +4,13 @@ decription: create the FHS 2.3 directory hierarchy and the usual files
install-commands:
# We tweak this a little for stage 2 because everything is installed into
- # the one sysroot (/tools). We use symlinked versions of /bin and /lib.
+ # the one sysroot (/tools). We can symlink /bin. We can't symlink /lib
+ # because eglibc install files there that we need to built other stage 3
+ # chunks, but we can get away with just symlinking the loader.
- sh ./create-fhs-dirs "$DESTDIR"
- - rmdir "$DESTDIR/bin" "$DESTDIR/lib"
+
+ - rmdir "$DESTDIR/bin"
- ln -s "$PREFIX/bin" "$DESTDIR/bin"
- - ln -s "$PREFIX/lib" "$DESTDIR/lib"
# This path is hardcoded into eglibc in the file
# sysdeps/unix/sysv/linux/configure; this ugly hack is a compromise.
@@ -16,7 +18,10 @@ install-commands:
cpu=$(echo $TARGET | cut -d '-' -f 1)
if [ "$cpu" == "x86_64" ]; then
mkdir -p "$DESTDIR/lib64"
- ln -s "/lib/ld-linux-x86-64.so.2" "$DESTDIR/lib64/ld-linux-x86-64.so.2"
+ ln -s "$PREFIX/lib/ld-linux-x86-64.so.2" "$DESTDIR/lib64/ld-linux-x86-64.so.2"
+ else
+ loader=$(ls /lib/ld-linux-*)
+ ln -s "$PREFIX$loader" "$DESTDIR$loader"
fi
- sh ./create-dev-nodes "$DESTDIR"