From 1a6fe020a91c5d169e931318f3586b4dbffcd836 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Tue, 16 Jun 2015 13:21:33 +0200 Subject: [PATCH] Adding STAGE1 bootstrap recipes --- STAGE1-gcc | 14 ++++++++++++++ STAGE1-gcc-host | 31 +++++++++++++++++++++++++++++++ STAGE1-gcc-libgcc | 13 +++++++++++++ STAGE1-t-gcc | 11 +++++++++++ 4 files changed, 69 insertions(+) create mode 100644 STAGE1-gcc create mode 100644 STAGE1-gcc-host create mode 100644 STAGE1-gcc-libgcc create mode 100644 STAGE1-t-gcc diff --git a/STAGE1-gcc b/STAGE1-gcc new file mode 100644 index 0000000..cc10f06 --- /dev/null +++ b/STAGE1-gcc @@ -0,0 +1,14 @@ +srpm gcc +mcd $BUILDDIR/gcc + +# prefill gcc cache +echo 'lt_cv_shlibpath_overrides_runpath=no' > config.cache +echo 'gcc_cv_libc_provides_ssp=yes' >> config.cache + +$SRC/gcc-*/configure $GCC_CONFIGARGS --with-headers=$ROOTFS/usr/include --cache-file=config.cache +notparallel +make $J +make $J install +mcd $ROOTFS/lib${SUFFIX}/gcc +rsync -av $PREFIX/lib${SUFFIX}/gcc/ $ROOTFS/lib${SUFFIX}/gcc/ +rsync -av $PREFIX/$TARGET/lib/ $ROOTFS/lib${SUFFIX}/ diff --git a/STAGE1-gcc-host b/STAGE1-gcc-host new file mode 100644 index 0000000..a9fe747 --- /dev/null +++ b/STAGE1-gcc-host @@ -0,0 +1,31 @@ +srpm gcc +mcd $BUILDDIR/gcc + +# prefill gcc cache +echo 'lt_cv_shlibpath_overrides_runpath=no' > config.cache +echo 'gcc_cv_libc_provides_ssp=yes' >> config.cache + +if [ ! "$BUILDER_ARCH" = "$TARGET_ARCH" ]; then + WITH_HEADERS="--with-headers=$ROOTFS/usr/include" +fi + +$SRC/gcc-*/configure $GCC_CONFIGARGS $WITH_HEADERS --cache-file=config.cache +notparallel + +# Pass gcc_cv_libc_provides_ssp down, because the config.cache +# version is not passed down to the gcc subdir. +make $J all-host gcc_cv_libc_provides_ssp=yes +make $J install-host gcc_cv_libc_provides_ssp=yes + + +if false; then + mkdirp $ROOTFS/usr/lib${SUFFIX} + for o in crt Scrt1 crti crtbegin crtbeginS crtend crtendS crtn + do + $TARGET-gcc -nostdlib -nostartfiles -c -x c /dev/null -c -o $ROOTFS/usr/lib${SUFFIX}/$o.o + done + for so in gcc gcc_s c + do + $TARGET-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $ROOTFS/usr/lib${SUFFIX}/lib$so.so + done +fi diff --git a/STAGE1-gcc-libgcc b/STAGE1-gcc-libgcc new file mode 100644 index 0000000..a73e524 --- /dev/null +++ b/STAGE1-gcc-libgcc @@ -0,0 +1,13 @@ +srpm gcc +mcd $BUILDDIR/gcc + +# prefill gcc cache +echo 'lt_cv_shlibpath_overrides_runpath=no' > config.cache +echo 'gcc_cv_libc_provides_ssp=yes' >> config.cache + +$SRC/gcc-*/configure $GCC_CONFIGARGS --with-headers=$ROOTFS/usr/include --cache-file=config.cache +notparallel +# Pass gcc_cv_libc_provides_ssp down, because the config.cache +# version is not passed down to the gcc subdir. +make $J all-target-libgcc all-target-libssp gcc_cv_libc_provides_ssp=yes +make $J install-target-libgcc install-target-libssp gcc_cv_libc_provides_ssp=yes diff --git a/STAGE1-t-gcc b/STAGE1-t-gcc new file mode 100644 index 0000000..fa5eaca --- /dev/null +++ b/STAGE1-t-gcc @@ -0,0 +1,11 @@ +srpm gcc +mcd $BUILDDIR/t-gcc +$SRC/gcc-*/configure $GCC_TCONFIGARGS --enable-linker-build-id +notparallel +make $J +make $J install DESTDIR=${ROOTFS} +test -e ${ROOTFS}/usr/bin/cc && rm ${ROOTFS}/usr/bin/cc +ln -s gcc ${ROOTFS}/usr/bin/cc +mkdir -p ${ROOTFS}/usr/share/gdb/auto-load/usr/lib${SUFFIX} +mv -f ${ROOTFS}/usr/lib${SUFFIX}/libstdc++*gdb.py* \ + ${ROOTFS}/usr/share/gdb/auto-load/usr/lib${SUFFIX}