From 806c982e1dd9ef30ae17cd179476802015d1cd00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Sun, 10 Jul 2016 16:02:14 +0000 Subject: - Check if build script exists and if build level is valid w/ -r. - Removes build levels {configure,build,install}{1,2}. --- 003.gcc.stage1.build | 2 +- 006.gcc.runtime.build | 2 +- 008.gcc.full.build | 151 -------------------------------------------- 008.gcc.libstdc++-v3.build | 1 + 009.gcc.full.build | 154 +++++++++++++++++++++++++++++++++++++++++++++ 009.pkgconf_host.build | 1 - 009.pkgconf_host.vars | 19 ------ 010.pkgconf_host.build | 1 + 010.pkgconf_host.vars | 19 ++++++ 100.perk.build | 50 --------------- 100.perk.native.build | 53 ++++++++++++++++ 101.gmp.build | 1 - 101.perk.cross.build | 1 + 102.gmp.build | 1 + 102.mpfr.build | 1 - 103.mpc.build | 1 - 103.mpfr.build | 1 + 104.libelf.build | 1 - 104.mpc.build | 1 + 105.binutils.build | 1 - 105.libelf.build | 1 + 106.binutils.build | 1 + 106.musl.native.build | 1 - 107.gcc.native.build | 1 - 107.musl.native.build | 1 + 108.gcc.native.build | 1 + build.sh | 14 ++++- build.usage | 2 +- 28 files changed, 251 insertions(+), 233 deletions(-) delete mode 100644 008.gcc.full.build create mode 120000 008.gcc.libstdc++-v3.build create mode 100644 009.gcc.full.build delete mode 120000 009.pkgconf_host.build delete mode 100644 009.pkgconf_host.vars create mode 120000 010.pkgconf_host.build create mode 100644 010.pkgconf_host.vars delete mode 100644 100.perk.build create mode 100644 100.perk.native.build delete mode 120000 101.gmp.build create mode 120000 101.perk.cross.build create mode 120000 102.gmp.build delete mode 120000 102.mpfr.build delete mode 120000 103.mpc.build create mode 120000 103.mpfr.build delete mode 120000 104.libelf.build create mode 120000 104.mpc.build delete mode 120000 105.binutils.build create mode 120000 105.libelf.build create mode 120000 106.binutils.build delete mode 120000 106.musl.native.build delete mode 120000 107.gcc.native.build create mode 120000 107.musl.native.build create mode 120000 108.gcc.native.build diff --git a/003.gcc.stage1.build b/003.gcc.stage1.build index c3b435df..f1fa8b29 120000 --- a/003.gcc.stage1.build +++ b/003.gcc.stage1.build @@ -1 +1 @@ -008.gcc.full.build \ No newline at end of file +009.gcc.full.build \ No newline at end of file diff --git a/006.gcc.runtime.build b/006.gcc.runtime.build index c3b435df..f1fa8b29 120000 --- a/006.gcc.runtime.build +++ b/006.gcc.runtime.build @@ -1 +1 @@ -008.gcc.full.build \ No newline at end of file +009.gcc.full.build \ No newline at end of file diff --git a/008.gcc.full.build b/008.gcc.full.build deleted file mode 100644 index bc418847..00000000 --- a/008.gcc.full.build +++ /dev/null @@ -1,151 +0,0 @@ -# -# . ./build.vars and set -o errexit -o noglob are assumed. -# - -# Order: stage1, runtime, full, native - -if [ "${3}" = runtime ]\ -|| [ "${3}" = full ]; then - set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross; - cd ${PKG_BUILD_DIR}; - if [ "${3}" = runtime ]; then - # GCC, compiler runtime. - if ! is_build_script_done build; then - make ${MAKEFLAGS} all-target-libgcc; - set_build_script_done build -install; - fi; - if ! is_build_script_done install; then - make ${MAKEFLAGS} install-target-libgcc; - set_build_script_done install finish; - fi; - elif [ "${3}" = full ]; then - # GCC, everything else. - if ! is_build_script_done build1; then - make ${MAKEFLAGS} all-target-libstdc++-v3; - set_build_script_done build1 -install1; - fi; - if ! is_build_script_done install1; then - make ${MAKEFLAGS} install-target-libstdc++-v3; - set_build_script_done install1 -build2; - fi; - if ! is_build_script_done build2; then - make ${MAKEFLAGS}; - set_build_script_done build2 -install2; - fi; - if ! is_build_script_done install2; then - make ${MAKEFLAGS} install; - set_build_script_done install2 finish; - fi; - fi; -else - if [ "${3}" = stage1 ]; then - # GCC, stage1. - if ! is_build_script_done fetch; then - fetch_git cbb-gcc-${PKG_GCC_VERSION} \ - ${GITROOT}/cbb/cbb-gcc-${PKG_GCC_VERSION}; - set_build_script_done fetch -configure; - fi; - set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross; - export cbb_ldflags_for_target=--sysroot=${PKG_PREFIX} \ - cbb_sysroot_for_libgcc=${PKG_PREFIX} \ - cbb_target=${TARGET} \ - cbb_neutral_libiberty=no \ - cbb_xgcc_for_specs=${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc; - GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}"; - elif [ "${3}" = native ]; then - # GCC, native. - set_build_dir cbb-gcc-${PKG_GCC_VERSION} native; - export cbb_ldflags_for_target=--sysroot=${PKG_PREFIX} \ - cbb_sysroot_for_libgcc=${PKG_PREFIX} \ - cbb_target=${TARGET} \ - cbb_xgcc_for_specs=${TARGET}-gcc; - GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}"; - fi; - GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${PKG_GCC_VERSION}/libc/cbb-musl-pe.h)"; - set_env_vars "${GCCFLAGS}" CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; - set_env_vars "${GCCTARGET_FLAGS}" CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET; - set_env_vars "${CFLAGS_FOR_BUILD}" cbb_cflags_for_stage1 cbb_cflags_for_stage2 cbb_cflags_for_stage3 cbb_cflags_for_stage4; - export CFLAGS CXXFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET; - if ! is_build_script_done configure; then - if [ "${3}" = stage1 ]; then - mkdir -p -- ${PKG_PREFIX}/include; - [ \! -d ${PKG_PREFIX}/usr ] && \ - ln -s -- . ${PKG_PREFIX}/usr; - _configure_args="--prefix=${PREFIX} --with-sysroot=${PKG_PREFIX}"; - elif [ "${3}" = native ]; then - mkdir -p -- ${PKG_PREFIX}/${TARGET}; - if [ \! -d ${PKG_PREFIX}/${TARGET}/usr ]; then - ln -s -- . ${PKG_PREFIX}/${TARGET}/usr; - fi; - if [ "${ARCH}" = nt32 ]; then - _configure_args="--host=i686-nt32-midipix"; - else - _configure_args="--host=x86_64-nt64-midipix"; - fi; - _configure_args="${_configure_args} \ - --prefix=/ \ - --with-elf=${PKG_PREFIX} \ - --with-gmp=${PKG_PREFIX} \ - --with-mpc=${PKG_PREFIX} \ - --with-mpfr=${PKG_PREFIX} \ - --with-sysroot="; - fi; - rm_if_exists -m -c ${PKG_BUILD_DIR}; - ../cbb-gcc-${PKG_GCC_VERSION}/configure \ - --disable-bootstrap \ - --disable-libmudflap \ - --disable-multilib \ - --disable-nls \ - --disable-obsolete \ - --disable-sjlj-exceptions \ - --disable-symvers \ - --enable-canonical-system-headers \ - --enable-__cxa_atexit \ - --enable-debug \ - --enable-gnu-indirect-function \ - --enable-gnu-unique-object \ - --enable-initfini-array \ - --enable-languages=c,c++,objc,lto \ - --enable-libstdcxx-debug \ - --enable-lto \ - --enable-multiarch \ - --enable-secureplt \ - --enable-shared \ - --enable-threads=posix \ - --target=${TARGET} \ - --with-fpmath=sse \ - ${_configure_args}; - set_build_script_done configure clean -build; - else - cd ${PKG_BUILD_DIR}; - fi; - if ! is_build_script_done clean; then - make ${MAKEFLAGS} clean; - set_build_script_done clean -build; - fi; - if ! is_build_script_done build; then - if [ "${3}" = stage1 ]; then - make ${MAKEFLAGS} all-gcc; - elif [ "${3}" = native ]; then - make ${MAKEFLAGS} all-gcc; - make ${MAKEFLAGS} all-target-libgcc; - make ${MAKEFLAGS} all-target-libstdc++-v3; - make ${MAKEFLAGS} all; - fi; - set_build_script_done build -install; - fi; - if ! is_build_script_done install; then - if [ "${3}" = stage1 ]; then - make ${MAKEFLAGS} install-gcc; - if match_uname_any CYGWIN\*; then - ln -s -- ${PREFIX}/libexec/gcc/${TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a \ - ln -s -- ${PREFIX}/libexec/gcc/${TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so; - fi; - elif [ "${3}" = native ]; then - make ${MAKEFLAGS} DESTDIR=${PKG_PREFIX} install; - fi; - set_build_script_done install finish; - fi; -fi; - -# vim:filetype=sh diff --git a/008.gcc.libstdc++-v3.build b/008.gcc.libstdc++-v3.build new file mode 120000 index 00000000..f1fa8b29 --- /dev/null +++ b/008.gcc.libstdc++-v3.build @@ -0,0 +1 @@ +009.gcc.full.build \ No newline at end of file diff --git a/009.gcc.full.build b/009.gcc.full.build new file mode 100644 index 00000000..fe469ff3 --- /dev/null +++ b/009.gcc.full.build @@ -0,0 +1,154 @@ +# +# . ./build.vars and set -o errexit -o noglob are assumed. +# + +# Order: stage1, runtime, full, native + +if [ "${3}" = runtime ]\ +|| [ "${3}" = libstdc++-v3 ]; then +|| [ "${3}" = full ]; then + set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross; + cd ${PKG_BUILD_DIR}; + if [ "${3}" = runtime ]; then + # GCC, compiler runtime. + if ! is_build_script_done build; then + make ${MAKEFLAGS} all-target-libgcc; + set_build_script_done build -install; + fi; + if ! is_build_script_done install; then + make ${MAKEFLAGS} install-target-libgcc; + set_build_script_done install finish; + fi; + elif [ "${3}" = libstdc++-v3 ]; then + # GCC, libstdc++-v3. + if ! is_build_script_done build; then + make ${MAKEFLAGS} all-target-libstdc++-v3; + set_build_script_done build -install; + fi; + if ! is_build_script_done install; then + make ${MAKEFLAGS} install-target-libstdc++-v3; + set_build_script_done install finish; + fi; + elif [ "${3}" = full ]; then + # GCC, everything else. + if ! is_build_script_done build; then + make ${MAKEFLAGS}; + set_build_script_done build -install; + fi; + if ! is_build_script_done install; then + make ${MAKEFLAGS} install; + set_build_script_done install finish; + fi; + fi; +else + if [ "${3}" = stage1 ]; then + # GCC, stage1. + if ! is_build_script_done fetch; then + fetch_git cbb-gcc-${PKG_GCC_VERSION} \ + ${GITROOT}/cbb/cbb-gcc-${PKG_GCC_VERSION}; + set_build_script_done fetch -configure; + fi; + set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross; + export cbb_ldflags_for_target=--sysroot=${PKG_PREFIX} \ + cbb_sysroot_for_libgcc=${PKG_PREFIX} \ + cbb_target=${TARGET} \ + cbb_neutral_libiberty=no \ + cbb_xgcc_for_specs=${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc; + GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}"; + elif [ "${3}" = native ]; then + # GCC, native. + set_build_dir cbb-gcc-${PKG_GCC_VERSION} native; + export cbb_ldflags_for_target=--sysroot=${PKG_PREFIX} \ + cbb_sysroot_for_libgcc=${PKG_PREFIX} \ + cbb_target=${TARGET} \ + cbb_xgcc_for_specs=${TARGET}-gcc; + GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}"; + fi; + GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${PKG_GCC_VERSION}/libc/cbb-musl-pe.h)"; + set_env_vars "${GCCFLAGS}" CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; + set_env_vars "${GCCTARGET_FLAGS}" CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET; + set_env_vars "${CFLAGS_FOR_BUILD}" cbb_cflags_for_stage1 cbb_cflags_for_stage2 cbb_cflags_for_stage3 cbb_cflags_for_stage4; + export CFLAGS CXXFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET; + if ! is_build_script_done configure; then + if [ "${3}" = stage1 ]; then + mkdir -p -- ${PKG_PREFIX}/include; + [ \! -d ${PKG_PREFIX}/usr ] && \ + ln -s -- . ${PKG_PREFIX}/usr; + _configure_args="--prefix=${PREFIX} --with-sysroot=${PKG_PREFIX}"; + elif [ "${3}" = native ]; then + mkdir -p -- ${PKG_PREFIX}/${TARGET}; + if [ \! -d ${PKG_PREFIX}/${TARGET}/usr ]; then + ln -s -- . ${PKG_PREFIX}/${TARGET}/usr; + fi; + if [ "${ARCH}" = nt32 ]; then + _configure_args="--host=i686-nt32-midipix"; + else + _configure_args="--host=x86_64-nt64-midipix"; + fi; + _configure_args="${_configure_args} \ + --prefix=/ \ + --with-elf=${PKG_PREFIX} \ + --with-gmp=${PKG_PREFIX} \ + --with-mpc=${PKG_PREFIX} \ + --with-mpfr=${PKG_PREFIX} \ + --with-sysroot="; + fi; + rm_if_exists -m -c ${PKG_BUILD_DIR}; + ../cbb-gcc-${PKG_GCC_VERSION}/configure \ + --disable-bootstrap \ + --disable-libmudflap \ + --disable-multilib \ + --disable-nls \ + --disable-obsolete \ + --disable-sjlj-exceptions \ + --disable-symvers \ + --enable-canonical-system-headers \ + --enable-__cxa_atexit \ + --enable-debug \ + --enable-gnu-indirect-function \ + --enable-gnu-unique-object \ + --enable-initfini-array \ + --enable-languages=c,c++,objc,lto \ + --enable-libstdcxx-debug \ + --enable-lto \ + --enable-multiarch \ + --enable-secureplt \ + --enable-shared \ + --enable-threads=posix \ + --target=${TARGET} \ + --with-fpmath=sse \ + ${_configure_args}; + set_build_script_done configure clean -build; + else + cd ${PKG_BUILD_DIR}; + fi; + if ! is_build_script_done clean; then + make ${MAKEFLAGS} clean; + set_build_script_done clean -build; + fi; + if ! is_build_script_done build; then + if [ "${3}" = stage1 ]; then + make ${MAKEFLAGS} all-gcc; + elif [ "${3}" = native ]; then + make ${MAKEFLAGS} all-gcc; + make ${MAKEFLAGS} all-target-libgcc; + make ${MAKEFLAGS} all-target-libstdc++-v3; + make ${MAKEFLAGS} all; + fi; + set_build_script_done build -install; + fi; + if ! is_build_script_done install; then + if [ "${3}" = stage1 ]; then + make ${MAKEFLAGS} install-gcc; + if match_uname_any CYGWIN\*; then + ln -s -- ${PREFIX}/libexec/gcc/${TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a \ + ln -s -- ${PREFIX}/libexec/gcc/${TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so; + fi; + elif [ "${3}" = native ]; then + make ${MAKEFLAGS} DESTDIR=${PKG_PREFIX} install; + fi; + set_build_script_done install finish; + fi; +fi; + +# vim:filetype=sh diff --git a/009.pkgconf_host.build b/009.pkgconf_host.build deleted file mode 120000 index 52bb82e5..00000000 --- a/009.pkgconf_host.build +++ /dev/null @@ -1 +0,0 @@ -pkg.build \ No newline at end of file diff --git a/009.pkgconf_host.vars b/009.pkgconf_host.vars deleted file mode 100644 index 3443633b..00000000 --- a/009.pkgconf_host.vars +++ /dev/null @@ -1,19 +0,0 @@ -# -# . ./build.vars and set -o errexit -o noglob are assumed. -# - -pkg_pkgconf_host_install_post() { - if [ -e ${PREFIX}/bin/${TARGET}-pkg-config ]; then - rm -f -- ${PREFIX}/bin/${TARGET}-pkg-config; - fi; - cat > ${PREFIX}/bin/${TARGET}-pkg-config < ${PREFIX}/bin/${TARGET}-pkg-config <