X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage0%2Fpkg%2Fgcc;h=433e601c51dc83044a58a5ffee21a3a140946fd5;hb=166111908c2cff78986972e0d2668feb7ee9d42b;hp=c1eb6b03077fdaf82ea66329d472b77f98cfe4c5;hpb=3605ab38ca7604b1fe43c3bce5e4963730a85d39;p=hvlinux.git diff --git a/stage0/pkg/gcc b/stage0/pkg/gcc index c1eb6b0..433e601 100644 --- a/stage0/pkg/gcc +++ b/stage0/pkg/gcc @@ -1,8 +1,5 @@ #!/bin/bash -AR=ar -LDFLAGS="-Wl,-rpath,/cross-tools/lib" - hvpatch() { # Manually applying patches if specified @@ -24,8 +21,12 @@ hvpatch() hvconfig_pre() { + export AR=ar + export LDFLAGS="-Wl,-rpath,/cross-tools/lib" + # Common options for passes 1 & 2 - CONFIGURE_OPTS="${CONFIGURE_OPTS} \ + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ --build=${CLFS_HOST} \ --host=${CLFS_HOST} \ --target=${CLFS_TARGET} \ @@ -33,9 +34,12 @@ hvconfig_pre() --with-local-prefix=/tools \ --disable-nls \ --with-mpfr=/cross-tools \ - --with-gmp=/cross-tools" + --with-gmp=/cross-tools \ + --with-ppl=/cross-tools \ + --with-cloog=/cross-tools \ + --disable-multilib" - if [ -n "${GCC_PASS1}" ]; then + if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then CONFIGURE_OPTS="${CONFIGURE_OPTS} \ --disable-shared \ --without-headers \ @@ -56,14 +60,6 @@ hvconfig_pre() --enable-threads=posix" fi - case "${HVL_TARGET}" in - *) - CONFIGURE_OPTS="${CONFIGURE_OPTS} --with-ppl=/cross-tools \ - --with-cloog=/cross-tools \ - --disable-multilib" - ;; - esac - cd ${LFS_TMP}/${PACKAGE} # Change the StartFile Spec to point to the correct library location: @@ -76,16 +72,22 @@ hvconfig_pre() sed -e "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g" \ -i gcc/Makefile.in - if [ -n "${GCC_PASS1}" ]; then + if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then # We will create a dummy limits.h so the build will not use the one # provided by the host distro: touch /tools/include/limits.h fi } +hvconfig_post() +{ + unset AR + unset LDFLAGS +} + hvbuild() { - if [ -n "${GCC_PASS1}" ]; then + if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then ${HVMAKE} all-gcc all-target-libgcc ${HVMAKE} install-gcc install-target-libgcc else