diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de> | 2017-01-31 23:28:37 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de> | 2017-01-31 23:56:52 +0000 |
commit | f937121616866517e54f27e4e8d806c70f288ab8 (patch) | |
tree | e20ef4befd50c3366b3c7b78a7ab0967eab0ea83 /vars | |
parent | 72b823dab8f65e71010709bec3d4e46b27a490ff (diff) | |
download | midipix_build-f937121616866517e54f27e4e8d806c70f288ab8.tar.bz2 midipix_build-f937121616866517e54f27e4e8d806c70f288ab8.tar.xz |
vars/{build,gcc}.vars: fix build & cleanup.
Diffstat (limited to 'vars')
-rw-r--r-- | vars/build.vars | 12 | ||||
-rw-r--r-- | vars/gcc.vars | 114 | ||||
l--------- | vars/gcc_stage1_cross_x86_64_w64_mingw32.vars (renamed from vars/gcc_native_x86_64_w64_mingw32.vars) | 0 | ||||
l--------- | vars/gcc_stage1_native_x86_64_w64_mingw32.vars (renamed from vars/gcc_stage1_x86_64_w64_mingw32.vars) | 0 |
4 files changed, 66 insertions, 60 deletions
diff --git a/vars/build.vars b/vars/build.vars index 63f38355..2b7b6f63 100644 --- a/vars/build.vars +++ b/vars/build.vars @@ -87,7 +87,7 @@ INVARIANTS_PACKAGES="chainport"; HOST_TOOLCHAIN_BUILD_TYPE="host"; HOST_TOOLCHAIN_CFLAGS_CONFIGURE="${HOST_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT}"; HOST_TOOLCHAIN_CONFIGURE_ARGS="-C --disable-nls --host=${TARGET} --prefix= --target=${TARGET}"; -HOST_TOOLCHAIN_PACKAGES="slibtool_host perk_host binutils_host binutils_host_x86_64_w64_mingw32 gcc_stage1_x86_64_w64_mingw32 gcc_stage1 psxstub musl_no_complex gcc_runtime musl_full gcc_libstdcpp_v3 gcc_full file_host mdso_host pkgconf_host"; +HOST_TOOLCHAIN_PACKAGES="slibtool_host perk_host binutils_host binutils_host_x86_64_w64_mingw32 gcc_stage1_cross_x86_64_w64_mingw32 gcc_stage1 psxstub musl_no_complex gcc_runtime musl_full gcc_libstdcpp_v3 gcc_full file_host mdso_host pkgconf_host"; HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}"; : ${PKG_SLIBTOOL_HOST_URL:=${GITROOT}/slibtool}; : ${PKG_SLIBTOOL_HOST_URL_TYPE:=git}; @@ -110,6 +110,8 @@ HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}"; : ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_CONFIGURE_ARGS:=--disable-werror --prefix=${PREFIX} --target=x86_64-w64-mingw32 --with-sysroot=${PREFIX_CROSS}}; : ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_SLIBTOOL:=slibtool-static}; : ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_TARGET:=x86_64-w64-mingw32}; +: ${PKG_GCC_STAGE1_CROSS_X86_64_W64_MINGW32_VERSION:=4.6.4}; +: ${PKG_GCC_STAGE1_CROSS_X86_64_W64_MINGW32_TARGET:=x86_64-w64-mingw32}; : ${PKG_GCC_STAGE1_VERSION:=4.6.4}; : ${PKG_PSXSTUB_URL:=${GITROOT}/psxstub}; : ${PKG_PSXSTUB_URL_TYPE:=git}; @@ -119,8 +121,6 @@ HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}"; : ${PKG_MUSL_FULL_VERSION:=1.1.12}; : ${PKG_GCC_LIBSTDCPP_V3_VERSION:=4.6.4}; : ${PKG_GCC_FULL_VERSION:=4.6.4}; -: ${PKG_GCC_STAGE1_X86_64_W64_MINGW32_VERSION:=4.6.4}; -: ${PKG_GCC_STAGE1_X86_64_W64_MINGW32_TARGET:=x86_64-w64-mingw32}; : ${PKG_FILE_HOST_SHA256SUM:=ea661277cd39bf8f063d3a83ee875432cc3680494169f952787e002bdd3884c0}; : ${PKG_FILE_HOST_VERSION:=5.29}; : ${PKG_FILE_HOST_URL:=ftp://ftp.astron.com/pub/file/file-${PKG_FILE_HOST_VERSION}.tar.gz}; @@ -143,7 +143,7 @@ HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}"; NATIVE_TOOLCHAIN_CFLAGS_CONFIGURE="${NATIVE_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT}"; NATIVE_TOOLCHAIN_CONFIGURE_ARGS="--disable-nls --host=${TARGET} --prefix=/ --target=${TARGET}"; NATIVE_TOOLCHAIN_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}"; -NATIVE_TOOLCHAIN_PACKAGES="slibtool perk pkgconf gmp mpfr mpc libelf binutils binutils_x86_64_w64_mingw32 musl_native gcc_native mdso"; +NATIVE_TOOLCHAIN_PACKAGES="slibtool perk pkgconf gmp mpfr mpc libelf binutils binutils_x86_64_w64_mingw32 musl_native gcc_native gcc_stage1_native_x86_64_w64_mingw32 mdso"; NATIVE_TOOLCHAIN_PREFIX="${PREFIX_NATIVE}"; : ${PKG_SLIBTOOL_URL:=git://midipix.org/slibtool}; : ${PKG_SLIBTOOL_URL_TYPE:=git}; @@ -190,8 +190,8 @@ NATIVE_TOOLCHAIN_PREFIX="${PREFIX_NATIVE}"; : ${PKG_MUSL_NATIVE_VERSION:=1.1.12}; : ${PKG_MUSL_NATIVE_URL:=http://www.musl-libc.org/releases/musl-${PKG_MUSL_NATIVE_VERSION}.tar.gz}; : ${PKG_GCC_NATIVE_VERSION:=4.6.4}; -: ${PKG_GCC_NATIVE_X86_64_W64_MINGW32_VERSION:=4.6.4}; -: ${PKG_GCC_NATIVE_X86_64_W64_MINGW32_TARGET:=x86_64-w64-mingw32}; +: ${PKG_GCC_STAGE1_NATIVE_X86_64_W64_MINGW32_VERSION:=4.6.4}; +: ${PKG_GCC_STAGE1_NATIVE_X86_64_W64_MINGW32_TARGET:=x86_64-w64-mingw32}; : ${PKG_MDSO_URL:=${GITROOT}/mdso}; : ${PKG_MDSO_URL_TYPE:=git}; : ${PKG_MDSO_CONFIGURE_ARGS:="--prefix=/usr --target=${TARGET}"}; diff --git a/vars/gcc.vars b/vars/gcc.vars index 9fba3fd8..0301e310 100644 --- a/vars/gcc.vars +++ b/vars/gcc.vars @@ -8,11 +8,19 @@ pkgp_gcc_setup_env() { export MAKE="make LIBTOOL=slibtool"; export cbb_ldflags_for_target=--sysroot=${PKG_PREFIX} \ cbb_sysroot_for_libgcc=${PKG_PREFIX} \ - cbb_target=${PKG_TARGET} \ - cbb_neutral_libiberty=no \ - cbb_xgcc_for_specs=${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc; + cbb_target=${PKG_TARGET}; + case ${1} in + stage1) export cbb_neutral_libiberty=no; + if [ "${PKG_TARGET}" = "x86_64-w64-mingw32" ]; then + export cbb_xgcc_for_specs=${PKG_TARGET}-gcc; + else + export cbb_xgcc_for_specs=${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc; + fi; ;; + native) export cbb_xgcc_for_specs=${PKG_TARGET}-gcc \ + sysroot_headers_suffix=${PKG_PREFIX}; + esac; GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}"; - GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${1}/libc/cbb-musl-pe.h)"; + GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${2}/libc/cbb-musl-pe.h)"; for __ in CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; do export "${__}=${GCCFLAGS}"; done; @@ -54,37 +62,52 @@ pkgp_gcc_configure() { set_build_script_done configure clean -build; }; -pkg_gcc_stage1_x86_64_w64_mingw32_all() { +pkg_gcc_stage1_cross_x86_64_w64_mingw32_all() { + pkg_gcc_stage1_all "${@}"; +}; + +pkg_gcc_stage1_native_x86_64_w64_mingw32_all() { pkg_gcc_stage1_all "${@}"; }; pkg_gcc_stage1_all() { - if [ "${PKG_TARGET}" = "x86_64-w64-mingw32" ]; then - PKG_GCC_VERSION="${PKG_GCC_STAGE1_X86_64_W64_MINGW32_VERSION}"; - else + case ${PKG_NAME} in + gcc_stage1) PKG_GCC_VERSION="${PKG_GCC_STAGE1_VERSION}"; - fi; + set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross; + ;; + gcc_stage1_cross_x86_64_w64_mingw32) + PKG_GCC_VERSION="${PKG_GCC_STAGE1_CROSS_X86_64_W64_MINGW32_VERSION}"; + set_build_dir cbb-gcc-${PKG_GCC_VERSION}_cross_${PKG_TARGET} cross; + ;; + gcc_stage1_native_x86_64_w64_mingw32) + PKG_GCC_VERSION="${PKG_GCC_STAGE1_NATIVE_X86_64_W64_MINGW32_VERSION}"; + set_build_dir cbb-gcc-${PKG_GCC_VERSION}_native_${PKG_TARGET} native; + ;; + esac; # 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; - if [ "${PKG_TARGET}" = "x86_64-w64-mingw32" ]; then - set_build_dir cbb-gcc-${PKG_GCC_VERSION}_${PKG_TARGET} cross; - else - set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross; - fi; - pkgp_gcc_setup_env "${PKG_GCC_VERSION}"; + pkgp_gcc_setup_env stage1 "${PKG_GCC_VERSION}"; if ! is_build_script_done configure; then insecure_mkdir ${PKG_PREFIX}/include; [ \! -d ${PKG_PREFIX}/usr ] && \ ln -s -- . ${PKG_PREFIX}/usr; if [ "${PKG_TARGET}" = "x86_64-w64-mingw32" ]; then + patch -b -d cbb-gcc-4.6.4 -p1 < ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch; pkgp_gcc_configure \ + --build=x86_64-unknown-linux-gnu \ --enable-sjlj-exceptions \ - --prefix=${PREFIX} \ - --with-sysroot=${PREFIX}/${PKG_TARGET} \ + --host=x86_64-nt64-midipix \ + --prefix=/ \ + --with-elf=${PKG_PREFIX} \ + --with-gmp=${PKG_PREFIX} \ + --with-mpc=${PKG_PREFIX} \ + --with-mpfr=${PKG_PREFIX} \ + --with-sysroot= \ --without-headers; else pkgp_gcc_configure \ @@ -104,7 +127,11 @@ pkg_gcc_stage1_all() { set_build_script_done build -install; fi; if ! is_build_script_done install; then - make ${MAKEFLAGS} install-gcc; + if [ "${PKG_TARGET}" = "x86_64-w64-mingw32" ]; then + make ${MAKEFLAGS} DESTDIR=${PKG_PREFIX} install-gcc; + else + make ${MAKEFLAGS} install-gcc; + fi; __="$(uname -s)"; if [ "${__#*CYGWIN*}" != "${__}" ]; then ln -s -- ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a \ @@ -159,52 +186,31 @@ pkg_gcc_full_all() { fi; }; -pkg_gcc_native_x86_64_w64_mingw32_all() { - pkg_gcc_native_all "${@}"; -}; - pkg_gcc_native_all() { - if [ "${PKG_TARGET}" = "x86_64-w64-mingw32" ]; then - PKG_GCC_VERSION="${PKG_GCC_NATIVE_X86_W64_MINGW32_VERSION}"; - else - PKG_GCC_VERSION="${PKG_GCC_NATIVE_VERSION}"; - fi; + PKG_GCC_VERSION="${PKG_GCC_NATIVE_VERSION}"; export MAKE="make LIBTOOL=slibtool"; # GCC, native. - if [ "${PKG_TARGET}" = "x86_64-w64-mingw32" ]; then - set_build_dir cbb-gcc-${PKG_GCC_VERSION}_${PKG_TARGET} native; - else - set_build_dir cbb-gcc-${PKG_GCC_VERSION} native; - fi; - pkgp_gcc_setup_env "${PKG_GCC_VERSION}"; + set_build_dir cbb-gcc-${PKG_GCC_VERSION} native; + pkgp_gcc_setup_env native "${PKG_GCC_VERSION}"; if ! is_build_script_done configure; then insecure_mkdir ${PKG_PREFIX}/${PKG_TARGET}; if [ \! -d ${PKG_PREFIX}/${PKG_TARGET}/usr ]; then ln -s -- . ${PKG_PREFIX}/${PKG_TARGET}/usr; fi; - if [ "${PKG_TARGET}" = "x86_64-w64-mingw32" ]; then - patch -b -d ${PKG_SUBDIR} -p1 < ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch; - pkgp_gcc_configure \ - --build=x86_64-unknown-linux-gnu \ - --enable-sjlj-exceptions \ - --host=x86_64-nt64-midipix \ - --prefix=/ \ - --with-elf=${PKG_PREFIX} \ - --with-gmp=${PKG_PREFIX} \ - --with-mpc=${PKG_PREFIX} \ - --with-mpfr=${PKG_PREFIX} \ - --with-sysroot= \ - --without-headers; + if [ "${ARCH}" = nt32 ]; then + _pgna_host="i686-nt32-midipix"; else - pkgp_gcc_configure \ - --disable-sjlj-exceptions \ - --prefix=/ \ - --with-elf=${PKG_PREFIX} \ - --with-gmp=${PKG_PREFIX} \ - --with-mpc=${PKG_PREFIX} \ - --with-mpfr=${PKG_PREFIX} \ - --with-sysroot=; + _pgna_host="x86_64-nt64-midipix"; fi; + pkgp_gcc_configure \ + --disable-sjlj-exceptions \ + --host=${_pgna_host} \ + --prefix=/ \ + --with-elf=${PKG_PREFIX} \ + --with-gmp=${PKG_PREFIX} \ + --with-mpc=${PKG_PREFIX} \ + --with-mpfr=${PKG_PREFIX} \ + --with-sysroot=; else cd ${PKG_BUILD_DIR}; fi; diff --git a/vars/gcc_native_x86_64_w64_mingw32.vars b/vars/gcc_stage1_cross_x86_64_w64_mingw32.vars index 55c0ef10..55c0ef10 120000 --- a/vars/gcc_native_x86_64_w64_mingw32.vars +++ b/vars/gcc_stage1_cross_x86_64_w64_mingw32.vars diff --git a/vars/gcc_stage1_x86_64_w64_mingw32.vars b/vars/gcc_stage1_native_x86_64_w64_mingw32.vars index 55c0ef10..55c0ef10 120000 --- a/vars/gcc_stage1_x86_64_w64_mingw32.vars +++ b/vars/gcc_stage1_native_x86_64_w64_mingw32.vars |