From 4426563e2600f11891fba1efce6ff16b49986403 Mon Sep 17 00:00:00 2001
From: Jonathan Maw <jonathan.maw@codethink.co.uk>
Date: Tue, 5 Sep 2017 15:14:04 +0100
Subject: gnu-toolchain: Fix libgcc_s.so being installed with a bad symlink

This is currently because fhs-dirs makes /lib a symlink to /usr/lib,
and buildstream mangles symlink paths from absolute paths to relative
paths.

The symlink ../tools/lib/libgcc_s.so ends up in /usr/lib, breaking
things.

This fixes that by explicitly installing the symlink to /usr/lib
---
 elements/gnu-toolchain/stage2-gcc.bst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'elements/gnu-toolchain/stage2-gcc.bst')

diff --git a/elements/gnu-toolchain/stage2-gcc.bst b/elements/gnu-toolchain/stage2-gcc.bst
index dffa4439..13b925a9 100644
--- a/elements/gnu-toolchain/stage2-gcc.bst
+++ b/elements/gnu-toolchain/stage2-gcc.bst
@@ -97,9 +97,9 @@ config:
       libdir=lib
     fi
 
-    install -d "%{install-root}/lib"
-    ln -s "%{prefix}/$libdir/libgcc_s.so" "%{install-root}/lib/"
-    ln -s "%{prefix}/$libdir/libgcc_s.so.1" "%{install-root}/lib/"
+    install -d "%{install-root}/usr/lib"
+    ln -s "%{prefix}/$libdir/libgcc_s.so" "%{install-root}/usr/lib/"
+    ln -s "%{prefix}/$libdir/libgcc_s.so.1" "%{install-root}/usr/lib/"
 
   strip-commands:
   - |
-- 
cgit v1.2.1

