summaryrefslogtreecommitdiffhomepage
path: root/vars
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-03-15 09:14:23 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-03-15 09:14:23 +0000
commitb6a9a1a3c8b98077cce47d579069c42080d17da5 (patch)
tree56301493a28e098de840c21b6d7e2776dd5574a1 /vars
parent3e295f4e81f867fbd8b6c9c306bc1ca124e41d8b (diff)
downloadmidipix_build-b6a9a1a3c8b98077cce47d579069c42080d17da5.tar.bz2
midipix_build-b6a9a1a3c8b98077cce47d579069c42080d17da5.tar.xz
General cleanup.
Diffstat (limited to 'vars')
-rw-r--r--vars/clang_host.vars4
-rw-r--r--vars/gcc.vars493
-rw-r--r--vars/git.vars2
-rw-r--r--vars/libxml2.vars4
-rw-r--r--vars/llvm_host.vars4
-rw-r--r--vars/rpm_host.vars2
6 files changed, 270 insertions, 239 deletions
diff --git a/vars/clang_host.vars b/vars/clang_host.vars
index b7ec7e97..851564f1 100644
--- a/vars/clang_host.vars
+++ b/vars/clang_host.vars
@@ -6,7 +6,7 @@ pkg_clang_host_configure() {
if ! rtl_fileop rm "../cfe-${PKG_VERSION}-host" \
|| ! rtl_fileop mkdir "../cfe-${PKG_VERSION}-host" \
|| ! rtl_fileop cd "../cfe-${PKG_VERSION}-host" \
- || ! rtl_log_msg info "Bootstrapping clang_host..." \
+ || ! rtl_log_msg verbose "Bootstrapping clang_host..." \
|| ! ("${PREFIX}/bin/cmake" \
"../cfe-${PKG_VERSION}.src" \
-DCLANG_BUILD_EXAMPLES:BOOL=OFF \
@@ -19,7 +19,7 @@ pkg_clang_host_configure() {
-DLLVM_PREFIX="${PKG_PREFIX}" \
-G "Unix Makefiles" \
-Wno-dev) \
- || ! rtl_log_msg info "Finished bootstrapping clang_host."; then
+ || ! rtl_log_msg verbose "Finished bootstrapping clang_host."; then
return 1;
fi;
};
diff --git a/vars/gcc.vars b/vars/gcc.vars
index bf2ab44f..f2354ca1 100644
--- a/vars/gcc.vars
+++ b/vars/gcc.vars
@@ -4,157 +4,153 @@
# Order: stage1_mingw32, native_mingw32
#
+#
+# Private subroutines
+#
pkgp_gcc_build_dir() { PKG_BUILD_DIR="${1}-${2}-${PKG_TARGET}"; };
-pkgp_gcc_state_set() { echo "step unknown ${PKG_NAME} ${1}" >&3; ex_pkg_state_set "${PKG_NAME}" ${1} -${2}; };
+pkgp_gcc_state_set() {
+ printf "step unknown %s %s\n" "${PKG_NAME}" "${1}" >&3;
+ ex_pkg_state_set "${PKG_NAME}" ${1} -${2};
+};
+
+pkgp_gcc_configure() {
+ if ! rtl_fileop rm "${PKG_BASE_DIR}/${PKG_BUILD_DIR}" \
+ || ! rtl_fileop mkdir "${PKG_BASE_DIR}/${PKG_BUILD_DIR}" \
+ || ! rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}" \
+ || ! "../cbb-gcc-${PKG_VERSION}/configure" "${@}" \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --disable-multilib \
+ --disable-nls \
+ --disable-obsolete \
+ --disable-symvers \
+ --enable-canonical-system-headers \
+ --enable-__cxa_atexit \
+ --enable-debug \
+ --enable-gnu-indirect-function \
+ --enable-gnu-unique-object \
+ --enable-initfini-array \
+ --enable-languages=c,c++,fortran,objc,lto \
+ --enable-libstdcxx-debug \
+ --enable-lto \
+ --enable-multiarch \
+ --enable-secureplt \
+ --enable-shared \
+ --enable-threads=posix \
+ --target="${PKG_TARGET}" \
+ --with-fpmath=sse; then
+ return 1;
+ else
+ pkgp_gcc_state_set "configure" -"build";
+ fi;
+};
pkgp_gcc_setup_env() {
- local __="";
- export MAKE="make LIBTOOL=slibtool";
- export cbb_target="${PKG_TARGET}";
- unwind_midipix_h=$(readlink -f "${PKG_BASE_DIR}/cbb-gcc-${1}/gcc/unwind-midipix.h");
+ local _vname="";
+ for _vname in CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD \
+ CXXFLAGS CXXFLAGS_FOR_BUILD; do
+ export "${_vname}=${GCCFLAGS}";
+ done;
+ for _vname in CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET \
+ LIBCFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET; do
+ export "${_vname}=${GCCTARGET_FLAGS}";
+ done;
+ for _vname in cbb_cflags_for_stage1 cbb_cflags_for_stage2 \
+ cbb_cflags_for_stage3 cbb_cflags_for_stage4; do
+ export "${_vname}=${CFLAGS_FOR_BUILD}" ;
+ done;
+};
+
+pkgp_gcc_setup_vars() {
+ local _unwind_midipix_h="";
+ export cbb_target="${PKG_TARGET}" MAKE="make LIBTOOL=slibtool";
+ _unwind_midipix_h="$(readlink -f "${PKG_BASE_DIR}/cbb-gcc-${PKG_VERSION}/gcc/unwind-midipix.h")";
case "${PKG_NAME}" in
+ gcc_full)
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}";
+ GCCTARGET_FLAGS="$(rtl_lconcat "${GCCTARGET_FLAGS}" "--include=${_unwind_midipix_h}")";
+ GCCTARGET_FLAGS="$(rtl_lconcat "${GCCTARGET_FLAGS}" "-DTARGET_PERSONALITY_FUNCTION")";
+ GCCTARGET_FLAGS="$(rtl_lconcat "${GCCTARGET_FLAGS}" "-DTARGET_PERSONALITY_FUNCTION_MIDIPIX")";
+ GCCTARGET_FLAGS="$(rtl_lconcat "${GCCTARGET_FLAGS}" "${DEFAULT_CFLAGS_DEBUG_RUNTIME}")";
+ export cbb_ldflags_for_target=--sysroot="${PKG_PREFIX}" \
+ cbb_sysroot_for_libgcc="${PKG_PREFIX}" \
+ cbb_xgcc_for_specs="${PKG_TARGET}-gcc" \
+ sysroot_headers_suffix="${PKG_PREFIX}"; ;;
+ gcc_stage1_cross_mingw32)
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PREFIX_MINGW32} -midata";
+ export cbb_ldflags_for_target=--sysroot="${PREFIX_MINGW32}" \
+ cbb_neutral_libiberty=no \
+ cbb_sysroot_for_libgcc="${PREFIX_MINGW32}" \
+ cbb_xgcc_for_specs="${PKG_BASE_DIR}/${PKG_BUILD_DIR}/gcc/xgcc"; ;;
gcc_stage1_host)
GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PREFIX_CROSS}";
- GCCTARGET_FLAGS="${GCCTARGET_FLAGS} --include=${unwind_midipix_h}";
- GCCTARGET_FLAGS="${GCCTARGET_FLAGS} -DTARGET_PERSONALITY_FUNCTION";
- GCCTARGET_FLAGS="${GCCTARGET_FLAGS} -DTARGET_PERSONALITY_FUNCTION_MIDIPIX";
- GCCTARGET_FLAGS="${GCCTARGET_FLAGS} ${DEFAULT_CFLAGS_DEBUG_RUNTIME}";
- export cbb_neutral_libiberty=no \
- cbb_ldflags_for_target=--sysroot="${PREFIX_CROSS}" \
+ GCCTARGET_FLAGS="$(rtl_lconcat "${GCCTARGET_FLAGS}" "--include=${_unwind_midipix_h}")";
+ GCCTARGET_FLAGS="$(rtl_lconcat "${GCCTARGET_FLAGS}" "-DTARGET_PERSONALITY_FUNCTION")";
+ GCCTARGET_FLAGS="$(rtl_lconcat "${GCCTARGET_FLAGS}" "-DTARGET_PERSONALITY_FUNCTION_MIDIPIX")";
+ GCCTARGET_FLAGS="$(rtl_lconcat "${GCCTARGET_FLAGS}" "${DEFAULT_CFLAGS_DEBUG_RUNTIME}")";
+ export cbb_ldflags_for_target="--sysroot=${PREFIX_CROSS}" \
+ cbb_neutral_libiberty="no" \
cbb_sysroot_for_libgcc="${PREFIX_CROSS}" \
cbb_xgcc_for_specs="${PKG_BASE_DIR}/${PKG_BUILD_DIR}/gcc/xgcc" \
LDFLAGS="${PKG_LDFLAGS_CONFIGURE}"; ;;
- gcc_stage1_cross_mingw32)
- GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PREFIX_MINGW32} -midata";
- export cbb_neutral_libiberty=no \
- cbb_ldflags_for_target=--sysroot="${PREFIX_MINGW32}" \
- cbb_sysroot_for_libgcc="${PREFIX_MINGW32}" \
- cbb_xgcc_for_specs="${PKG_BASE_DIR}/${PKG_BUILD_DIR}/gcc/xgcc"; ;;
gcc_stage1_native_mingw32)
GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX} -midata";
- export cbb_neutral_libiberty=no \
- cbb_ldflags_for_target=--sysroot="${PKG_PREFIX}" \
+ export cbb_ldflags_for_target=--sysroot="${PKG_PREFIX}" \
+ cbb_neutral_libiberty=no \
cbb_sysroot_for_libgcc="${PKG_PREFIX}" \
cbb_xgcc_for_specs="${PKG_TARGET}-gcc"; ;;
- gcc_full)
- GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}";
- GCCTARGET_FLAGS="${GCCTARGET_FLAGS} --include=${unwind_midipix_h}";
- GCCTARGET_FLAGS="${GCCTARGET_FLAGS} -DTARGET_PERSONALITY_FUNCTION";
- GCCTARGET_FLAGS="${GCCTARGET_FLAGS} -DTARGET_PERSONALITY_FUNCTION_MIDIPIX";
- GCCTARGET_FLAGS="${GCCTARGET_FLAGS} ${DEFAULT_CFLAGS_DEBUG_RUNTIME}";
- export cbb_xgcc_for_specs="${PKG_TARGET}-gcc" \
- cbb_ldflags_for_target=--sysroot="${PKG_PREFIX}" \
- cbb_sysroot_for_libgcc="${PKG_PREFIX}" \
- sysroot_headers_suffix="${PKG_PREFIX}"; ;;
esac;
- GCCFLAGS="${PKG_CFLAGS_CONFIGURE} --include $(readlink -f "${PKG_BASE_DIR}/cbb-gcc-${1}/libc/cbb-musl-pe.h")";
- for __ in CFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS CXXFLAGS_FOR_BUILD; do
- export "${__}=${GCCFLAGS}";
- done;
- for __ in CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET; do
- export "${__}=${GCCTARGET_FLAGS}";
- done;
- for __ in cbb_cflags_for_stage1 cbb_cflags_for_stage2 cbb_cflags_for_stage3 cbb_cflags_for_stage4; do
- export "${__}=${CFLAGS_FOR_BUILD}" ;
- done;
- export CFLAGS CXXFLAGS CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CFLAGS_FOR_TARGET XGCC_FLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET LIBCFLAGS_FOR_TARGET;
-};
-
-pkgp_gcc_configure() {
- rtl_fileop rm "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
- rtl_fileop mkdir "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
- rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
- "../cbb-gcc-${PKG_VERSION}/configure" "${@}"\
- --disable-bootstrap \
- --disable-libmudflap \
- --disable-multilib \
- --disable-nls \
- --disable-obsolete \
- --disable-symvers \
- --enable-__cxa_atexit \
- --enable-canonical-system-headers \
- --enable-debug \
- --enable-gnu-indirect-function \
- --enable-gnu-unique-object \
- --enable-initfini-array \
- --enable-languages=c,c++,fortran,objc,lto \
- --enable-libstdcxx-debug \
- --enable-lto \
- --enable-multiarch \
- --enable-secureplt \
- --enable-shared \
- --enable-threads=posix \
- --target="${PKG_TARGET}" \
- --with-fpmath=sse;
- pkgp_gcc_state_set configure build;
-};
-
-pkg_gcc_stage1_host_all() {
- pkg_gcc_stage1_all "${@}";
+ GCCFLAGS="$(rtl_lconcat "${PKG_CFLAGS_CONFIGURE}" \
+ "--include $(readlink -f "${PKG_BASE_DIR}/cbb-gcc-${PKG_VERSION}/libc/cbb-musl-pe.h")")";
};
-pkg_gcc_stage1_cross_mingw32_all() {
- rtl_fileop ln_symbolic . "${PKG_PREFIX}/x86_64-w64-mingw32/mingw";
- rtl_fileop mkdir "${PKG_DESTDIR}/x86_64-w64-mingw32";
- rtl_fileop ln_symbolic . "${PKG_DESTDIR}/x86_64-w64-mingw32/mingw";
- rtl_fileop mkdir "${PKG_PREFIX}/x86_64-w64-mingw32/include";
- pkg_gcc_stage1_all "${@}";
-};
-
-pkg_gcc_stage1_native_mingw32_all() {
- rtl_fileop ln_symbolic . "${PKG_PREFIX}/x86_64-w64-mingw32/mingw";
- rtl_fileop mkdir "${PKG_DESTDIR}/x86_64-w64-mingw32";
- rtl_fileop ln_symbolic . "${PKG_DESTDIR}/x86_64-w64-mingw32/mingw";
- rtl_fileop mkdir "${PKG_PREFIX}/x86_64-w64-mingw32/include";
- pkg_gcc_stage1_all "${@}";
-};
-
-pkg_gcc_stage1_all() {
- local __="" _restart_at="${1}";
+pkgp_gcc_stage1_all() {
+ local _restart_at="${1}" _rc=0;
case "${PKG_NAME}" in
- gcc_stage1_host)
- rtl_fileop ln_symbolic . "${PREFIX_CROSS}/usr";
- rtl_fileop mkdir "${PREFIX_CROSS}/usr/include";
- pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross;
- ;;
gcc_stage1_cross_mingw32)
- pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" mingw32;
- ;;
+ pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" mingw32; ;;
+ gcc_stage1_host)
+ if ! rtl_fileop ln_symbolic . "${PREFIX_CROSS}/usr"\
+ || ! rtl_fileop mkdir "${PREFIX_CROSS}/usr/include"\
+ || ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross; then
+ _rc=1;
+ fi; ;;
gcc_stage1_native_mingw32)
- pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" native;
- ;;
+ pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" native; ;;
esac;
- # GCC, stage1.
+ if [ "${_rc}" -ne 0 ]; then
+ return 1;
+ fi;
if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then
- rtl_fetch_urls_git "${PKG_BASE_DIR}" "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}";
- pkgp_gcc_state_set fetch patch;
+ rtl_fetch_urls_git "${PKG_BASE_DIR}" "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}" || return 1;
+ pkgp_gcc_state_set "fetch" -"patch";
fi;
if ! ex_pkg_state_test "${PKG_NAME}" patch "${_restart_at}"; then
if [ -e "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch" ]; then
- patch -b -d "${PKG_BASE_DIR}" -p0 < "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch";
+ patch -b -d "${PKG_BASE_DIR}" -p0 < "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch" || return 1;
fi;
- pkgp_gcc_state_set patch configure;
+ pkgp_gcc_state_set "patch" -"configure";
fi;
- pkgp_gcc_setup_env "${PKG_VERSION}";
+ pkgp_gcc_setup_vars; pkgp_gcc_setup_env;
if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then
case "${PKG_NAME}" in
- gcc_stage1_host)
+ gcc_stage1_cross_mingw32)
pkgp_gcc_configure \
- --disable-sjlj-exceptions \
+ --enable-sjlj-exceptions \
--prefix="${PREFIX}" \
--with-gmp="${PREFIX}" \
--with-mpc="${PREFIX}" \
--with-mpfr="${PREFIX}" \
- --with-sysroot="${PREFIX_CROSS}"; ;;
- gcc_stage1_cross_mingw32)
+ --with-sysroot="${PREFIX_MINGW32}" \
+ --without-headers; ;;
+ gcc_stage1_host)
pkgp_gcc_configure \
- --enable-sjlj-exceptions \
+ --disable-sjlj-exceptions \
--prefix="${PREFIX}" \
--with-gmp="${PREFIX}" \
--with-mpc="${PREFIX}" \
--with-mpfr="${PREFIX}" \
- --with-sysroot="${PREFIX_MINGW32}" \
- --without-headers; ;;
+ --with-sysroot="${PREFIX_CROSS}"; ;;
gcc_stage1_native_mingw32)
pkgp_gcc_configure \
--build=x86_64-unknown-linux-gnu \
@@ -168,139 +164,71 @@ pkg_gcc_stage1_all() {
--with-sysroot= \
--without-headers; ;;
esac;
- else
- rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
+ if [ "${?}" -ne 0 ]; then
+ return 1;
+ fi;
+ else rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}" || return 1;
fi;
if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
- make ${PKG_MAKEFLAGS_BUILD} all-gcc;
- pkgp_gcc_state_set build install;
+ make ${PKG_MAKEFLAGS_BUILD} "all-gcc" || return 1;
+ pkgp_gcc_state_set "build" -"install_subdirs";
fi;
if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
- pkg_install_subdirs;
- pkgp_gcc_state_set install_subdirs install_make;
+ pkg_install_subdirs || return 1;
+ pkgp_gcc_state_set "install_subdirs" -"install_make";
fi;
if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then
case "${PKG_NAME}" in
- gcc_stage1_host)
- make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install-gcc; ;;
gcc_stage1_cross_mingw32)
- make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install-gcc; ;;
+ make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" "install-gcc"; ;;
+ gcc_stage1_host)
+ make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" "install-gcc"; ;;
gcc_stage1_native_mingw32)
- make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install-gcc; ;;
+ make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" "install-gcc"; ;;
esac;
- __="$(uname -s)";
- if [ "${__#*CYGWIN*}" != "${__}" ]; then
- rtl_fileop ln_symbolic "${PKG_DESTDIR}/libexec/gcc/${PKG_TARGET}/${PKG_VERSION}/liblto_plugin.dll.a" \
- rtl_fileop ln_symbolic "${PKG_DESTDIR}/libexec/gcc/${PKG_TARGET}/${PKG_VERSION}/liblto_plugin.so";
+ if [ "${?}" -ne 0 ]; then
+ return 1;
+ else case "$(uname -s)" in
+ CYGWIN_*)
+ if ! rtl_fileop ln_symbolic "${PKG_DESTDIR}/libexec/gcc/${PKG_TARGET}/${PKG_VERSION}/liblto_plugin.dll.a"\
+ || ! rtl_fileop ln_symbolic "${PKG_DESTDIR}/libexec/gcc/${PKG_TARGET}/${PKG_VERSION}/liblto_plugin.so"; then
+ return 1;
+ fi; ;;
+ esac;
+ pkgp_gcc_state_set "install_make" -"install";
fi;
- pkgp_gcc_state_set install_make install;
fi;
if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then
- pkg_install;
- ex_pkg_state_set "${PKG_NAME}" install finish;
+ pkg_install || return 1;
+ pkgp_gcc_state_set "install" -"finish";
fi;
};
-pkg_gcc_runtime_host_all() {
- local _restart_at="${1}";
- local _vis_hide="vis_hide=-fvisibility=hidden";
- export MAKE="make LIBTOOL=slibtool ${_vis_hide}";
- pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross;
- rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
- # GCC, compiler runtime.
- if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
- make ${PKG_MAKEFLAGS_BUILD} all-target-libgcc ${_vis_hide};
- pkgp_gcc_state_set build install;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
- pkg_install_subdirs;
- pkgp_gcc_state_set install_subdirs install_make;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then
- make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install-target-libgcc;
- pkgp_gcc_state_set install_make 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_gcc_libstdcpp_v3_host_all() {
- local _restart_at="${1}";
- export MAKE="make LIBTOOL=slibtool";
- pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross;
- rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
- # GCC, libstdc++-v3.
- if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
- make ${PKG_MAKEFLAGS_BUILD} all-target-libstdc++-v3;
- pkgp_gcc_state_set build install;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
- pkg_install_subdirs;
- pkgp_gcc_state_set install_subdirs install_make;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then
- make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install-target-libstdc++-v3;
- pkgp_gcc_state_set install_make 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_gcc_full_host_all() {
- local _restart_at="${1}";
- export MAKE="make LIBTOOL=slibtool";
- pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross;
- rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
- # GCC, everything else.
- if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
- make ${PKG_MAKEFLAGS_BUILD};
- pkgp_gcc_state_set build install;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
- pkg_install_subdirs;
- pkgp_gcc_state_set install_subdirs install_make;
- fi;
- if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then
- make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install;
- pkgp_gcc_state_set install_make 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_gcc_full_all() {
- local _restart_at="${1}" _configure_host="";
- local _vis_hide="vis_hide=-fvisibility=hidden";
+ local _restart_at="${1}" _configure_host="" _vis_hide="vis_hide=-fvisibility=hidden";
export MAKE="make LIBTOOL=slibtool ${_vis_hide}";
- # GCC, native.
pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" native;
if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then
- rtl_fetch_urls_git "${PKG_BASE_DIR}" "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}";
- pkgp_gcc_state_set fetch patch;
+ rtl_fetch_urls_git "${PKG_BASE_DIR}" "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}" || return 1;
+ pkgp_gcc_state_set "fetch" -"patch";
fi;
if ! ex_pkg_state_test "${PKG_NAME}" patch "${_restart_at}"; then
if [ -e "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch" ]; then
- patch -b -d "${PKG_BASE_DIR}" -p0 < "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch";
+ patch -b -d "${PKG_BASE_DIR}" -p0 < "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch" || return 1;
fi;
- pkgp_gcc_state_set patch configure;
+ pkgp_gcc_state_set "patch" -"configure";
fi;
pkgp_gcc_setup_env "${PKG_VERSION}";
if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then
- rtl_fileop mkdir "${PKG_PREFIX}/${PKG_TARGET}";
+ rtl_fileop mkdir "${PKG_PREFIX}/${PKG_TARGET}" || return 1;
if [ \! -d "${PKG_PREFIX}/${PKG_TARGET}/usr" ]; then
- rtl_fileop ln_symbolic . "${PKG_PREFIX}/${PKG_TARGET}/usr";
- fi;
- if [ "${ARCH}" = nt32 ]; then
- _configure_host="i686-nt32-midipix";
- else
- _configure_host="x86_64-nt64-midipix";
+ rtl_fileop ln_symbolic . "${PKG_PREFIX}/${PKG_TARGET}/usr" || return 1;
fi;
+ case "${ARCH}" in
+ nt32) _configure_host="i686-nt32-midipix"; ;;
+ nt64) _configure_host="x86_64-nt64-midipix"; ;;
+ esac;
pkgp_gcc_configure \
--disable-sjlj-exceptions \
--host="${_configure_host}" \
@@ -309,29 +237,132 @@ pkg_gcc_full_all() {
--with-gmp="${PKG_PREFIX}" \
--with-mpc="${PKG_PREFIX}" \
--with-mpfr="${PKG_PREFIX}" \
- --with-sysroot=;
- else
- rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}";
+ --with-sysroot="" || return 1;
+ else rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}" || return 1;
fi;
if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
- make ${PKG_MAKEFLAGS_BUILD} all-gcc;
- make ${PKG_MAKEFLAGS_BUILD} all-target-libgcc ${_vis_hide};
- make ${PKG_MAKEFLAGS_BUILD} all-target-libstdc++-v3;
- make ${PKG_MAKEFLAGS_BUILD} all-target-libgfortran;
- make ${PKG_MAKEFLAGS_BUILD} all;
- pkgp_gcc_state_set build install;
+ if ! make ${PKG_MAKEFLAGS_BUILD} "all-gcc"\
+ || ! make ${PKG_MAKEFLAGS_BUILD} "all-target-libgcc" ${_vis_hide}\
+ || ! make ${PKG_MAKEFLAGS_BUILD} "all-target-libstdc++-v3"\
+ || ! make ${PKG_MAKEFLAGS_BUILD} "all-target-libgfortran"\
+ || ! make ${PKG_MAKEFLAGS_BUILD} "all"; then
+ return 1;
+ else pkgp_gcc_state_set "build" -"install_subdirs";
+ fi;
fi;
if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
- pkg_install_subdirs;
- pkgp_gcc_state_set install_subdirs install_make;
+ pkg_install_subdirs || return 1;
+ pkgp_gcc_state_set "install_subdirs" -"install_make";
fi;
if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then
- make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" install;
- pkgp_gcc_state_set install_make install;
+ make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" "install" || return 1;
+ pkgp_gcc_state_set "install_make" -"install";
fi;
if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then
- pkg_install;
- ex_pkg_state_set "${PKG_NAME}" install finish;
+ pkg_install || return 1; pkgp_gcc_state_set "install" "finish";
+ fi;
+};
+
+pkg_gcc_full_host_all() {
+ local _restart_at="${1}";
+ export MAKE="make LIBTOOL=slibtool";
+ if ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross\
+ || ! rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; then
+ return 1;
+ else if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
+ make ${PKG_MAKEFLAGS_BUILD} || return 1;
+ pkgp_gcc_state_set "build" -"install_subdirs";
+ fi;
+ if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
+ pkg_install_subdirs || return 1;
+ pkgp_gcc_state_set "install_subdirs" -"install_make";
+ fi;
+ if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then
+ make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" "install" || return 1;
+ pkgp_gcc_state_set "install_make" -"install";
+ fi;
+ if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then
+ pkg_install || return 1;
+ pkgp_gcc_state_set "install" "finish";
+ fi;
+ fi;
+};
+
+pkg_gcc_libstdcpp_v3_host_all() {
+ local _restart_at="${1}";
+ export MAKE="make LIBTOOL=slibtool";
+ if ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross\
+ || ! rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; then
+ return 1;
+ else if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
+ make ${PKG_MAKEFLAGS_BUILD} "all-target-libstdc++-v3" || return 1;
+ pkgp_gcc_state_set "build" -"install_subdirs";
+ fi;
+ if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
+ pkg_install_subdirs || return 1;
+ pkgp_gcc_state_set "install_subdirs" -"install_make";
+ fi;
+ if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then
+ make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" "install-target-libstdc++-v3" || return 1;
+ pkgp_gcc_state_set "install_make" -"install";
+ fi;
+ if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then
+ pkg_install || return 1;
+ pkgp_gcc_state_set "install" "finish";
+ fi;
+ fi;
+};
+
+pkg_gcc_runtime_host_all() {
+ local _restart_at="${1}" _vis_hide="vis_hide=-fvisibility=hidden";
+ export MAKE="make LIBTOOL=slibtool ${_vis_hide}";
+ if ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross\
+ || ! rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; then
+ return 1;
+ else if ! ex_pkg_state_test "${PKG_NAME}" build "${_restart_at}"; then
+ make ${PKG_MAKEFLAGS_BUILD} "all-target-libgcc" ${_vis_hide} || return 1;
+ pkgp_gcc_state_set "build" -"install_subdirs";
+ fi;
+ if ! ex_pkg_state_test "${PKG_NAME}" install_subdirs "${_restart_at}"; then
+ pkg_install_subdirs || return 1;
+ pkgp_gcc_state_set "install_subdirs" -"install_make";
+ fi;
+ if ! ex_pkg_state_test "${PKG_NAME}" install_make "${_restart_at}"; then
+ make ${PKG_MAKEFLAGS_BUILD} "prefix=${PKG_DESTDIR}" "install-target-libgcc" || return 1;
+ pkgp_gcc_state_set "install_make" -"install";
+ fi;
+ if ! ex_pkg_state_test "${PKG_NAME}" install "${_restart_at}"; then
+ pkg_install || return 1;
+ pkgp_gcc_state_set "install" "finish";
+ fi;
+ fi;
+};
+
+pkg_gcc_stage1_all() {
+ pkgp_gcc_stage1_all "${@}";
+};
+
+pkg_gcc_stage1_cross_mingw32_all() {
+ if ! rtl_fileop ln_symbolic . "${PKG_PREFIX}/x86_64-w64-mingw32/mingw"\
+ || ! rtl_fileop mkdir "${PKG_DESTDIR}/x86_64-w64-mingw32"\
+ || ! rtl_fileop ln_symbolic . "${PKG_DESTDIR}/x86_64-w64-mingw32/mingw"\
+ || ! rtl_fileop mkdir "${PKG_PREFIX}/x86_64-w64-mingw32/include"\
+ || ! pkgp_gcc_stage1_all "${@}"; then
+ return 1;
+ fi;
+};
+
+pkg_gcc_stage1_host_all() {
+ pkgp_gcc_stage1_all "${@}";
+};
+
+pkg_gcc_stage1_native_mingw32_all() {
+ if ! rtl_fileop ln_symbolic . "${PKG_PREFIX}/x86_64-w64-mingw32/mingw"\
+ || ! rtl_fileop mkdir "${PKG_DESTDIR}/x86_64-w64-mingw32"\
+ || ! rtl_fileop ln_symbolic . "${PKG_DESTDIR}/x86_64-w64-mingw32/mingw"\
+ || ! rtl_fileop mkdir "${PKG_PREFIX}/x86_64-w64-mingw32/include"\
+ || ! pkgp_gcc_stage1_all "${@}"; then
+ return 1;
fi;
};
diff --git a/vars/git.vars b/vars/git.vars
index 89ef2121..80d24c8b 100644
--- a/vars/git.vars
+++ b/vars/git.vars
@@ -9,7 +9,7 @@ ac_cv_snprintf_returns_bogus=0"};
pkg_git_install_make_post() {
local _fname="" _fname_new="";
for _fname in $(find "${PKG_DESTDIR}" -name "Git*::*" -type f); do
- _fname_new="$(echo ${_fname} | sed "s/::/./g")";
+ _fname_new="$(rtl_subst "${_fname}" "::" ".")";
if ! rtl_fileop mv "${_fname}" "${_fname_new}"; then
return 1;
fi;
diff --git a/vars/libxml2.vars b/vars/libxml2.vars
index a30c3c1a..42dbe42f 100644
--- a/vars/libxml2.vars
+++ b/vars/libxml2.vars
@@ -10,8 +10,8 @@ pkg_libxml2_install_make_post() {
if ! cat > "${PKG_DESTDIR}/bin/${PKG_TARGET}-xml2-config" <<EOF
#!/bin/sh
case "\${1}" in
---cflags) echo "-I${PREFIX_NATIVE}/include/libxml2"; ;;
---libs) echo "-L${PREFIX_NATIVE}/lib" -lxml2 -lz -llzma -lpthread -lm; ;;
+--cflags) printf "-I${PREFIX_NATIVE}/include/libxml2"; ;;
+--libs) printf "-L${PREFIX_NATIVE}/lib" -lxml2 -lz -llzma -lpthread -lm"; ;;
esac;
EOF
then
diff --git a/vars/llvm_host.vars b/vars/llvm_host.vars
index f9182609..6ba611bc 100644
--- a/vars/llvm_host.vars
+++ b/vars/llvm_host.vars
@@ -6,7 +6,7 @@ pkg_llvm_host_configure() {
if ! rtl_fileop rm "../llvm-${PKG_VERSION}-host" \
|| ! rtl_fileop mkdir "../llvm-${PKG_VERSION}-host" \
|| ! rtl_fileop cd "../llvm-${PKG_VERSION}-host" \
- || ! rtl_log_msg info "Bootstrapping llvm_host..." \
+ || ! rtl_log_msg verbose "Bootstrapping llvm_host..." \
|| ! ("${PREFIX}/bin/cmake" \
"../llvm-${PKG_VERSION}.src" \
-DCMAKE_BUILD_TYPE=Release \
@@ -20,7 +20,7 @@ pkg_llvm_host_configure() {
-DSPHINX_WARNINGS_AS_ERRORS=NO \
-G "Unix Makefiles" \
-Wno-dev) \
- || ! rtl_log_msg info "Finished bootstrapping llvm_host."; then
+ || ! rtl_log_msg verbose "Finished bootstrapping llvm_host."; then
return 1;
fi;
};
diff --git a/vars/rpm_host.vars b/vars/rpm_host.vars
index ca2e20bd..350b3717 100644
--- a/vars/rpm_host.vars
+++ b/vars/rpm_host.vars
@@ -3,7 +3,7 @@
#
pkg_rpm_host_install_pre() {
- if ! echo "#!/bin/true" > "${PKG_DESTDIR}/lib/rpm/elfdeps"\
+ if ! printf "%s" "#!/bin/true" > "${PKG_DESTDIR}/lib/rpm/elfdeps"\
|| ! rtl_fileop chmod +x "${PKG_DESTDIR}/lib/rpm/elfdeps"\
|| ! rtl_fileop rm "${PKG_DESTDIR}/var"; then
return 1;