From 96206446b5b46cf36aba271c32ad5910d4e934aa Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Fri, 11 Mar 2016 19:51:36 +0900 Subject: gcc-runtime.morph: Dont screw around with target triples Leave that up to ybd, which provides TARGET and TARGET_MUSL --- strata/build-essential/gcc-runtime.morph | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'strata/build-essential/gcc-runtime.morph') diff --git a/strata/build-essential/gcc-runtime.morph b/strata/build-essential/gcc-runtime.morph index d0894aed..78547dd7 100644 --- a/strata/build-essential/gcc-runtime.morph +++ b/strata/build-essential/gcc-runtime.morph @@ -12,18 +12,10 @@ configure-commands: --with-float=hard" ;; armv7*) ARCH_FLAGS="--with-arch=armv7-a" ;; esac - MUSL_TRIPLE=${MORPH_ARCH}-unknown-linux-musl - GNU_TRIPLE=${MORPH_ARCH}-unknown-linux-gnu - case "$MORPH_ARCH" in - arm*) - MUSL_TRIPLE=${MUSL_TRIPLE}eabi - GNU_TRIPLE=${GNU_TRIPLE}eabi - ;; - esac # Do some really ugly setup stuff here, writing outside of our build area # - ln -s . /usr/${GNU_TRIPLE} + ln -s . /usr/${TARGET} ln -s /tools/usr/cc /usr/cc ln -s /tools/usr/c++ /usr/c++ cd o @@ -38,9 +30,9 @@ configure-commands: ac_cv_path_AS_FOR_TARGET=`which as` \ ac_cv_path_LD_FOR_TARGET=`which ld` \ ../configure $ARCH_FLAGS --prefix="$PREFIX" \ - --build=${MUSL_TRIPLE} \ - --host=${MUSL_TRIPLE} \ - --target=${GNU_TRIPLE} \ + --build=${TARGET_MUSL} \ + --host=${TARGET_MUSL} \ + --target=${TARGET} \ --disable-multilib --disable-libmudflap \ --disable-libsanitizer --enable-tls --disable-lto \ --disable-nls --enable-c99 --enable-__cxa_atexit \ @@ -55,14 +47,6 @@ build-commands: make install-commands: - | - # Resolve our target triple again - GNU_TRIPLE=${MORPH_ARCH}-unknown-linux-gnu - case "$MORPH_ARCH" in - arm*) - GNU_TRIPLE=${GNU_TRIPLE}eabi - ;; - esac - # Thats right, still need to run C++ programs we built # at install time, so still need to set LD_LIBRARY_PATH export LD_LIBRARY_PATH=/tools/usr/lib @@ -85,10 +69,10 @@ install-commands: mv temp/usr/lib/gcc/*/*/* ${DESTDIR}/usr/cc/lib # Move C++ headers in place - mv temp/usr/${GNU_TRIPLE}/include/c++/* ${DESTDIR}/usr/c++/include + mv temp/usr/${TARGET}/include/c++/* ${DESTDIR}/usr/c++/include # Link the extra include path, the ccwrap program expects it in extra-includes - ln -s ${GNU_TRIPLE} ${DESTDIR}/usr/c++/include/extra-includes + ln -s ${TARGET} ${DESTDIR}/usr/c++/include/extra-includes # Finally move the target libstdc++ and other target libraries into the regular libdir - mv temp/usr/${GNU_TRIPLE}/lib ${DESTDIR}/usr/lib + mv temp/usr/${TARGET}/lib ${DESTDIR}/usr/lib -- cgit v1.2.1