summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-02-21 16:29:46 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-04 15:17:03 +0000
commit1492c0c084b90f86f5674844057850b9958b7ea7 (patch)
treefaefc19ef0f0982756acd168c428dfc685337be6
parent0e750e39d2776da5f61bf343ef69572b6d75ca27 (diff)
downloadfhs-dirs-1492c0c084b90f86f5674844057850b9958b7ea7.tar.gz
Final fixes
-rw-r--r--stage2-fhs-dirs.morph5
-rw-r--r--stage2-fhs-dirs.morph.yaml13
2 files changed, 14 insertions, 4 deletions
diff --git a/stage2-fhs-dirs.morph b/stage2-fhs-dirs.morph
index 0cd13b7..0537ef0 100644
--- a/stage2-fhs-dirs.morph
+++ b/stage2-fhs-dirs.morph
@@ -5,8 +5,9 @@
"install-commands": [
"sh ./create-fhs-dirs \"$DESTDIR\"",
"rmdir \"$DESTDIR/bin\" \"$DESTDIR/lib\"",
- "ln -s \"/tools/bin\" \"$DESTDIR/bin\"",
- "ln -s \"/tools/lib\" \"$DESTDIR/lib\"",
+ "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",
"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 056b94a..e58fff6 100644
--- a/stage2-fhs-dirs.morph.yaml
+++ b/stage2-fhs-dirs.morph.yaml
@@ -7,8 +7,17 @@ install-commands:
# the one sysroot (/tools). We use symlinked versions of /bin and /lib.
- sh ./create-fhs-dirs "$DESTDIR"
- rmdir "$DESTDIR/bin" "$DESTDIR/lib"
- - ln -s "/tools/bin" "$DESTDIR/bin"
- - ln -s "/tools/lib" "$DESTDIR/lib"
+ - 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.
+ - |
+ 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"
+ fi
- sh ./create-dev-nodes "$DESTDIR"
- install -m 644 passwd "$DESTDIR/etc/passwd"