summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--etc/README.md5
-rw-r--r--groups/010.host_deps.group2
-rw-r--r--groups/030.host_toolchain.group2
-rw-r--r--groups/110.native_toolchain.group2
-rw-r--r--midipix.env37
l---------patches/binutils_build-2.24.51.local.patch1
-rw-r--r--subr/pkg_configure_autotools.subr42
7 files changed, 56 insertions, 35 deletions
diff --git a/etc/README.md b/etc/README.md
index 9cce5684..c1be480d 100644
--- a/etc/README.md
+++ b/etc/README.md
@@ -804,7 +804,7 @@ VERSION`` and/or ``URLS_GIT``, respectively.
| FlagLine | String of {SP,VT}-separated flags, arguments, options, etc. pp. to a command |
| List(<sep>[,<sep|type>..]) | <sep>-separated list, optionally recursively and/or sub-typing, e.g.: ``List(:,=,String)`` and ``"name=value:name2=va lue "`` |
| PkgName | Single name of package |
-| PkgRelation | Single, possibly parametrised, package-package relation; see section [3.6](#36-package-package-and-packagegroup-group-relationships) |
+| PkgRelation | Single, possibly parametrised, package-package relation; see section [3.6](#36-package-package-and-packagegroup-group-relationships) |
| PkgVersion | Single version of package |
| Set(<type>) | Set of alternatives of <type>, e.g. one of ``cross``, ``host``, ``native`` |
| String | Semantically generic string |
@@ -818,12 +818,13 @@ VERSION`` and/or ``URLS_GIT``, respectively.
| Package variable name | Type | Description |
| ---------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| AR | CmdName | Toolchain library archive editor ``ar(1)`` |
+| AUTOCONF_CONFIG_GUESS | String | Either of ``midipix`` (copy Midipix ``config.guess`` from ``etc/config.guess``) or ``keep``; defaults to ``midipix`` |
| BASE_DIR | DirName(Abs) | Package build root directory beneath ``${BUILD_WORKDIR}`` |
| BUILD_DIR | DirName(Unit) | Package build directory beneath ``${PKG_BASE_DIR}`` |
| BUILD_STAGES_DISABLE | List( ) | Build stages to disable during package build |
| BUILD_TYPE | Set(String) | ``cross``: Cross-compiled toolchain, ``host``: host, ``native``: cross-compiled package |
| CC | FileName | Toolchain C compiler ``cc(1)`` |
-| CFLAGS_BUILD_EXTRA | FlagLine | Additional C compiler flags during package ``make(1)`` build |
+| CFLAGS_BUILD_EXTRA | FlagLine | Additional C compiler flags during package ``make(1)`` build |
| CFLAGS_BUILD | FlagLine | C compiler flags during package ``make(1)`` build |
| CFLAGS_CONFIGURE_EXTRA | FlagLine | Additional C compiler flags during package (GNU autotools in implementation and/or interface) configuration |
| CFLAGS_CONFIGURE | FlagLine | C compiler flags during package (GNU autotools in implementation and/or interface) configuration |
diff --git a/groups/010.host_deps.group b/groups/010.host_deps.group
index d9e44a14..05392d37 100644
--- a/groups/010.host_deps.group
+++ b/groups/010.host_deps.group
@@ -23,8 +23,10 @@ HOST_DEPS_PREFIX="${PREFIX}";
: ${PKG_BINUTILS_BUILD_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
: ${PKG_BINUTILS_BUILD_VERSION:=2.24.51};
: ${PKG_BINUTILS_BUILD_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_BUILD_VERSION}.tar.bz2};
+: ${PKG_BINUTILS_BUILD_AUTOCONF_CONFIG_GUESS:="keep"};
: ${PKG_BINUTILS_BUILD_CONFIGURE_ARGS:="--disable-werror --enable-deterministic-archives --enable-install-libbfd --prefix=${PREFIX}/opt"};
: ${PKG_BINUTILS_BUILD_LIBTOOL:=slibtool-static};
+: ${PKG_BINUTILS_BUILD_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/patches/binutils/binutils-${PKG_BINUTILS_BUILD_VERSION}.midipix.patch"};
: ${PKG_BINUTILS_BUILD_PREFIX:="${PREFIX}/opt"};
: ${PKG_BINUTILS_BUILD_VARS_FILE:="vars/binutils.vars"};
: ${PKG_BISON_HOST_DEPENDS:="readline_host"};
diff --git a/groups/030.host_toolchain.group b/groups/030.host_toolchain.group
index 09bf01d6..59ccae72 100644
--- a/groups/030.host_toolchain.group
+++ b/groups/030.host_toolchain.group
@@ -15,6 +15,7 @@ HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}";
: ${PKG_BINUTILS_HOST_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
: ${PKG_BINUTILS_HOST_VERSION:=2.24.51};
: ${PKG_BINUTILS_HOST_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_HOST_VERSION}.tar.bz2};
+: ${PKG_BINUTILS_HOST_AUTOCONF_CONFIG_GUESS:="keep"};
: ${PKG_BINUTILS_HOST_CFLAGS_CONFIGURE:="-I${PREFIX}/include -g2 -O0"};
: ${PKG_BINUTILS_HOST_CONFIGURE_ARGS:="--disable-werror --enable-deterministic-archives --prefix=${PREFIX} --target=${DEFAULT_TARGET} --with-sysroot=${PREFIX_CROSS}"};
: ${PKG_BINUTILS_HOST_INSTALL_FILES_V2:="
@@ -29,6 +30,7 @@ HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}";
: ${PKG_BINUTILS_HOST_MINGW32_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
: ${PKG_BINUTILS_HOST_MINGW32_VERSION:=2.24.51};
: ${PKG_BINUTILS_HOST_MINGW32_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_HOST_MINGW32_VERSION}.tar.bz2};
+: ${PKG_BINUTILS_HOST_MINGW32_AUTOCONF_CONFIG_GUESS:="keep"};
: ${PKG_BINUTILS_HOST_MINGW32_CONFIGURE_ARGS:="--disable-nls --disable-werror --enable-deterministic-archives --prefix=${PREFIX} --target=x86_64-w64-mingw32 --with-sysroot=${PREFIX_MINGW32}"};
: ${PKG_BINUTILS_HOST_MINGW32_LIBTOOL:=slibtool-static};
: ${PKG_BINUTILS_HOST_MINGW32_MAKEFLAGS_INSTALL:="PREFIX= prefix="};
diff --git a/groups/110.native_toolchain.group b/groups/110.native_toolchain.group
index 6bac8753..9fcbe96d 100644
--- a/groups/110.native_toolchain.group
+++ b/groups/110.native_toolchain.group
@@ -9,6 +9,7 @@ NATIVE_TOOLCHAIN_PREFIX="${PREFIX_NATIVE}";
: ${PKG_BINUTILS_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
: ${PKG_BINUTILS_VERSION:=2.24.51};
: ${PKG_BINUTILS_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_VERSION}.tar.bz2};
+: ${PKG_BINUTILS_AUTOCONF_CONFIG_GUESS:="keep"};
: ${PKG_BINUTILS_CONFIGURE_ARGS_EXTRA:="--enable-deterministic-archives --with-libelf=${PREFIX_NATIVE} --with-gmp=${PREFIX_NATIVE} --with-mpc=${PREFIX_NATIVE} --with-mpfr=${PREFIX_NATIVE} --with-sysroot=/"};
: ${PKG_BINUTILS_CFLAGS_CONFIGURE:="-isystem ${PREFIX_NATIVE}/include -Wno-error=cpp"};
: ${PKG_BINUTILS_LDFLAGS_CONFIGURE:="-L${PREFIX_NATIVE}/lib"};
@@ -22,6 +23,7 @@ NATIVE_TOOLCHAIN_PREFIX="${PREFIX_NATIVE}";
: ${PKG_BINUTILS_MINGW32_SHA256SUM:=250d3b2925c6b211fb16173b0b25bc091c58829fbcad3eb849645e0af52cf7fa};
: ${PKG_BINUTILS_MINGW32_VERSION:=2.24.51};
: ${PKG_BINUTILS_MINGW32_URL:=ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_MINGW32_VERSION}.tar.bz2};
+: ${PKG_BINUTILS_MINGW32_AUTOCONF_CONFIG_GUESS:="keep"};
: ${PKG_BINUTILS_MINGW32_CONFIGURE_ARGS:="--disable-nls --enable-deterministic-archives --host=${DEFAULT_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_MINGW32_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/patches/binutils/binutils-${PKG_BINUTILS_MINGW32_VERSION}.midipix.patch"};
: ${PKG_BINUTILS_MINGW32_PREFIX:="${PREFIX_NATIVE}"};
diff --git a/midipix.env b/midipix.env
index 501eb14b..b9e83fbf 100644
--- a/midipix.env
+++ b/midipix.env
@@ -18,24 +18,24 @@ DEFAULT_BUILD_STEPS=" \
clean \
finish";
DEFAULT_BUILD_VARS=" \
- AR BASE_DIR BUILD_DIR BUILD_STEPS_DISABLE BUILD_TYPE CC CFLAGS_BUILD \
- CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA CMAKE \
- CMAKE_ARGS CMAKE_ARGS_EXTRA CMAKE_LISTFILE CONFIG_CACHE CONFIG_CACHE_EXTRA \
- CONFIG_CACHE_LOCAL CONFIGURE CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA \
- CONFIGURE_TYPE CXX CXXFLAGS_CONFIGURE CXXFLAGS_CONFIGURE_EXTRA DEPENDS \
- DESTDIR DESTDIR_HOST DISABLED ENV_VARS_EXTRA FNAME FORCE_AUTORECONF \
- GITROOT INHERIT_FROM INSTALL_FILES INSTALL_FILES_DESTDIR \
- INSTALL_FILES_DESTDIR_EXTRA INSTALL_FILES_V2 INSTALL_TARGET INSTALL_TARGET_EXTRA \
- IN_TREE LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA \
- LIBTOOL MAKE MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL \
- MAKEFLAGS_INSTALL_EXTRA MAKEFLAGS_VERBOSITY MAKE_INSTALL_VNAME \
- MAKE_SUBDIRS MIRRORS MIRRORS_GIT NO_CLEAN NO_CLEAN_BASE_DIR NO_LOG_VARS \
- PATCHES_EXTRA PKG_CONFIG PKG_CONFIG_LIBDIR PKGLIST_DISABLE PREFIX \
- PYTHON RANLIB RPM_DISABLE SHA256SUM SOFORT_NATIVE_CC \
- SOFORT_NATIVE_CFLAGS SOFORT_NATIVE_CFLAGS_EXTRA SOFORT_NATIVE_CXX \
- SOFORT_NATIVE_CXXFLAGS SOFORT_NATIVE_CXXFLAGS_EXTRA SOFORT_NATIVE_LD \
- SOFORT_NATIVE_LDFLAGS SOFORT_NATIVE_LDFLAGS_EXTRA SUBDIR TARGET URL \
- URLS_GIT VARS_FILE VERSION";
+ AR AUTOCONF_CONFIG_GUESS BASE_DIR BUILD_DIR BUILD_STEPS_DISABLE BUILD_TYPE \
+ CC CFLAGS_BUILD CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA \
+ CMAKE CMAKE_ARGS CMAKE_ARGS_EXTRA CMAKE_LISTFILE CONFIG_CACHE \
+ CONFIG_CACHE_EXTRA CONFIG_CACHE_LOCAL CONFIGURE CONFIGURE_ARGS \
+ CONFIGURE_ARGS_EXTRA CONFIGURE_TYPE CXX CXXFLAGS_CONFIGURE \
+ CXXFLAGS_CONFIGURE_EXTRA DEPENDS DESTDIR DESTDIR_HOST DISABLED \
+ ENV_VARS_EXTRA FNAME FORCE_AUTORECONF GITROOT INHERIT_FROM INSTALL_FILES \
+ INSTALL_FILES_DESTDIR INSTALL_FILES_DESTDIR_EXTRA INSTALL_FILES_V2 \
+ INSTALL_TARGET INSTALL_TARGET_EXTRA IN_TREE LDFLAGS_BUILD_EXTRA \
+ LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA LIBTOOL MAKE MAKEFLAGS_BUILD \
+ MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA \
+ MAKEFLAGS_VERBOSITY MAKE_INSTALL_VNAME MAKE_SUBDIRS MIRRORS MIRRORS_GIT \
+ NO_CLEAN NO_CLEAN_BASE_DIR NO_LOG_VARS PATCHES_EXTRA PKG_CONFIG \
+ PKG_CONFIG_LIBDIR PKGLIST_DISABLE PREFIX PYTHON RANLIB RPM_DISABLE \
+ SHA256SUM SOFORT_NATIVE_CC SOFORT_NATIVE_CFLAGS SOFORT_NATIVE_CFLAGS_EXTRA \
+ SOFORT_NATIVE_CXX SOFORT_NATIVE_CXXFLAGS SOFORT_NATIVE_CXXFLAGS_EXTRA \
+ SOFORT_NATIVE_LD SOFORT_NATIVE_LDFLAGS SOFORT_NATIVE_LDFLAGS_EXTRA SUBDIR \
+ TARGET URL URLS_GIT VARS_FILE VERSION";
#
# Prerequisite commands
@@ -165,6 +165,7 @@ https://midipix.lucioillanes.de/repos_git/ \
#
# Default command & tool flags & variables
+: ${DEFAULT_AUTOCONF_CONFIG_GUESS:="midipix"};
: ${DEFAULT_CMAKE_LISTFILE:="CMakeLists.txt"};
: ${DEFAULT_GITROOT:=git://midipix.org};
: ${DEFAULT_GITROOT_HEAD:=git://midipix.org};
diff --git a/patches/binutils_build-2.24.51.local.patch b/patches/binutils_build-2.24.51.local.patch
new file mode 120000
index 00000000..7e0db750
--- /dev/null
+++ b/patches/binutils_build-2.24.51.local.patch
@@ -0,0 +1 @@
+binutils-2.24.51.local.patch \ No newline at end of file
diff --git a/subr/pkg_configure_autotools.subr b/subr/pkg_configure_autotools.subr
index 4f7f76ed..15d76566 100644
--- a/subr/pkg_configure_autotools.subr
+++ b/subr/pkg_configure_autotools.subr
@@ -3,15 +3,22 @@
#
pkg_configure_autotools() {
- local _config_cache="" _fname="" _subdir_tgt="";
+ local _config_cache="" _config_guest_fname="" _fname="" _subdir_tgt="";
if [ "${PKG_CONFIGURE_TYPE:+1}" = 1 ]\
&& [ "${PKG_CONFIGURE_TYPE}" != "autotools" ]; then
return 0;
fi;
+ if [ "${PKG_AUTOCONF_CONFIG_GUESS:-midipix}" = "midipix" ]; then
+ _config_guest_fname="config.guess";
+ else
+ _config_guest_fname="";
+ fi;
+
if rtl_exists_any "${PKG_BASE_DIR}/${PKG_SUBDIR}" \
- "config.guess" "configure.ac" "configure.in" "configure";
+ ${_config_guest_fname:+"${_config_guest_fname}"} \
+ "configure.ac" "configure.in" "configure";
then rtl_export_vars PKG_CONFIG "${PKG_PKG_CONFIG:-}" PKG_CONFIG_LIBDIR "${PKG_PKG_CONFIG_LIBDIR:-}";
if [ "${PKG_FORCE_AUTORECONF:-0}" -eq 1 ]\
&& ! (cd "${PKG_BASE_DIR}/${PKG_SUBDIR}" && autoreconf -fiv); then
@@ -29,12 +36,15 @@ pkg_configure_autotools() {
"${MIDIPIX_BUILD_PWD}/etc/config.sub" \
"${_subdir_tgt}/config.sub"; then
return 1;
- elif ! rtl_fileop install -m 0700 \
- "${MIDIPIX_BUILD_PWD}/etc/config.guess" \
- "${_subdir_tgt}/config.guess"; then
- return 1;
- else
- break;
+ fi;
+ if [ "${PKG_AUTOCONF_CONFIG_GUESS:-midipix}" = "midipix" ]; then
+ if ! rtl_fileop install -m 0700 \
+ "${MIDIPIX_BUILD_PWD}/etc/config.guess"\
+ "${_subdir_tgt}/config.guess"; then
+ return 1;
+ else
+ break;
+ fi;
fi;
fi;
done;
@@ -55,13 +65,15 @@ pkg_configure_autotools() {
|| ! rtl_fileop install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.sub" "${_fname}"; then
return 1;
fi;
- done
- for _fname in $(find "${PKG_BASE_DIR}/${PKG_SUBDIR}" -name config.guess); do
- if ! rtl_fileop mv "${_fname}" "${_fname}.orig"\
- || ! rtl_fileop install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.guess" "${_fname}"; then
- return 1;
- fi;
- done
+ done;
+ if [ "${PKG_AUTOCONF_CONFIG_GUESS:-midipix}" = "midipix" ]; then
+ for _fname in $(find "${PKG_BASE_DIR}/${PKG_SUBDIR}" -name config.guess); do
+ if ! rtl_fileop mv "${_fname}" "${_fname}.orig"\
+ || ! rtl_fileop install -m 0700 "${MIDIPIX_BUILD_PWD}/etc/config.guess" "${_fname}"; then
+ return 1;
+ fi;
+ done;
+ fi;
if [ "${PKG_BUILD_TYPE}" != host ]; then
if ! rtl_fileop touch "${PKG_BUILD_DIR}/config.cache"; then
return 1;