summaryrefslogtreecommitdiffhomepage
path: root/vars
diff options
context:
space:
mode:
Diffstat (limited to 'vars')
-rw-r--r--vars/binutils.vars10
-rw-r--r--vars/gcc.vars165
-rw-r--r--vars/musl.vars12
-rw-r--r--vars/nasm_cross.vars9
4 files changed, 167 insertions, 29 deletions
diff --git a/vars/binutils.vars b/vars/binutils.vars
index a6907df4..0f99bb23 100644
--- a/vars/binutils.vars
+++ b/vars/binutils.vars
@@ -14,7 +14,7 @@ pkg_binutils_host_configure_patch_post() {
pkg_binutils_configure_patch_post "${@}";
};
-pkg_binutils_host_mingw32_configure_patch_post() {
+pkg_binutils_cross_configure_patch_post() {
pkg_binutils_configure_patch_post "${@}";
};
@@ -22,4 +22,12 @@ pkg_binutils_mingw32_configure_patch_post() {
pkg_binutils_configure_patch_post "${@}";
};
+pkg_binutils_host_mingw32_configure_patch_post() {
+ pkg_binutils_configure_patch_post "${@}";
+};
+
+pkg_binutils_cross_mingw32_configure_patch_post() {
+ pkg_binutils_configure_patch_post "${@}";
+};
+
# vim:filetype=sh textwidth=0
diff --git a/vars/gcc.vars b/vars/gcc.vars
index d07e72ad..49dbaf07 100644
--- a/vars/gcc.vars
+++ b/vars/gcc.vars
@@ -1,6 +1,8 @@
#
# set +o errexit -o noglob -o nounset is assumed.
-# Order: stage1_host, runtime_host, libstdcpp_v3_host, full_host, full
+# Order: stage1_cross, runtime_cross, libstdcpp_v3_cross, full_cross
+# Order: stage1_host, runtime_host, libstdcpp_v3_host, full_host
+# Order: stage1, runtime, libstdcpp_v3, full
# Order: stage1_mingw32, native_mingw32
#
@@ -75,51 +77,99 @@ pkgp_gcc_setup_vars() {
case "${PKG_NAME}" in
gcc_full)
- GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX}";
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD";
rtl_lconcat \$GCCTARGET_FLAGS "--include=${_unwind_midipix_h}";
rtl_lconcat \$GCCTARGET_FLAGS "-DTARGET_PERSONALITY_FUNCTION";
rtl_lconcat \$GCCTARGET_FLAGS "-DTARGET_PERSONALITY_FUNCTION_MIDIPIX";
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}";
+ export cbb_ldflags_for_target="--sysroot=${PREFIX_NATIVE}" \
+ cbb_neutral_libiberty="no" \
+ cbb_sysroot_for_libgcc="${PREFIX_NATIVE}" \
+ cbb_xgcc_for_specs=${PREFIX}/bin/${PKG_TARGET}-gcc;
;;
- 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}" \
+ gcc_full_host)
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD";
+ rtl_lconcat \$GCCTARGET_FLAGS "--include=${_unwind_midipix_h}";
+ rtl_lconcat \$GCCTARGET_FLAGS "-DTARGET_PERSONALITY_FUNCTION";
+ rtl_lconcat \$GCCTARGET_FLAGS "-DTARGET_PERSONALITY_FUNCTION_MIDIPIX";
+ rtl_lconcat \$GCCTARGET_FLAGS "${DEFAULT_CFLAGS_DEBUG_RUNTIME}";
+ export cbb_ldflags_for_target= \
+ cbb_neutral_libiberty="no" \
+ cbb_sysroot_for_libgcc="${PREFIX_NATIVE}" \
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="-DIN_TARGET_LIBRARY_BUILD";
+ rtl_lconcat \$GCCTARGET_FLAGS "--include=${_unwind_midipix_h}";
+ rtl_lconcat \$GCCTARGET_FLAGS "-DTARGET_PERSONALITY_FUNCTION";
+ rtl_lconcat \$GCCTARGET_FLAGS "-DTARGET_PERSONALITY_FUNCTION_MIDIPIX";
+ rtl_lconcat \$GCCTARGET_FLAGS "${DEFAULT_CFLAGS_DEBUG_RUNTIME}";
+ export cbb_ldflags_for_target= \
+ cbb_neutral_libiberty="no" \
+ cbb_sysroot_for_libgcc="${PREFIX_NATIVE}" \
+ cbb_xgcc_for_specs="${PKG_BASE_DIR}/${PKG_BUILD_DIR}/gcc/xgcc" \
+ LDFLAGS="${PKG_LDFLAGS_CONFIGURE}";
+ ;;
+
+ gcc_full_cross)
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD";
rtl_lconcat \$GCCTARGET_FLAGS "--include=${_unwind_midipix_h}";
rtl_lconcat \$GCCTARGET_FLAGS "-DTARGET_PERSONALITY_FUNCTION";
rtl_lconcat \$GCCTARGET_FLAGS "-DTARGET_PERSONALITY_FUNCTION_MIDIPIX";
rtl_lconcat \$GCCTARGET_FLAGS "${DEFAULT_CFLAGS_DEBUG_RUNTIME}";
- export cbb_ldflags_for_target="--sysroot=${PREFIX_CROSS}" \
+ export cbb_ldflags_for_target= \
+ cbb_neutral_libiberty="no" \
+ cbb_sysroot_for_libgcc="${PREFIX_CROSS}" \
+ cbb_xgcc_for_specs="${PKG_BASE_DIR}/${PKG_BUILD_DIR}/gcc/xgcc";
+ ;;
+
+ gcc_stage1_cross)
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD";
+ rtl_lconcat \$GCCTARGET_FLAGS "--include=${_unwind_midipix_h}";
+ rtl_lconcat \$GCCTARGET_FLAGS "-DTARGET_PERSONALITY_FUNCTION";
+ rtl_lconcat \$GCCTARGET_FLAGS "-DTARGET_PERSONALITY_FUNCTION_MIDIPIX";
+ rtl_lconcat \$GCCTARGET_FLAGS "${DEFAULT_CFLAGS_DEBUG_RUNTIME}";
+ export cbb_ldflags_for_target= \
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}";
;;
+ # FIXME: shouldn't we have PREFIX_NATIVE_MINGW32
gcc_stage1_native_mingw32)
- GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD --sysroot=${PKG_PREFIX} -midata";
- export cbb_ldflags_for_target=--sysroot="${PKG_PREFIX}" \
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD -midata";
+ export cbb_ldflags_for_target= \
cbb_neutral_libiberty=no \
- cbb_sysroot_for_libgcc="${PKG_PREFIX}" \
+ cbb_sysroot_for_libgcc="${PREFIX_MINGW32}" \
cbb_xgcc_for_specs="${PKG_TARGET}-gcc";
;;
+ gcc_stage1_host_mingw32)
+ GCCTARGET_FLAGS="-DIN_TARGET_LIBRARY_BUILD -midata";
+ export cbb_ldflags_for_target= \
+ cbb_neutral_libiberty="no" \
+ cbb_sysroot_for_libgcc="${PREFIX_MINGW32}" \
+ 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 -midata";
+ export cbb_ldflags_for_target= \
+ cbb_neutral_libiberty="no" \
+ cbb_sysroot_for_libgcc="${PREFIX_LOCAL_CROSS_MINGW32}" \
+ cbb_xgcc_for_specs="${PKG_BASE_DIR}/${PKG_BUILD_DIR}/gcc/xgcc" \
+ LDFLAGS="${PKG_LDFLAGS_CONFIGURE}";
+ ;;
+
esac;
rtl_lconcat2 \
\$GCCFLAGS \
- \$PKG_CFLAGS_CONFIGURE \
+ \$PKG_CFLAGS_CONFIGURE \
"--include $(readlink -f "${PKG_BASE_DIR}/cbb-gcc-${PKG_VERSION}/libc/cbb-musl-pe.h")";
};
@@ -130,13 +180,29 @@ pkgp_gcc_stage1_all() {
case "${PKG_NAME}" in
gcc_stage1_cross_mingw32)
- pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" mingw32;
+ pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross;
+ ;;
+
+ gcc_stage1_host_mingw32)
+ pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" host;
+ ;;
+
+ gcc_stage1_cross)
+ if ! rtl_fileop ln_symbolic . "${PREFIX_LOCAL_CROSS}/usr"\
+ || ! rtl_fileop mkdir "${PREFIX_LOCAL_CROSS}/usr/include"\
+ || ! 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_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
+ || ! rtl_fileop ln_symbolic . "${PREFIX_NATIVE}/usr"\
+ || ! rtl_fileop mkdir "${PREFIX_NATIVE}/usr/include"\
+ || ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" host; then
_rc=1;
fi;
;;
@@ -180,7 +246,7 @@ pkgp_gcc_stage1_all() {
if ! ex_pkg_state_test "${PKG_NAME}" configure "${_restart_at}"; then
case "${PKG_NAME}" in
- gcc_stage1_cross_mingw32)
+ gcc_stage1_host_mingw32)
pkgp_gcc_configure \
--enable-sjlj-exceptions \
--prefix="${PREFIX}" \
@@ -191,6 +257,17 @@ pkgp_gcc_stage1_all() {
--without-headers;
;;
+ gcc_stage1_cross_mingw32)
+ pkgp_gcc_configure \
+ --enable-sjlj-exceptions \
+ --prefix="${PREFIX}" \
+ --with-gmp="${PREFIX}" \
+ --with-mpc="${PREFIX}" \
+ --with-mpfr="${PREFIX}" \
+ --with-sysroot="${PREFIX_LOCAL_CROSS_MINGW32}" \
+ --without-headers;
+ ;;
+
gcc_stage1_host)
pkgp_gcc_configure \
--disable-sjlj-exceptions \
@@ -198,6 +275,16 @@ pkgp_gcc_stage1_all() {
--with-gmp="${PREFIX}" \
--with-mpc="${PREFIX}" \
--with-mpfr="${PREFIX}" \
+ --with-sysroot="${PREFIX_NATIVE}";
+ ;;
+
+ gcc_stage1_cross)
+ pkgp_gcc_configure \
+ --disable-sjlj-exceptions \
+ --prefix="${PREFIX}" \
+ --with-gmp="${PREFIX}" \
+ --with-mpc="${PREFIX}" \
+ --with-mpfr="${PREFIX}" \
--with-sysroot="${PREFIX_CROSS}";
;;
@@ -243,6 +330,9 @@ pkgp_gcc_stage1_all() {
gcc_stage1_host)
make ${PKG_MAKEFLAGS_BUILD:-} "prefix=${PKG_DESTDIR}" "install-gcc"; ;;
+ gcc_stage1_cross)
+ make ${PKG_MAKEFLAGS_BUILD:-} "prefix=${PKG_DESTDIR}" "install-gcc"; ;;
+
gcc_stage1_native_mingw32)
make ${PKG_MAKEFLAGS_BUILD:-} "prefix=${PKG_DESTDIR}" "install-gcc"; ;;
@@ -363,10 +453,11 @@ pkg_gcc_full_all() {
};
pkg_gcc_full_host_all() {
- local _group_name="${1}" _pkg_name="${2}" _restart_at="${3}";
+ local _group_name="${1}" _pkg_name="${2}" _restart_at="${3}" \
+ _toolchain_type="${4:-host}"
export MAKE="make LIBTOOL=slibtool";
- if ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross\
+ if ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" ${_toolchain_type} \
|| ! rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; then
return 1;
else
@@ -396,11 +487,16 @@ pkg_gcc_full_host_all() {
return 0;
};
+pkg_gcc_full_cross_all() {
+ pkg_gcc_full_host_all "${@}" cross
+};
+
pkg_gcc_libstdcpp_v3_host_all() {
- local _group_name="${1}" _pkg_name="${2}" _restart_at="${3}";
+ local _group_name="${1}" _pkg_name="${2}" _restart_at="${3}" \
+ _toolchain_type="${4:-host}"
export MAKE="make LIBTOOL=slibtool";
- if ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross\
+ if ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" ${_toolchain_type} \
|| ! rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; then
return 1;
else
@@ -430,12 +526,17 @@ pkg_gcc_libstdcpp_v3_host_all() {
return 0;
};
+pkg_gcc_libstdcpp_v3_cross_all() {
+ pkg_gcc_libstdcpp_v3_host_all "${@}" cross
+};
+
pkg_gcc_runtime_host_all() {
local _group_name="${1}" _pkg_name="${2}" _restart_at="${3}" \
+ _toolchain_type="${4:-host}" \
_vis_hide="vis_hide=-fvisibility=hidden";
export MAKE="make LIBTOOL=slibtool ${_vis_hide}";
- if ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" cross\
+ if ! pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" ${_toolchain_type} \
|| ! rtl_fileop cd "${PKG_BASE_DIR}/${PKG_BUILD_DIR}"; then
return 1;
else
@@ -465,11 +566,15 @@ pkg_gcc_runtime_host_all() {
return 0;
};
+pkg_gcc_runtime_cross_all() {
+ pkg_gcc_runtime_host_all "${@}" cross
+};
+
pkg_gcc_stage1_all() {
pkgp_gcc_stage1_all "${@}";
};
-pkg_gcc_stage1_cross_mingw32_all() {
+pkg_gcc_stage1_host_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"\
@@ -480,10 +585,18 @@ pkg_gcc_stage1_cross_mingw32_all() {
return 0;
};
+pkg_gcc_stage1_cross_mingw32_all() {
+ pkg_gcc_stage1_host_mingw32_all "${@}"
+};
+
pkg_gcc_stage1_host_all() {
pkgp_gcc_stage1_all "${@}";
};
+pkg_gcc_stage1_cross_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"\
diff --git a/vars/musl.vars b/vars/musl.vars
index 313704d9..d6c069f9 100644
--- a/vars/musl.vars
+++ b/vars/musl.vars
@@ -7,11 +7,19 @@ pkg_musl_full_fetch_download_post() {
};
pkg_musl_full_host_fetch_download_post() {
- rtl_fileop mv "${PKG_BASE_DIR}/mmglue" "${PKG_BASE_DIR}/build/mmglue";
+ pkg_musl_full_fetch_download_post "${@}"
+};
+
+pkg_musl_full_cross_fetch_download_post() {
+ pkg_musl_full_fetch_download_post "${@}"
};
pkg_musl_no_complex_host_fetch_download_post() {
- rtl_fileop mv "${PKG_BASE_DIR}/mmglue" "${PKG_BASE_DIR}/build/mmglue";
+ pkg_musl_full_fetch_download_post "${@}"
+};
+
+pkg_musl_no_complex_cross_fetch_download_post() {
+ pkg_musl_full_fetch_download_post "${@}"
};
# vim:filetype=sh textwidth=0
diff --git a/vars/nasm_cross.vars b/vars/nasm_cross.vars
new file mode 100644
index 00000000..398d314e
--- /dev/null
+++ b/vars/nasm_cross.vars
@@ -0,0 +1,9 @@
+#
+# set +o errexit -o noglob -o nounset is assumed.
+#
+
+pkg_nasm_cross_build_pre() {
+ mkdir include
+};
+
+# vim:filetype=sh textwidth=0