summaryrefslogtreecommitdiffhomepage
path: root/vars
diff options
context:
space:
mode:
Diffstat (limited to 'vars')
-rw-r--r--vars/build.vars54
-rw-r--r--vars/gcc.vars413
l---------vars/gcc_full.vars1
l---------vars/gcc_libstdcpp_v3.vars1
l---------vars/gcc_native.vars1
l---------vars/gcc_native_x86_64_w64_mingw32.vars1
l---------vars/gcc_runtime.vars1
l---------vars/gcc_stage1.vars1
l---------vars/gcc_stage1_x86_64_w64_mingw32.vars1
-rw-r--r--vars/musl.vars111
l---------vars/musl_full.vars1
l---------vars/musl_native.vars1
l---------vars/musl_no_complex.vars1
-rw-r--r--vars/psxstub.vars3
14 files changed, 567 insertions, 24 deletions
diff --git a/vars/build.vars b/vars/build.vars
index 13606a86..f7f84a0b 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 gcc.stage1 psxstub musl.no-complex gcc.runtime musl.full gcc.libstdc++-v3 gcc.full pkgconf_host file_host binutils_host_mingw_w64 gcc.host.mingw_w64 mdso_host";
+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_PREFIX="${PREFIX_CROSS}";
: ${PKG_SLIBTOOL_HOST_URL:=${GITROOT}/slibtool};
: ${PKG_SLIBTOOL_HOST_URL_TYPE:=git};
@@ -104,29 +104,37 @@ HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}";
: ${PKG_BINUTILS_HOST_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_HOST_VERSION}.tar.bz2};
: ${PKG_BINUTILS_HOST_CONFIGURE_ARGS:=--disable-werror --prefix=${PREFIX} --target=${TARGET} --with-sysroot=${PREFIX_CROSS}};
: ${PKG_BINUTILS_HOST_SLIBTOOL:=slibtool-static};
-: ${PKG_BINUTILS_HOST_MINGW_W64_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
-: ${PKG_BINUTILS_HOST_MINGW_W64_VERSION:=2.24.51};
-: ${PKG_BINUTILS_HOST_MINGW_W64_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_HOST_MINGW_W64_VERSION}.tar.bz2};
-: ${PKG_BINUTILS_HOST_MINGW_W64_CONFIGURE_ARGS:=--disable-werror --prefix=${PREFIX} --target=x86_64-w64-mingw32 --with-sysroot=${PREFIX_CROSS}};
-: ${PKG_BINUTILS_HOST_MINGW_W64_SLIBTOOL:=slibtool-static};
-: ${PKG_BINUTILS_HOST_MINGW_W64_TARGET:=x86_64-w64-mingw32};
+: ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
+: ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_VERSION:=2.24.51};
+: ${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_HOST_X86_64_W64_MINGW32_VERSION}.tar.bz2};
+: ${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_VERSION:=4.6.4};
+: ${PKG_PSXSTUB_URL:=${GITROOT}/psxstub};
+: ${PKG_PSXSTUB_URL_TYPE:=git};
+: ${PKG_PSXSTUB_URL:=${GITROOT}/psxstub};
+: ${PKG_MUSL_NO_COMPLEX_VERSION:=1.1.12};
+: ${PKG_GCC_RUNTIME_VERSION:=4.6.4};
+: ${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_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};
+: ${PKG_FILE_HOST_CONFIGURE_ARGS:="-C --prefix=${PREFIX}"};
: ${PKG_MDSO_HOST_URL:=${GITROOT}/mdso};
: ${PKG_MDSO_HOST_URL_TYPE:=git};
: ${PKG_MDSO_HOST_CONFIGURE_ARGS:="--prefix=/usr"};
: ${PKG_MDSO_HOST_INSTALL_FILES:="@mdso=bin/${TARGET}-mdso"};
: ${PKG_MDSO_HOST_MAKEFLAGS_INSTALL:="DESTDIR=${PREFIX}"};
: ${PKG_MDSO_HOST_PREFIX:=${PREFIX}};
-: ${PKG_PSXSTUB_URL:=${GITROOT}/psxstub};
-: ${PKG_PSXSTUB_URL_TYPE:=git};
: ${PKG_PKGCONF_HOST_SHA256SUM:=7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f};
: ${PKG_PKGCONF_HOST_VERSION:=0.9.12};
: ${PKG_PKGCONF_HOST_URL:=https://github.com/pkgconf/pkgconf/releases/download/pkgconf-${PKG_PKGCONF_HOST_VERSION}/pkgconf-${PKG_PKGCONF_HOST_VERSION}.tar.bz2};
: ${PKG_PKGCONF_HOST_CONFIGURE_ARGS:="-C --prefix=${PREFIX_NATIVE}"};
: ${PKG_PKGCONF_HOST_MAKEFLAGS_INSTALL_EXTRA:=prefix=${PREFIX}};
-: ${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};
-: ${PKG_FILE_HOST_CONFIGURE_ARGS:="-C --prefix=${PREFIX}"};
#
# Build target native_toolchain
@@ -134,7 +142,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_native_mingw_w64 musl.native gcc.native mdso gcc.stage1.mingw_w64";
+NATIVE_TOOLCHAIN_PACKAGES="slibtool perk pkgconf gmp mpfr mpc libelf binutils binutils_x86_64_w64_mingw32 musl_native gcc_native mdso";
NATIVE_TOOLCHAIN_PREFIX="${PREFIX_NATIVE}";
: ${PKG_SLIBTOOL_URL:=git://midipix.org/slibtool};
: ${PKG_SLIBTOOL_URL_TYPE:=git};
@@ -172,15 +180,15 @@ NATIVE_TOOLCHAIN_PREFIX="${PREFIX_NATIVE}";
: ${PKG_BINUTILS_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_VERSION}.tar.bz2};
: ${PKG_BINUTILS_CONFIGURE_ARGS_EXTRA:=--with-libelf=${PREFIX_NATIVE} --with-gmp=${PREFIX_NATIVE} --with-mpc=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE} --with-sysroot=/};
: ${PKG_BINUTILS_SLIBTOOL:=slibtool-static};
-: ${PKG_BINUTILS_NATIVE_MINGW_W64_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
-: ${PKG_BINUTILS_NATIVE_MINGW_W64_VERSION:=2.24.51};
-: ${PKG_BINUTILS_NATIVE_MINGW_W64_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_NATIVE_MINGW_W64_VERSION}.tar.bz2};
-: ${PKG_BINUTILS_NATIVE_MINGW_W64_CONFIGURE_ARGS:="--disable-nls --host=${TARGET} --prefix=/ --target=x86_64-w64-mingw32 --with-libelf=${PREFIX_NATIVE} --with-gmp=${PREFIX_NATIVE} --with-mpc=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE} --with-sysroot=/"};
-: ${PKG_BINUTILS_NATIVE_MINGW_W64_SLIBTOOL:=slibtool-static};
-: ${PKG_MUSL_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e};
-: ${PKG_MUSL_VERSION:=1.1.12};
-: ${PKG_MUSL_URL:=http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz};
-: ${PKG_GCC_VERSION:=4.6.4};
+: ${PKG_BINUTILS_X86_64_W64_MINGW32_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
+: ${PKG_BINUTILS_X86_64_W64_MINGW32_VERSION:=2.24.51};
+: ${PKG_BINUTILS_X86_64_W64_MINGW32_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_X86_64_W64_MINGW32_VERSION}.tar.bz2};
+: ${PKG_BINUTILS_X86_64_W64_MINGW32_CONFIGURE_ARGS:="--disable-nls --host=${TARGET} --prefix=/ --target=x86_64-w64-mingw32 --with-libelf=${PREFIX_NATIVE} --with-gmp=${PREFIX_NATIVE} --with-mpc=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE} --with-sysroot=/"};
+: ${PKG_BINUTILS_X86_64_W64_MINGW32_SLIBTOOL:=slibtool-static};
+: ${PKG_MUSL_NATIVE_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e};
+: ${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_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
new file mode 100644
index 00000000..b62ccebd
--- /dev/null
+++ b/vars/gcc.vars
@@ -0,0 +1,413 @@
+#
+# . ./build.vars and set -o errexit -o noglob are assumed.
+# Order: stage1, runtime, libstdcpp_v3, full, native
+# Order: stage1_x86_64_w64_mingw32, native_x86_64_w64_mingw32
+#
+
+pkg_gcc_stage1_all() {
+ PKG_GCC_VERSION="${PKG_GCC_STAGE1_VERSION}";
+ export MAKE="make LIBTOOL=slibtool";
+ # 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=${PKG_TARGET} \
+ cbb_neutral_libiberty=no \
+ cbb_xgcc_for_specs=${WORKDIR}/${PKG_BUILD_DIR}/gcc/xgcc;
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}";
+ GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${PKG_GCC_VERSION}/libc/cbb-musl-pe.h)";
+ for __ in CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; do
+ export "${__}=${GCCFLAGS}";
+ done;
+ for __ in CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET; do
+ export "${__}=${GCCTARGET_FLAGS}";
+ done;
+ for __ in cbb_cflags_for_stage1 cbb_cflags_for_stage2 cbb_cflags_for_stage3 cbb_cflags_for_stage4; do
+ export "${__}=${CFLAGS_FOR_BUILD}" ;
+ done;
+ 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
+ insecure_mkdir ${PKG_PREFIX}/include;
+ [ \! -d ${PKG_PREFIX}/usr ] && \
+ ln -s -- . ${PKG_PREFIX}/usr;
+ _configure_args=" \
+ --disable-sjlj-exceptions \
+ --prefix=${PREFIX} \
+ --with-sysroot=${PREFIX}/${PKG_TARGET}";
+ secure_rm ${PKG_BUILD_DIR};
+ insecure_mkdir ${PKG_BUILD_DIR};
+ secure_cd ${PKG_BUILD_DIR};
+ ../cbb-gcc-${PKG_GCC_VERSION}/configure \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --disable-multilib \
+ --disable-nls \
+ --disable-obsolete \
+ --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=${PKG_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
+ make ${MAKEFLAGS} all-gcc;
+ set_build_script_done build -install;
+ fi;
+ if ! is_build_script_done install; then
+ make ${MAKEFLAGS} install-gcc;
+ __="$(uname -s)";
+ if [ "${__#*CYGWIN*}" != "${__}" ]; then
+ ln -s -- ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a \
+ ln -s -- ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so;
+ fi;
+ set_build_script_done install finish;
+ fi;
+};
+
+pkg_gcc_runtime_all() {
+ PKG_GCC_VERSION="${PKG_GCC_RUNTIME_VERSION}";
+ export MAKE="make LIBTOOL=slibtool";
+ set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross;
+ cd ${PKG_BUILD_DIR};
+ # 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;
+};
+
+pkg_gcc_libstdcpp_v3_all() {
+ PKG_GCC_VERSION="${PKG_GCC_LIBSTDCPP_V3_VERSION}";
+ export MAKE="make LIBTOOL=slibtool";
+ set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross;
+ cd ${PKG_BUILD_DIR};
+ # 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;
+};
+
+pkg_gcc_full_all() {
+ PKG_GCC_VERSION="${PKG_GCC_FULL_VERSION}";
+ export MAKE="make LIBTOOL=slibtool";
+ set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross;
+ cd ${PKG_BUILD_DIR};
+ # 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;
+};
+
+pkg_gcc_native_all() {
+ PKG_GCC_VERSION="${PKG_GCC_NATIVE_VERSION}";
+ export MAKE="make LIBTOOL=slibtool";
+ # 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=${PKG_TARGET} \
+ cbb_xgcc_for_specs=${PKG_TARGET}-gcc \
+ sysroot_headers_suffix=${PKG_PREFIX};
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}";
+ GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${PKG_GCC_VERSION}/libc/cbb-musl-pe.h)";
+ for __ in CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; do
+ export "${__}=${GCCFLAGS}";
+ done;
+ for __ in CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET; do
+ export "${__}=${GCCTARGET_FLAGS}";
+ done;
+ for __ in cbb_cflags_for_stage1 cbb_cflags_for_stage2 cbb_cflags_for_stage3 cbb_cflags_for_stage4; do
+ export "${__}=${CFLAGS_FOR_BUILD}" ;
+ done;
+ 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
+ insecure_mkdir ${PKG_PREFIX}/${PKG_TARGET};
+ if [ \! -d ${PKG_PREFIX}/${PKG_TARGET}/usr ]; then
+ ln -s -- . ${PKG_PREFIX}/${PKG_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} \
+ --disable-sjlj-exceptions \
+ --prefix=/ \
+ --with-elf=${PKG_PREFIX} \
+ --with-gmp=${PKG_PREFIX} \
+ --with-mpc=${PKG_PREFIX} \
+ --with-mpfr=${PKG_PREFIX} \
+ --with-sysroot=";
+ secure_rm ${PKG_BUILD_DIR};
+ insecure_mkdir ${PKG_BUILD_DIR};
+ secure_cd ${PKG_BUILD_DIR};
+ ../cbb-gcc-${PKG_GCC_VERSION}/configure \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --disable-multilib \
+ --disable-nls \
+ --disable-obsolete \
+ --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=${PKG_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
+ make ${MAKEFLAGS} all-gcc;
+ make ${MAKEFLAGS} all-target-libgcc;
+ make ${MAKEFLAGS} all-target-libstdc++-v3;
+ make ${MAKEFLAGS} all;
+ set_build_script_done build -install;
+ fi;
+ if ! is_build_script_done install; then
+ make ${MAKEFLAGS} DESTDIR=${PKG_PREFIX} install;
+ set_build_script_done install finish;
+ fi;
+};
+
+pkg_gcc_stage1_x86_64_w64_mingw32_all() {
+ if [ ! -L ${PREFIX}/${PKG_TARGET}/mingw ]; then
+ secure_rm ${PREFIX}/${PKG_TARGET}/mingw;
+ ln -sf . ${PREFIX}/${PKG_TARGET}/mingw;
+ fi;
+ if [ ! -d ${PREFIX}/${PKG_TARGET}/mingw/include ]; then
+ secure_rm ${PREFIX}/${PKG_TARGET}/mingw/include;
+ insecure_mkdir ${PREFIX}/${PKG_TARGET}/mingw/include;
+ fi;
+ PKG_GCC_VERSION="${PKG_GCC_STAGE1_X86_64_W64_MINGW32_VERSION}";
+ export MAKE="make LIBTOOL=slibtool";
+ # 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}_x86_64_w64_mingw32 cross;
+ 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;
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}";
+ GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${PKG_GCC_VERSION}/libc/cbb-musl-pe.h)";
+ for __ in CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; do
+ export "${__}=${GCCFLAGS}";
+ done;
+ for __ in CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET; do
+ export "${__}=${GCCTARGET_FLAGS}";
+ done;
+ for __ in cbb_cflags_for_stage1 cbb_cflags_for_stage2 cbb_cflags_for_stage3 cbb_cflags_for_stage4; do
+ export "${__}=${CFLAGS_FOR_BUILD}" ;
+ done;
+ 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
+ insecure_mkdir ${PKG_PREFIX}/include;
+ [ \! -d ${PKG_PREFIX}/usr ] && \
+ ln -s -- . ${PKG_PREFIX}/usr;
+ _configure_args=" \
+ --enable-sjlj-exceptions \
+ --prefix=${PREFIX} \
+ --with-sysroot=${PREFIX}/${PKG_TARGET} \
+ --without-headers";
+ secure_rm ${PKG_BUILD_DIR};
+ insecure_mkdir ${PKG_BUILD_DIR};
+ secure_cd ${PKG_BUILD_DIR};
+ ../cbb-gcc-${PKG_GCC_VERSION}/configure \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --disable-multilib \
+ --disable-nls \
+ --disable-obsolete \
+ --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=${PKG_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
+ make ${MAKEFLAGS} all-gcc;
+ set_build_script_done build -install;
+ fi;
+ if ! is_build_script_done install; then
+ make ${MAKEFLAGS} install-gcc;
+ __="$(uname -s)";
+ if [ "${__#*CYGWIN*}" != "${__}" ]; then
+ ln -s -- ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a \
+ ln -s -- ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so;
+ fi;
+ set_build_script_done install finish;
+ fi;
+};
+
+pkg_gcc_native_x86_64_w64_mingw32_all() {
+ if [ ! -L ${PREFIX}/${PKG_TARGET}/mingw ]; then
+ secure_rm ${PREFIX}/${PKG_TARGET}/mingw;
+ ln -sf . ${PREFIX}/${PKG_TARGET}/mingw;
+ fi;
+ if [ ! -d ${PREFIX}/${PKG_TARGET}/mingw/include ]; then
+ secure_rm ${PREFIX}/${PKG_TARGET}/mingw/include;
+ insecure_mkdir ${PREFIX}/${PKG_TARGET}/mingw/include;
+ fi;
+ PKG_GCC_VERSION="${PKG_GCC_NATIVE_X86_W64_MINGW32_VERSION}";
+ export MAKE="make LIBTOOL=slibtool";
+ # GCC, native.
+ set_build_dir cbb-gcc-${PKG_GCC_VERSION}_x86_64_w64_mingw32 native;
+ export cbb_ldflags_for_target=--sysroot=${PKG_PREFIX} \
+ cbb_sysroot_for_libgcc=${PKG_PREFIX} \
+ cbb_target=${PKG_TARGET} \
+ cbb_xgcc_for_specs=${PKG_TARGET}-gcc \
+ sysroot_headers_suffix=${PKG_PREFIX};
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}";
+ GCCFLAGS="${CFLAGS:+${CFLAGS} }--include $(readlink -f ${WORKDIR}/cbb-gcc-${PKG_GCC_VERSION}/libc/cbb-musl-pe.h)";
+ for __ in CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; do
+ export "${__}=${GCCFLAGS}";
+ done;
+ for __ in CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET; do
+ export "${__}=${GCCTARGET_FLAGS}";
+ done;
+ for __ in cbb_cflags_for_stage1 cbb_cflags_for_stage2 cbb_cflags_for_stage3 cbb_cflags_for_stage4; do
+ export "${__}=${CFLAGS_FOR_BUILD}" ;
+ done;
+ 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
+ insecure_mkdir ${PKG_PREFIX}/${PKG_TARGET};
+ if [ \! -d ${PKG_PREFIX}/${PKG_TARGET}/usr ]; then
+ ln -s -- . ${PKG_PREFIX}/${PKG_TARGET}/usr;
+ fi;
+ _configure_args="${_configure_args} \
+ --build=x86_64-unknown-linux-gnu\
+ --host=x86_64-nt64-midipix \
+ --without-headers \
+ --enable-sjlj-exceptions \
+ --prefix=/ \
+ --with-elf=${PKG_PREFIX} \
+ --with-gmp=${PKG_PREFIX} \
+ --with-mpc=${PKG_PREFIX} \
+ --with-mpfr=${PKG_PREFIX} \
+ --with-sysroot=";
+ patch -b -d ${PKG_SUBDIR} -p1 < ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch;
+ secure_rm ${PKG_BUILD_DIR};
+ insecure_mkdir ${PKG_BUILD_DIR};
+ secure_cd ${PKG_BUILD_DIR};
+ ../cbb-gcc-${PKG_GCC_VERSION}/configure \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --disable-multilib \
+ --disable-nls \
+ --disable-obsolete \
+ --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=${PKG_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
+ make ${MAKEFLAGS} all-gcc;
+ make ${MAKEFLAGS} all-target-libgcc;
+ make ${MAKEFLAGS} all-target-libstdc++-v3;
+ make ${MAKEFLAGS} all;
+ set_build_script_done build -install;
+ fi;
+ if ! is_build_script_done install; then
+ make ${MAKEFLAGS} DESTDIR=${PKG_PREFIX} install;
+ set_build_script_done install finish;
+ fi;
+};
+
+# vim:filetype=sh
diff --git a/vars/gcc_full.vars b/vars/gcc_full.vars
new file mode 120000
index 00000000..55c0ef10
--- /dev/null
+++ b/vars/gcc_full.vars
@@ -0,0 +1 @@
+gcc.vars \ No newline at end of file
diff --git a/vars/gcc_libstdcpp_v3.vars b/vars/gcc_libstdcpp_v3.vars
new file mode 120000
index 00000000..55c0ef10
--- /dev/null
+++ b/vars/gcc_libstdcpp_v3.vars
@@ -0,0 +1 @@
+gcc.vars \ No newline at end of file
diff --git a/vars/gcc_native.vars b/vars/gcc_native.vars
new file mode 120000
index 00000000..55c0ef10
--- /dev/null
+++ b/vars/gcc_native.vars
@@ -0,0 +1 @@
+gcc.vars \ No newline at end of file
diff --git a/vars/gcc_native_x86_64_w64_mingw32.vars b/vars/gcc_native_x86_64_w64_mingw32.vars
new file mode 120000
index 00000000..55c0ef10
--- /dev/null
+++ b/vars/gcc_native_x86_64_w64_mingw32.vars
@@ -0,0 +1 @@
+gcc.vars \ No newline at end of file
diff --git a/vars/gcc_runtime.vars b/vars/gcc_runtime.vars
new file mode 120000
index 00000000..55c0ef10
--- /dev/null
+++ b/vars/gcc_runtime.vars
@@ -0,0 +1 @@
+gcc.vars \ No newline at end of file
diff --git a/vars/gcc_stage1.vars b/vars/gcc_stage1.vars
new file mode 120000
index 00000000..55c0ef10
--- /dev/null
+++ b/vars/gcc_stage1.vars
@@ -0,0 +1 @@
+gcc.vars \ No newline at end of file
diff --git a/vars/gcc_stage1_x86_64_w64_mingw32.vars b/vars/gcc_stage1_x86_64_w64_mingw32.vars
new file mode 120000
index 00000000..55c0ef10
--- /dev/null
+++ b/vars/gcc_stage1_x86_64_w64_mingw32.vars
@@ -0,0 +1 @@
+gcc.vars \ No newline at end of file
diff --git a/vars/musl.vars b/vars/musl.vars
new file mode 100644
index 00000000..bec1e06c
--- /dev/null
+++ b/vars/musl.vars
@@ -0,0 +1,111 @@
+#
+# . ./build.vars and set -o errexit -o noglob are assumed.
+# Order: no_complex, native, full
+#
+
+pkgp_musl_configure() {
+ secure_rm ${PKG_BUILD_DIR};
+ insecure_mkdir ${PKG_BUILD_DIR};
+ secure_cd ${PKG_BUILD_DIR};
+ env lz_cflags_cmdline="" \
+ lz_debug="yes" \
+ ../lazy/lazy \
+ -a ${ARCH} \
+ -c gcc \
+ -f ${PKG_PREFIX} \
+ -n musl \
+ -p ../musl-${PKG_MUSL_VERSION} \
+ -t ${lz_target} \
+ -x config;
+};
+
+pkg_musl_no_complex_all() {
+ PKG_MUSL_VERSION="${PKG_MUSL_NO_COMPLEX_VERSION}";
+ # Git clone what we need.
+ fetch_git lazy ${GITROOT}/lazy;
+ export lz_arch=${ARCH} lz_cflags_debug=-O2 lz_target=${TARGET};
+ # Musl: build (no-complex)
+ _install=install_no_complex;
+ set_build_dir musl-${PKG_MUSL_VERSION}-${2} cross;
+ if ! is_build_script_done fetch; then
+ fetch http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz \
+ ${PKG_MUSL_NO_COMPLEX_SHA256SUM};
+ secure_rm mmglue;
+ fetch_git mmglue ${GITROOT}/mmglue;
+ set_build_script_done fetch -extract;
+ fi;
+ if ! is_build_script_done extract; then
+ secure_rm musl-${PKG_MUSL_VERSION};
+ tar -xf ${DLCACHEDIR}/musl-${PKG_MUSL_VERSION}.tar.gz;
+ set +o noglob; cp -R -- mmglue/* musl-${PKG_MUSL_VERSION}/; set -o noglob;
+ set_build_script_done extract -configure;
+ fi;
+ if ! is_build_script_done configure; then
+ pkgp_musl_configure;
+ 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
+ ./lazy -e ${_install} \
+ -x build;
+ set_build_script_done build finish;
+ fi;
+};
+
+pkg_musl_native_all() {
+ PKG_MUSL_VERSION="${PKG_MUSL_NATIVE_VERSION}";
+ # Git clone what we need.
+ fetch_git lazy ${GITROOT}/lazy;
+ export lz_arch=${ARCH} lz_cflags_debug=-O2 lz_target=${TARGET};
+ # Musl: build (full)
+ _install=install;
+ set_build_dir musl-${PKG_MUSL_VERSION} native;
+ if ! is_build_script_done configure; then
+ pkgp_musl_configure;
+ 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
+ ./lazy -e ${_install} \
+ -x build;
+ ln -sf -- ../lib/libc.so ${PKG_PREFIX}/bin/ldd;
+ set_build_script_done build finish;
+ fi;
+};
+
+pkg_musl_full_all() {
+ PKG_MUSL_VERSION="${PKG_MUSL_FULL_VERSION}";
+ # Git clone what we need.
+ fetch_git lazy ${GITROOT}/lazy;
+ export lz_arch=${ARCH} lz_cflags_debug=-O2 lz_target=${TARGET};
+ # Musl: build (full)
+ _install=install;
+ set_build_dir musl-${PKG_MUSL_VERSION} cross;
+ if ! is_build_script_done configure; then
+ pkgp_musl_configure;
+ 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
+ ./lazy -e ${_install} \
+ -x build;
+ set_build_script_done build finish;
+ fi;
+};
+
+# vim:filetype=sh
diff --git a/vars/musl_full.vars b/vars/musl_full.vars
new file mode 120000
index 00000000..aed756b9
--- /dev/null
+++ b/vars/musl_full.vars
@@ -0,0 +1 @@
+musl.vars \ No newline at end of file
diff --git a/vars/musl_native.vars b/vars/musl_native.vars
new file mode 120000
index 00000000..aed756b9
--- /dev/null
+++ b/vars/musl_native.vars
@@ -0,0 +1 @@
+musl.vars \ No newline at end of file
diff --git a/vars/musl_no_complex.vars b/vars/musl_no_complex.vars
new file mode 120000
index 00000000..aed756b9
--- /dev/null
+++ b/vars/musl_no_complex.vars
@@ -0,0 +1 @@
+musl.vars \ No newline at end of file
diff --git a/vars/psxstub.vars b/vars/psxstub.vars
index cf18c4b1..2dad9c4e 100644
--- a/vars/psxstub.vars
+++ b/vars/psxstub.vars
@@ -2,7 +2,8 @@
# . ./build.vars and set -o errexit -o noglob are assumed.
#
-pkg_psxstub_finish() {
+pkg_psxstub_all() {
+ pkg_fetch;
if ! is_build_script_done install; then
if [ "${TARGET}" = i686-nt32-midipix ] \
|| [ "${TARGET}" = x86_64-nt64-midipix ]; then