From: Hugo Villeneuve Date: Thu, 12 Mar 2015 02:12:07 +0000 (-0400) Subject: Add temporary C++ toolchain hack X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=e95cfb07de732ada6d3c93b80f4877a6e144c818;p=hvlinux.git Add temporary C++ toolchain hack --- 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 $?