X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage0%2Fpkg%2Fgcc;h=c2717d0de17e1f3957ee4569fd2359f6d63c0402;hb=f0d54c69a71d7d5cb32aa342ea38cba6aab9570f;hp=5746dab59250130431e79768f954f976322d0896;hpb=69ac3e7cf686f8e95e47a7ab89bc38796aace488;p=hvlinux.git diff --git a/stage0/pkg/gcc b/stage0/pkg/gcc index 5746dab..c2717d0 100644 --- a/stage0/pkg/gcc +++ b/stage0/pkg/gcc @@ -1,28 +1,12 @@ #!/bin/bash -hvpatch() +hvconfig_pre() { - # Manually applying patches if specified - if [ -n "${GCC_PATCHES}" ]; then - for p in ${GCC_PATCHES}; do - apply_patch ${PACKAGE}-${p}.patch ${PACKAGE} - done - fi - - case "${HVL_TARGET}" in - "x86") - apply_patch ${PACKAGE}-specs-1.patch ${PACKAGE} - ;; - "x86_64") - apply_patch ${PACKAGE}-pure64_specs-1.patch ${PACKAGE} - ;; - esac -} + export AR=ar + export LDFLAGS="-Wl,-rpath,/cross-tools/lib" -configure_pre() -{ # Common options for passes 1 & 2 - CONFIGURE_OPTS="${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --build=${CLFS_HOST} \ --host=${CLFS_HOST} \ --target=${CLFS_TARGET} \ @@ -30,10 +14,13 @@ configure_pre() --with-local-prefix=/tools \ --disable-nls \ --with-mpfr=/cross-tools \ - --with-gmp=/cross-tools" + --with-gmp=/cross-tools \ + --with-isl=/cross-tools \ + --with-cloog=/cross-tools \ + --disable-multilib" - if [ -n "${GCC_PASS1}" ]; then - CONFIGURE_OPTS="${CONFIGURE_OPTS} \ + if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then + CONFIGURE_OPTS+=" \ --disable-shared \ --without-headers \ --with-newlib \ @@ -43,8 +30,13 @@ configure_pre() --disable-libssp \ --disable-threads \ --enable-languages=c" + + # We will create a dummy limits.h so the build will not use the one + # provided by the host distro: + mkdir -p /tools/include + touch /tools/include/limits.h else - CONFIGURE_OPTS="${CONFIGURE_OPTS} \ + CONFIGURE_OPTS+=" \ --enable-shared \ --enable-languages=c,c++ \ --enable-__cxa_atexit \ @@ -53,14 +45,6 @@ configure_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: @@ -72,17 +56,17 @@ configure_pre() # only: sed -e "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g" \ -i gcc/Makefile.in +} - if [ -n "${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