summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-01-26 16:36:56 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-01-26 20:52:31 +0000
commit1221f3e1114b09fb3e8aade25f8b92881211c2c9 (patch)
tree73f14046959bd39e20c3f5d4ed1c2f36a45558da
parent22b9a11253c58ee79f918b83283cf0ef81129829 (diff)
downloadmidipix_build-1221f3e1114b09fb3e8aade25f8b92881211c2c9.tar.bz2
midipix_build-1221f3e1114b09fb3e8aade25f8b92881211c2c9.tar.xz
vars/build.vars, build/gcc.*.mingw_w64.build: adds gcc.*.mingw_w64.
-rwxr-xr-xbuild.sh2
-rw-r--r--build/gcc.full.build41
l---------build/gcc.host.mingw_w64.build1
l---------build/gcc.stage1.mingw_w64.build1
-rw-r--r--subr/build.subr6
-rw-r--r--vars/build.vars15
6 files changed, 53 insertions, 13 deletions
diff --git a/build.sh b/build.sh
index 38e64445..3448fac9 100755
--- a/build.sh
+++ b/build.sh
@@ -103,7 +103,7 @@ for BUILD_TARGET_LC in $(subst_tgts ${BUILD_TARGETS_META}); do
(set -o errexit -o noglob;
MIDIPIX_BUILD_PWD=$(pwd); PKG_BUILD=${BUILD}; PKG_TARGET=${TARGET};
PKG_PREFIX=$(get_vars_unsafe ${BUILD_TARGET}_PREFIX \
- PKG_${BUILD_PACKAGE%.*}_PREFIX);
+ PKG_${BUILD_PACKAGE%%.*}_PREFIX);
cd ${WORKDIR}; source_scripts);
BUILD_SCRIPT_RC=${?}; case ${BUILD_SCRIPT_RC} in
0) log_msg succ "Finished \`${BUILD_PACKAGE_LC}' build.";
diff --git a/build/gcc.full.build b/build/gcc.full.build
index 91247e8c..d8076bbd 100644
--- a/build/gcc.full.build
+++ b/build/gcc.full.build
@@ -2,6 +2,14 @@
# . ./build.vars and set -o errexit -o noglob are assumed.
#
+if [ "${3}" = mingw_w64 ]; then
+ TARGET=x86_64-w64-mingw32;
+ if [ ! -L ${PKG_PREFIX}/mingw ]; then
+ secure_rm ${PKG_PREFIX}/mingw;
+ ln -sf . ${PKG_PREFIX}/mingw;
+ fi;
+fi;
+
# Order: stage1, runtime, full, native
export MAKE="make LIBTOOL=slibtool";
@@ -42,7 +50,8 @@ if [ "${2}" = runtime ]\
fi;
fi;
else
- if [ "${2}" = stage1 ]; then
+ if [ "${2}" = stage1 ]\
+ || [ "${2}" = host ]; then
# GCC, stage1.
if ! is_build_script_done fetch; then
fetch_git cbb-gcc-${PKG_GCC_VERSION} \
@@ -62,7 +71,8 @@ else
export cbb_ldflags_for_target=--sysroot=${PKG_PREFIX} \
cbb_sysroot_for_libgcc=${PKG_PREFIX} \
cbb_target=${TARGET} \
- cbb_xgcc_for_specs=${TARGET}-gcc;
+ cbb_xgcc_for_specs=${TARGET}-gcc \
+ sysroot_headers_suffix=${PKG_PREFIX};
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)";
@@ -77,7 +87,8 @@ else
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
- if [ "${2}" = stage1 ]; then
+ if [ "${2}" = stage1 ]\
+ || [ "${2}" = host ]; then
insecure_mkdir ${PKG_PREFIX}/include;
[ \! -d ${PKG_PREFIX}/usr ] && \
ln -s -- . ${PKG_PREFIX}/usr;
@@ -100,6 +111,23 @@ else
--with-mpfr=${PKG_PREFIX} \
--with-sysroot=";
fi;
+ if [ "${TARGET#*mingw*}" != "${TARGET}" ]; then
+ _configure_args="${_configure_args} \
+ --enable-sjlj-exceptions";
+ if [ "${2}" != host ]; then
+ _configure_args="${_configure_args} \
+ --host=${TARGET} \
+ --without-headers";
+ export AR=${PKG_TARGET}-ar;
+ export AS=${PKG_TARGET}-as;
+ export CC=${PKG_TARGET}-gcc;
+ export CXX=${PKG_TARGET}-c++;
+ export RANLIB=${PKG_TARGET}-ranlib;
+ fi;
+ else
+ _configure_args="${_configure_args} \
+ --disable-sjlj-exceptions";
+ fi;
secure_rm ${PKG_BUILD_DIR};
insecure_mkdir ${PKG_BUILD_DIR};
secure_cd ${PKG_BUILD_DIR};
@@ -109,7 +137,6 @@ else
--disable-multilib \
--disable-nls \
--disable-obsolete \
- --disable-sjlj-exceptions \
--disable-symvers \
--enable-canonical-system-headers \
--enable-__cxa_atexit \
@@ -136,7 +163,8 @@ else
set_build_script_done clean -build;
fi;
if ! is_build_script_done build; then
- if [ "${2}" = stage1 ]; then
+ if [ "${2}" = stage1 ]\
+ || [ "${2}" = host ]; then
make ${MAKEFLAGS} all-gcc;
elif [ "${2}" = native ]; then
make ${MAKEFLAGS} all-gcc;
@@ -147,7 +175,8 @@ else
set_build_script_done build -install;
fi;
if ! is_build_script_done install; then
- if [ "${2}" = stage1 ]; then
+ if [ "${2}" = stage1 ]\
+ || [ "${2}" = host ]; then
make ${MAKEFLAGS} install-gcc;
__="$(uname -s)";
if [ "${__#*CYGWIN*}" != "${__}" ]; then
diff --git a/build/gcc.host.mingw_w64.build b/build/gcc.host.mingw_w64.build
new file mode 120000
index 00000000..b809d40d
--- /dev/null
+++ b/build/gcc.host.mingw_w64.build
@@ -0,0 +1 @@
+gcc.full.build \ No newline at end of file
diff --git a/build/gcc.stage1.mingw_w64.build b/build/gcc.stage1.mingw_w64.build
new file mode 120000
index 00000000..b809d40d
--- /dev/null
+++ b/build/gcc.stage1.mingw_w64.build
@@ -0,0 +1 @@
+gcc.full.build \ No newline at end of file
diff --git a/subr/build.subr b/subr/build.subr
index 6078cc40..7851afe0 100644
--- a/subr/build.subr
+++ b/subr/build.subr
@@ -118,7 +118,11 @@ init_build_vars() {
};
source_scripts() {
- set -- ${BUILD_PACKAGE_LC%.*} ${BUILD_PACKAGE_LC#*.};
+ _ss_pkg_name="${BUILD_PACKAGE_LC%.*}";
+ _ss_arg1="${BUILD_PACKAGE_LC#*.}";
+ _ss_arg1="${_ss_arg1%%.*}";
+ _ss_arg2="${BUILD_PACKAGE_LC##*.}";
+ set -- ${_ss_pkg_name} ${_ss_arg1} ${_ss_arg2};
for SCRIPT_SOURCE in vars/${BUILD_PACKAGE_LC}.vars ${BUILD_SCRIPT_FNAME}; do
if [ -f ${MIDIPIX_BUILD_PWD}/${SCRIPT_SOURCE} ]; then
if [ ${ARG_DRYRUN:-0} -eq 1 ]; then
diff --git a/vars/build.vars b/vars/build.vars
index c6d79e52..90b6b1af 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";
+HOST_TOOLCHAIN_PACKAGES="slibtool_host perk_host binutils_host binutils_host_mingw_w64 gcc.stage1 psxstub musl.no-complex gcc.runtime musl.full gcc.libstdc++-v3 gcc.full pkgconf_host file_host gcc.host.mingw_w64";
HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}";
: ${PKG_SLIBTOOL_HOST_URL:=${GITROOT}/slibtool};
: ${PKG_SLIBTOOL_HOST_URL_TYPE:=git};
@@ -102,6 +102,11 @@ 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_PSXSTUB_URL:=${GITROOT}/psxstub};
: ${PKG_PSXSTUB_URL_TYPE:=git};
: ${PKG_PKGCONF_HOST_SHA256SUM:=7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f};
@@ -433,10 +438,10 @@ LEAF_PACKAGES_LDFLAGS_CONFIGURE="--sysroot=${PREFIX_NATIVE}";
LEAF_PACKAGES_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}";
LEAF_PACKAGES_PACKAGES="
apk_tools bash bc bdwgc chicken clang_host coreutils cparser cron dash datamash diffutils dos2unix
-ed figlet file findutils gawk git gnupg grep hexcurse htop inetutils infounzip infozip irssi john ldns
-less lynx make man_db mc mksh mingw_w64 nano netcat openssh p7zip pacman patch perl procps_ng python3
-rsync rxvt_unicode sed smallbasic tar tcsh the_silver_searcher tmux util_linux vim weechat wget which
-whois xeyes xwd zsh";
+ed figlet file findutils gawk gcc.stage1.mingw_w64 git gnupg grep hexcurse htop inetutils infounzip
+infozip irssi john ldns less lynx make man_db mc mksh nano netcat openssh p7zip pacman patch perl
+procps_ng python3 rsync rxvt_unicode sed smallbasic tar tcsh the_silver_searcher tmux util_linux
+vim weechat wget which whois xeyes xwd zsh";
LEAF_PACKAGES_PREFIX="${PREFIX_NATIVE}";
: ${PKG_APK_TOOLS_SHA256SUM:=def2b2c23cd12fd2a9c19be49653b0d1bf9d81a26dac5a0ee79a1351d674f93b};
: ${PKG_APK_TOOLS_VERSION:=2.6.8};