summaryrefslogtreecommitdiffhomepage
path: root/006.musl.full.build
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-07-11 15:51:22 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-07-11 16:53:42 +0000
commit672107a200f15d952f2d8c3750e8c58be5035ee3 (patch)
treebd024539f9ff1cbad02bf69ae49acb35a6265ec3 /006.musl.full.build
parent49ffbe6ed6b69b04944d7a1ef8164f3920fc7507 (diff)
downloadmidipix_build-672107a200f15d952f2d8c3750e8c58be5035ee3.tar.bz2
midipix_build-672107a200f15d952f2d8c3750e8c58be5035ee3.tar.xz
- Build slibtool_host in build level 0 and slibtool in build level 1.
- Fetch lazy in 006.musl.full.build. - Infer the default number of make(1) jobs to run simultaneously from /proc/cpuinfo. - Merges <https://ftp.gnu.org/gnu/bash/bash-4.3-patches/> into bash-4.3.local.patch. - Print all attributes off SGR at the start of a message in log_msg(). - Simplify 009.gcc.full.build and fetch{,_git}(). - Only create library archives for shared objects that have actually been installed. - Only invoke git-clone(1) and wget(1) in fetch{_git,}() when necessary.
Diffstat (limited to '006.musl.full.build')
-rw-r--r--006.musl.full.build71
1 files changed, 71 insertions, 0 deletions
diff --git a/006.musl.full.build b/006.musl.full.build
new file mode 100644
index 00000000..4c6e2310
--- /dev/null
+++ b/006.musl.full.build
@@ -0,0 +1,71 @@
+#
+# . ./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 [ "${3}" = no-complex ]; then
+ # Musl: build (no-complex)
+ _install=install_no_complex;
+ set_build_dir musl-${PKG_MUSL_VERSION}-${3} cross;
+ if ! is_build_script_done fetch; then
+ fetch http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz \
+ ${PKG_MUSL_SHA256SUM};
+ rm_if_exists mmglue;
+ fetch_git mmglue ${GITROOT}/mmglue;
+ set_build_script_done fetch -extract;
+ fi;
+ if ! is_build_script_done extract; then
+ rm_if_exists 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 -patch;
+ fi;
+ if ! is_build_script_done patch; then
+ patch -b -d musl-${PKG_MUSL_VERSION} -p1 \
+ < ${MIDIPIX_BUILD_PWD}/musl-${PKG_MUSL_VERSION}.local.patch;
+ set_build_script_done patch -configure;
+ fi;
+elif [ "${3}" = native ]; then
+ # Musl: build (full)
+ _install=install;
+ set_build_dir musl-${PKG_MUSL_VERSION} "${3}";
+elif [ "${3}" = full ]; then
+ # Musl: build (full)
+ _install=install;
+ set_build_dir musl-${PKG_MUSL_VERSION} cross;
+fi;
+if ! is_build_script_done configure; then
+ rm_if_exists -m -c ${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;
+ [ "${3}" = native ] && \
+ ln -sf -- ../lib/libc.so ${PKG_PREFIX}/bin/ldd;
+ set_build_script_done build finish;
+fi;
+
+# vim:filetype=sh