diff options
Diffstat (limited to '006.musl.build')
-rw-r--r-- | 006.musl.build | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/006.musl.build b/006.musl.build new file mode 100644 index 00000000..8868c63a --- /dev/null +++ b/006.musl.build @@ -0,0 +1,47 @@ +export lz_arch="${ARCH}" lz_cflags_debug="-O2" lz_target="${TARGET}"; + +if is_build_script_done finished; then + exit 212; +elif [ "x${3}" = "xno-complex" ]; then + # Musl: build (no-complex) + _install="install_no_complex"; + set_build_dir "musl-${MUSL_VERSION}" "${TARGET}-${3}"; + fetch "http://www.musl-libc.org/releases/musl-${MUSL_VERSION}.tar.gz"; + if ! is_build_script_done extracted; then + rm_if_exists "musl-${MUSL_VERSION}"; + tar -xf "musl-${MUSL_VERSION}.tar.gz"; + cp -R mmglue/* "musl-${MUSL_VERSION}/"; + set_build_script_done extracted -configured; + fi; +elif [ "x${3}" = "xnative" ]; then + # Musl: build (full) + _destdir="${PREFIX_NATIVE}"; + _install="install"; + set_build_dir "musl-${MUSL_VERSION}" "${3}"; +else + # Musl: build (full) + _install="install"; + set_build_dir "musl-${MUSL_VERSION}" "${TARGET}"; +fi; +if ! is_build_script_done configured; then + rm_if_exists -m -c "${_build_dir}"; + ../lazy/lazy \ + -a "${ARCH}" \ + -c gcc \ + -f "${_destdir:-${PREFIX_TARGET}}" \ + -n musl \ + -p "../musl-${MUSL_VERSION}" \ + -t "${lz_target}" \ + -x config; + set_build_script_done configured -built; +else + cd "${_build_dir}"; +fi; +if ! is_build_script_done built; then + ./lazy \ + -e "${_install}" \ + -x build; + set_build_script_done built finished; +fi; + +# vim:filetype=sh |