summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--vars/build.vars31
-rw-r--r--vars/musl.vars190
2 files changed, 42 insertions, 179 deletions
diff --git a/vars/build.vars b/vars/build.vars
index acc98612..ab892df9 100644
--- a/vars/build.vars
+++ b/vars/build.vars
@@ -138,15 +138,35 @@ HOST_TOOLCHAIN_PREFIX="${PREFIX_CROSS}";
: ${PKG_PSXSTUB_HOST_IN_TREE:=1};
: ${PKG_PSXSTUB_HOST_BUILD_STEPS_DISABLE:=build};
: ${PKG_PSXSTUB_HOST_ENV_VARS_EXTRA:=TARGET=${DEFAULT_TARGET}};
+
+: ${PKG_MUSL_NO_COMPLEX_HOST_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e};
: ${PKG_MUSL_NO_COMPLEX_HOST_VERSION:=1.1.12};
+: ${PKG_MUSL_NO_COMPLEX_HOST_URL:="http://www.musl-libc.org/releases/musl-${PKG_MUSL_NO_COMPLEX_HOST_VERSION}.tar.gz"}
+: ${PKG_MUSL_NO_COMPLEX_HOST_URLS_GIT:="mmglue=${DEFAULT_GITROOT}/mmglue@main"};
: ${PKG_MUSL_NO_COMPLEX_HOST_BASE_DIR:=${BUILD_WORKDIR}/musl_no_complex-host-${DEFAULT_TARGET}};
+: ${PKG_MUSL_NO_COMPLEX_HOST_BUILD_DIR:=build/musl};
+: ${PKG_MUSL_NO_COMPLEX_HOST_BUILD_TYPE:=cross};
+: ${PKG_MUSL_NO_COMPLEX_HOST_CONFIGURE:=build/mmglue/configure};
+: ${PKG_MUSL_NO_COMPLEX_HOST_CONFIGURE_ARGS:="--source-dir=../../musl-${PKG_MUSL_NO_COMPLEX_HOST_VERSION} --no-complex --prefix= --target=${DEFAULT_TARGET} --sysroot=${PREFIX_CROSS}"};
+: ${PKG_MUSL_NO_COMPLEX_HOST_SUBDIR:=musl-${PKG_MUSL_NO_COMPLEX_HOST_VERSION}};
+
: ${PKG_GCC_RUNTIME_HOST_VERSION:=4.6.4};
: ${PKG_GCC_RUNTIME_HOST_BASE_DIR:=${BUILD_WORKDIR}/gcc-host-${DEFAULT_TARGET}};
: ${PKG_GCC_RUNTIME_HOST_GITROOT:=${DEFAULT_GITROOT}};
: ${PKG_GCC_RUNTIME_HOST_NO_CLEAN_BASE_DIR:=1};
: ${PKG_GCC_RUNTIME_HOST_PREFIX:=${PREFIX}};
+
+: ${PKG_MUSL_FULL_HOST_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e};
: ${PKG_MUSL_FULL_HOST_VERSION:=1.1.12};
+: ${PKG_MUSL_FULL_HOST_URL:="http://www.musl-libc.org/releases/musl-${PKG_MUSL_FULL_HOST_VERSION}.tar.gz"}
+: ${PKG_MUSL_FULL_HOST_URLS_GIT:="mmglue=${DEFAULT_GITROOT}/mmglue@main"};
: ${PKG_MUSL_FULL_HOST_BASE_DIR:=${BUILD_WORKDIR}/musl_full-host-${DEFAULT_TARGET}};
+: ${PKG_MUSL_FULL_HOST_BUILD_DIR:=build/musl};
+: ${PKG_MUSL_FULL_HOST_BUILD_TYPE:=cross};
+: ${PKG_MUSL_FULL_HOST_CONFIGURE:=build/mmglue/configure};
+: ${PKG_MUSL_FULL_HOST_CONFIGURE_ARGS:="--source-dir=../../musl-${PKG_MUSL_FULL_HOST_VERSION} --prefix= --target=${DEFAULT_TARGET} --sysroot=${PREFIX_CROSS}"};
+: ${PKG_MUSL_FULL_HOST_SUBDIR:=musl-${PKG_MUSL_FULL_HOST_VERSION}};
+
: ${PKG_GCC_LIBSTDCPP_V3_HOST_VERSION:=4.6.4};
: ${PKG_GCC_LIBSTDCPP_V3_HOST_BASE_DIR:=${BUILD_WORKDIR}/gcc-host-${DEFAULT_TARGET}};
: ${PKG_GCC_LIBSTDCPP_V3_HOST_GITROOT:=${DEFAULT_GITROOT}};
@@ -246,10 +266,17 @@ NATIVE_TOOLCHAIN_PREFIX="${PREFIX_NATIVE}";
: ${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_PATCHES_EXTRA:="${BUILD_WORKDIR}/chainport/binutils-${PKG_BINUTILS_VERSION}.midipix.patch"};
: ${PKG_BINUTILS_LIBTOOL:=slibtool-static};
+
: ${PKG_MUSL_FULL_SHA256SUM:=720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e};
: ${PKG_MUSL_FULL_VERSION:=1.1.12};
-: ${PKG_MUSL_FULL_URL:=http://www.musl-libc.org/releases/musl-${PKG_MUSL_NATIVE_VERSION}.tar.gz};
-: ${PKG_MUSL_FULL_BASE_DIR:=${BUILD_WORKDIR}/musl-native-${DEFAULT_TARGET}};
+: ${PKG_MUSL_FULL_URL:="http://www.musl-libc.org/releases/musl-${PKG_MUSL_FULL_VERSION}.tar.gz"}
+: ${PKG_MUSL_FULL_URLS_GIT:="mmglue=${DEFAULT_GITROOT}/mmglue@main"};
+: ${PKG_MUSL_FULL_BASE_DIR:=${BUILD_WORKDIR}/musl_full-native-${DEFAULT_TARGET}};
+: ${PKG_MUSL_FULL_BUILD_DIR:=build/musl};
+: ${PKG_MUSL_FULL_CONFIGURE:=build/mmglue/configure};
+: ${PKG_MUSL_FULL_CONFIGURE_ARGS:="--source-dir=../../musl-${PKG_MUSL_FULL_VERSION} --prefix= --target=${DEFAULT_TARGET} --sysroot=${PREFIX_CROSS}"};
+: ${PKG_MUSL_FULL_SUBDIR:=musl-${PKG_MUSL_FULL_VERSION}};
+
: ${PKG_GCC_FULL_VERSION:=4.6.4};
: ${PKG_GCC_FULL_BASE_DIR:=${BUILD_WORKDIR}/gcc-native-${DEFAULT_TARGET}};
: ${PKG_GCC_FULL_GITROOT:=${DEFAULT_GITROOT}};
diff --git a/vars/musl.vars b/vars/musl.vars
index f1e819f0..97ee5cc5 100644
--- a/vars/musl.vars
+++ b/vars/musl.vars
@@ -1,187 +1,23 @@
#
# set -o errexit -o noglob are assumed.
-# Order: no_complex_host, full_host, full
#
-pkgp_musl_build_dir() {
- PKG_BUILD_DIR="${1}-${2}-${PKG_TARGET}";
+pkgp_mmglue_fetch_git() {
+ ex_rtl_fileop rm "${PKG_BASE_DIR}/mmglue";
+ ex_rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "mmglue=${DEFAULT_GITROOT}/mmglue@main";
+ ex_pkg_state_set "${PKG_NAME}" fetch -extract;
};
-pkgp_musl_configure() {
- ex_rtl_fileop rm "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
- ex_rtl_fileop mkdir "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
- ex_rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
- env lz_cflags_cmdline="" \
- lz_debug="yes" \
- ../lazy/lazy \
- -a "${ARCH}" \
- -c gcc \
- -f "${PKG_DESTDIR}" \
- -n musl \
- -p "../musl-${PKG_VERSION}" \
- -t "${lz_target}" \
- -x config;
-};
+pkg_musl_no_complex_host_fetch_git() {
+ pkgp_mmglue_fetch_git
+}
-pkg_musl_no_complex_host_all() {
- local _install="" _restart_at="${1}";
- PKG_MUSL_VERSION="${PKG_VERSION}";
- # Git clone what we need.
- ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "lazy=${DEFAULT_GITROOT}/lazy";
- export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${PKG_TARGET}";
- # Musl: build (no-complex)
- _install=install_no_complex;
- pkgp_musl_build_dir "musl-${PKG_VERSION}" cross;
- if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then
- ex_rtl_fetch_url_wget \
- "http://www.musl-libc.org/releases/musl-${PKG_VERSION}.tar.gz" \
- "${PKG_MUSL_NO_COMPLEX_SHA256SUM}";
- ex_rtl_fileop rm "${PKG_BASE_DIR}/mmglue";
- ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "mmglue=${DEFAULT_GITROOT}/mmglue";
- ex_pkg_state_set "${PKG_NAME}" fetch -extract;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" extract "${_restart_at}"; then
- ex_rtl_fileop rm "musl-${PKG_VERSION}";
- tar -C "${PKG_BASE_DIR}" -xf "${BUILD_DLCACHEDIR}/musl-${PKG_VERSION}.tar.gz";
- set +o noglob;
- ex_rtl_fileop cp ${PKG_BASE_DIR}/mmglue/* "${PKG_BASE_DIR}/musl-${PKG_VERSION}/";
- set -o noglob;
- ex_pkg_state_set "${PKG_NAME}" extract -patch;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" patch "${_restart_at}"; then
- set +o noglob; for _patch_fname in \
- "${MIDIPIX_BUILD_PWD}/patches/musl/"*.patch; do
- if [ -r "${_patch_fname}" ]; then
- patch -b -d "${PKG_BASE_DIR}/musl-${PKG_VERSION}" -p1 < "${_patch_fname}";
- fi;
- done; set -o noglob;
- ex_pkg_state_set "${PKG_NAME}" patch -configure;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then
- pkgp_musl_configure;
- ex_pkg_state_set "${PKG_NAME}" configure -build;
- else
- ex_rtl_fileop cd "${PKG_BUILD_DIR}";
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
- pkg_install_subdirs;
- ex_pkg_state_set "${PKG_NAME}" install_subdirs -build;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
- ./lazy -e "${_install}" -x build;
- ex_pkg_state_set "${PKG_NAME}" build -install;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then
- pkg_install;
- ex_pkg_state_set "${PKG_NAME}" install finish;
- fi;
-};
+pkg_musl_full_host_fetch_git() {
+ pkgp_mmglue_fetch_git
+}
-pkg_musl_full_host_all() {
- local _install="" _restart_at="${1}";
- # Git clone what we need.
- ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "lazy=${DEFAULT_GITROOT}/lazy";
- export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${PKG_TARGET}";
- # Musl: build (full)
- _install=install;
- pkgp_musl_build_dir "musl-${PKG_VERSION}" cross;
- if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then
- ex_rtl_fetch_url_wget \
- "http://www.musl-libc.org/releases/musl-${PKG_VERSION}.tar.gz" \
- "${PKG_MUSL_NO_COMPLEX_SHA256SUM}";
- ex_rtl_fileop rm "${PKG_BASE_DIR}/mmglue";
- ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "mmglue=${DEFAULT_GITROOT}/mmglue";
- ex_pkg_state_set "${PKG_NAME}" fetch -extract;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" extract "${_restart_at}"; then
- ex_rtl_fileop rm "musl-${PKG_VERSION}";
- tar -C "${PKG_BASE_DIR}" -xf "${BUILD_DLCACHEDIR}/musl-${PKG_VERSION}.tar.gz";
- set +o noglob;
- ex_rtl_fileop cp ${PKG_BASE_DIR}/mmglue/* "${PKG_BASE_DIR}/musl-${PKG_VERSION}/";
- set -o noglob;
- ex_pkg_state_set "${PKG_NAME}" extract -patch;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" patch "${_restart_at}"; then
- set +o noglob; for _patch_fname in \
- "${MIDIPIX_BUILD_PWD}/patches/musl/"*.patch; do
- if [ -r "${_patch_fname}" ]; then
- patch -b -d "${PKG_BASE_DIR}/musl-${PKG_VERSION}" -p1 < "${_patch_fname}";
- fi;
- done; set -o noglob;
- ex_pkg_state_set "${PKG_NAME}" patch -configure;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then
- pkgp_musl_configure;
- ex_pkg_state_set "${PKG_NAME}" configure -build;
- else
- ex_rtl_fileop cd "${PKG_BUILD_DIR}";
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
- pkg_install_subdirs;
- ex_pkg_state_set "${PKG_NAME}" install_subdirs -build;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
- ./lazy -e "${_install}" -x build;
- ex_pkg_state_set "${PKG_NAME}" build -install;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then
- pkg_install;
- ex_pkg_state_set "${PKG_NAME}" install finish;
- fi;
-};
-
-pkg_musl_full_all() {
- local _install="" _restart_at="${1}";
- # Git clone what we need.
- ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "lazy=${DEFAULT_GITROOT}/lazy";
- export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${PKG_TARGET}";
- # Musl: build (full)
- _install=install;
- pkgp_musl_build_dir "musl-${PKG_VERSION}" native;
- if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then
- ex_rtl_fetch_url_wget \
- "http://www.musl-libc.org/releases/musl-${PKG_VERSION}.tar.gz" \
- "${PKG_MUSL_NO_COMPLEX_SHA256SUM}";
- ex_rtl_fileop rm "${PKG_BASE_DIR}/mmglue";
- ex_rtl_fetch_urls_git "${PKG_BASE_DIR}" "mmglue=${DEFAULT_GITROOT}/mmglue";
- ex_pkg_state_set "${PKG_NAME}" fetch -extract;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" extract "${_restart_at}"; then
- ex_rtl_fileop rm "musl-${PKG_VERSION}";
- tar -C "${PKG_BASE_DIR}" -xf "${BUILD_DLCACHEDIR}/musl-${PKG_VERSION}.tar.gz";
- set +o noglob;
- ex_rtl_fileop cp ${PKG_BASE_DIR}/mmglue/* "${PKG_BASE_DIR}/musl-${PKG_VERSION}/";
- set -o noglob;
- ex_pkg_state_set "${PKG_NAME}" extract -patch;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" patch "${_restart_at}"; then
- set +o noglob; for _patch_fname in \
- "${MIDIPIX_BUILD_PWD}/patches/musl/"*.patch; do
- if [ -r "${_patch_fname}" ]; then
- patch -b -d "${PKG_BASE_DIR}/musl-${PKG_VERSION}" -p1 < "${_patch_fname}";
- fi;
- done; set -o noglob;
- ex_pkg_state_set "${PKG_NAME}" patch -configure;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then
- pkgp_musl_configure;
- ex_pkg_state_set "${PKG_NAME}" configure -build;
- else
- ex_rtl_fileop cd "${PKG_BUILD_DIR}";
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
- pkg_install_subdirs;
- ex_pkg_state_set "${PKG_NAME}" install_subdirs -build;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
- ./lazy -e "${_install}" -x build;
- ex_rtl_fileop ln_symbolic ../lib/libc.so "${PKG_DESTDIR}/bin/ldd";
- ex_pkg_state_set "${PKG_NAME}" build -install;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then
- pkg_install;
- ex_pkg_state_set "${PKG_NAME}" install finish;
- fi;
-};
+pkg_musl_full_fetch_git() {
+ pkgp_mmglue_fetch_git
+}
# vim:filetype=sh