From 59765f508225998d8a73b1da8380ff06b4a6b79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Mon, 14 Nov 2016 23:02:47 +0100 Subject: 1) Replaces the SysV-style build script link mechanism w/ build {,meta-}targets, 2) splits build.{subr,sh}} into subr/{build,pkg,rtl}.subr and build.sh, 3) replaces {997.strip,998.midipix_sh,999.tarballs}.build with subr/{strip,tarball}.subr, 4) moves patches to patches/, vars files to vars/, and everything else to etc/, 5) renames `Create `Midipix mintty shell' shortcut.vbs' to midipix_shortcut.vbs, 6) fixes a Weechat configure issue, and 7) updates etc/{build.usage,README}. --- scripts/musl.full.build | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 scripts/musl.full.build (limited to 'scripts/musl.full.build') diff --git a/scripts/musl.full.build b/scripts/musl.full.build new file mode 100644 index 00000000..35d1de28 --- /dev/null +++ b/scripts/musl.full.build @@ -0,0 +1,68 @@ +# +# . ./build.vars and set -o errexit -o noglob are assumed. +# + +# Order: no-complex, native + +# Git clone what we need. +fetch_git lazy ${GITROOT}/lazy; + +export lz_arch=${ARCH} lz_cflags_debug=-O2 lz_target=${TARGET}; + +if [ "${2}" = no-complex ]; then + # 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_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; +elif [ "${2}" = native ]; then + # Musl: build (full) + _install=install; + set_build_dir musl-${PKG_MUSL_VERSION} "${2}"; +elif [ "${2}" = full ]; then + # Musl: build (full) + _install=install; + set_build_dir musl-${PKG_MUSL_VERSION} cross; +fi; +if ! is_build_script_done configure; then + secure_rm ${PKG_BUILD_DIR}; + insecure_mkdir ${PKG_BUILD_DIR}; + secure_cd ${PKG_BUILD_DIR}; + env lz_cflags_cmdline="${PKG_MUSL_CFLAGS_CONFIGURE_EXTRA}" \ + lz_debug="yes" \ + ../lazy/lazy \ + -a ${ARCH} \ + -c gcc \ + -f ${PKG_PREFIX} \ + -n musl \ + -p ../musl-${PKG_MUSL_VERSION} \ + -t ${lz_target} \ + -x config; + 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; + [ "${2}" = native ] && \ + ln -sf -- ../lib/libc.so ${PKG_PREFIX}/bin/ldd; + set_build_script_done build finish; +fi; + +# vim:filetype=sh -- cgit v1.2.3