From 7d7068766fb1da7637f13e9cace65b12cb0ad4b6 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 22 Feb 2013 15:35:37 +0000 Subject: Try and fix build on every platform other than x86_64 We created a /lib symlink so that the loader would work, but stage 3 eglibc wants to install a real /lib directoy and that breaks things later on. Hopefully we can get by with just a /bin -> /tools/lib symlink and nothing for /lib. I don't see why that shouldn't work. --- stage2-fhs-dirs.morph | 5 ++--- stage2-fhs-dirs.morph.yaml | 13 +++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/stage2-fhs-dirs.morph b/stage2-fhs-dirs.morph index 0537ef0..2522400 100644 --- a/stage2-fhs-dirs.morph +++ b/stage2-fhs-dirs.morph @@ -4,10 +4,9 @@ "decription": "create the FHS 2.3 directory hierarchy and the usual files", "install-commands": [ "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\"", - "cpu=$(echo $TARGET | cut -d '-' -f 1)\nif [ \"$cpu\" == \"x86_64\" ]; then\n mkdir -p \"$DESTDIR/lib64\"\n ln -s \"/lib/ld-linux-x86-64.so.2\" \"$DESTDIR/lib64/ld-linux-x86-64.so.2\"\nfi\n", + "cpu=$(echo $TARGET | cut -d '-' -f 1)\nif [ \"$cpu\" == \"x86_64\" ]; then\n mkdir -p \"$DESTDIR/lib64\"\n ln -s \"$PREFIX/lib/ld-linux-x86-64.so.2\" \"$DESTDIR/lib64/ld-linux-x86-64.so.2\"\nelse\n loader=$(ls /lib/ld-linux-*)\n ln -s \"$PREFIX$loader\" \"$DESTDIR$loader\"\nfi\n", "sh ./create-dev-nodes \"$DESTDIR\"", "install -m 644 passwd \"$DESTDIR/etc/passwd\"", "install -m 600 shadow \"$DESTDIR/etc/shadow\"", 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" -- cgit v1.2.1