From e95cfb07de732ada6d3c93b80f4877a6e144c818 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 11 Mar 2015 22:12:07 -0400 Subject: [PATCH] Add temporary C++ toolchain hack --- stage2/hv-install-1 | 2 ++ stage2/toolchain-hack-cpp-add | 11 +++++++++++ stage2/toolchain-hack-cpp-remove | 9 +++++++++ 3 files changed, 22 insertions(+) create mode 100755 stage2/toolchain-hack-cpp-add create mode 100755 stage2/toolchain-hack-cpp-remove diff --git a/stage2/hv-install-1 b/stage2/hv-install-1 index 7a6b91f..db8b333 100755 --- a/stage2/hv-install-1 +++ b/stage2/hv-install-1 @@ -15,6 +15,7 @@ ipkg ${GLIBC} ipkg -m noac -s tzdata -c ${TZDATA} rscr once "Adjusting toolchain" toolchain-adjust +rscr once "Creating temporary C++ toolchain hack" toolchain-hack-cpp-add rscr mult "Testing toolchain" toolchain-test export CC="gcc -isystem /usr/include" @@ -34,6 +35,7 @@ unset LDFLAGS ipkg -m acnb ${ZLIB} ipkg ${BINUTILS} ipkg ${GCC} +rscr once "Deleting temporary C++ toolchain hack" toolchain-hack-cpp-remove rscr mult "Testing toolchain" toolchain-test ipkg ${SED} "--bindir=/bin" ipkg ${LIBFFI} diff --git a/stage2/toolchain-hack-cpp-add b/stage2/toolchain-hack-cpp-add new file mode 100755 index 0000000..e2de7c8 --- /dev/null +++ b/stage2/toolchain-hack-cpp-add @@ -0,0 +1,11 @@ +#!/bin/bash + +source ../functions/main + +# Temporary hack. If not, C++ programs cannot be run because +# libstdc++ libraries are in /tools/lib, but ldd expect to find them +# in /lib. I don't know why this is necessary now... +cd /lib +ln -s /tools/lib/libstdc++.so* . + +exit $? diff --git a/stage2/toolchain-hack-cpp-remove b/stage2/toolchain-hack-cpp-remove new file mode 100755 index 0000000..231857a --- /dev/null +++ b/stage2/toolchain-hack-cpp-remove @@ -0,0 +1,9 @@ +#!/bin/bash + +source ../functions/main + +# Remove temporary toolchain hack: +cd /lib +rm -f libstdc++.so* + +exit $? -- 2.20.1