From 21240eedc26996a6df2bda3bce77099ea5708012 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 5 Jul 2017 16:39:37 +0000 Subject: gnu-toolchain: Add /lib64 -> /usr/lib64 symlink on 64-bit arches This is required at least for armv8l64, otherwise the glibc.bst element installs a symlink in /usr/lib/ld-linux-aarch64.so.2 that points to a missing file (it expects /usr/lib64/ld-linux-aarch64.so.2 to exist, but if /lib64 is a directory rather than a symlink then that file ends up only in the /lib64/ directory). This also makes our filesystem hierarchy more consistent with other GNU/Linux operating systems. --- elements/gnu-toolchain/fhs-dirs.bst | 19 +++++++++++++++++++ elements/gnu-toolchain/stage2-fhs-dirs.bst | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/elements/gnu-toolchain/fhs-dirs.bst b/elements/gnu-toolchain/fhs-dirs.bst index df715755..ee2972bd 100644 --- a/elements/gnu-toolchain/fhs-dirs.bst +++ b/elements/gnu-toolchain/fhs-dirs.bst @@ -24,3 +24,22 @@ config: - install -m 644 services "%{install-root}/etc/services" - install -m 644 protocols "%{install-root}/etc/protocols" - echo baserock > "%{install-root}/etc/hostname" + +arches: + # Most 64 bit architectures need a /lib64 symlink as well as /lib. + # FIXME: the create-fhs-dirs script should probably handle this... + armv8b64: + config: + install-commands: + - mkdir -p "%{install-root}/usr/lib64" + - ln -s "./usr/lib64" "%{install-root}/lib64" + armv8l64: + config: + install-commands: + - mkdir -p "%{install-root}/usr/lib64" + - ln -s "./usr/lib64" "%{install-root}/lib64" + x86_64: + config: + install-commands: + - mkdir -p "%{install-root}/usr/lib64" + - ln -s "./usr/lib64" "%{install-root}/lib64" diff --git a/elements/gnu-toolchain/stage2-fhs-dirs.bst b/elements/gnu-toolchain/stage2-fhs-dirs.bst index f91f2f1f..15281728 100644 --- a/elements/gnu-toolchain/stage2-fhs-dirs.bst +++ b/elements/gnu-toolchain/stage2-fhs-dirs.bst @@ -29,3 +29,22 @@ config: - install -m 644 services "%{install-root}/etc/services" - install -m 644 protocols "%{install-root}/etc/protocols" - echo baserock > "%{install-root}/etc/hostname" + +arches: + # Most 64 bit architectures need a /lib64 symlink as well as /lib. + # FIXME: the create-fhs-dirs script should probably handle this... + armv8b64: + config: + install-commands: + - mkdir -p "%{install-root}/usr/lib64" + - ln -s "./usr/lib64" "%{install-root}/lib64" + armv8l64: + config: + install-commands: + - mkdir -p "%{install-root}/usr/lib64" + - ln -s "./usr/lib64" "%{install-root}/lib64" + x86_64: + config: + install-commands: + - mkdir -p "%{install-root}/usr/lib64" + - ln -s "./usr/lib64" "%{install-root}/lib64" -- cgit v1.2.1