summaryrefslogtreecommitdiff
path: root/sys-libs/compiler-rt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-08-22 21:47:11 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-08-22 21:47:11 +0100
commit9368ace94caa5cdda868a0dbb7c75a3fc7a2b911 (patch)
treea9a5e87e053b6853c703732ad8050bd895efc1ea /sys-libs/compiler-rt
parentc1d361b300cff921a04bd9ae2f800bf8914559eb (diff)
gentoo auto-resync : 22:08:2023 - 21:47:11
Diffstat (limited to 'sys-libs/compiler-rt')
-rw-r--r--sys-libs/compiler-rt/Manifest16
-rw-r--r--sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild36
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild36
9 files changed, 264 insertions, 40 deletions
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index 97e8490356b8..183eaacf2be9 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -15,12 +15,12 @@ DIST llvm-project-c4bb3e073548cf436d5fa0406e3ae75e94684dec.tar.gz 195462091 BLAK
DIST llvm-project-fe42682e7818d44cbe19f98ef34caa4e414aa937.tar.gz 196564445 BLAKE2B 056e6622b38009e34392c1d1755086e008bc85e9b4c00126e7ca92ddaee2ede7f31bafbc6ca04c5008983ce843d19fb152d75ce01e6ece4c2d891cc38604532c SHA512 8245f8a50f77e9ac9c0309a0025fde8407bb82d82277e3edba0a995debff50940e9500d4ad65060a330e6c19e2e1332d700ea040ca382ef4b75282a4566cbf72
EBUILD compiler-rt-14.0.6-r1.ebuild 4248 BLAKE2B 56b00f1c57cdaf1cd6dd7f15e13c714461001c0c2fb25e565c1677745e3fe6e61714e2f037814fef3eb32ef6866d517c391cb5f63c852ed132d74b1b5b7ef393 SHA512 31cd40fe6c58a6a653d36e99586230c7686ccb2bcdfa1c8ead4331dec2fd8dc53afc2a1e9bdf165dc5b4f7580c8cd25bc7a68acfa9c881fd775187bd82e28f11
EBUILD compiler-rt-15.0.7.ebuild 4260 BLAKE2B ae8a86217b480bab08dc99d4c5a648bf99a0ef91fb41233956b4a5d1b10d5ed6b3c14d9c02c43e2c0b11dd19f4773ca995c113e48b14475b95b7ee7b821a72d1 SHA512 79da724a1d2483af0dbcc792d008fe994c4fe075db31c7dfcc64192005427137f0157e81345a4027e5a8ba9104f662bc51bf492bca96e1b46c35a44a1849ab84
-EBUILD compiler-rt-16.0.6.ebuild 4240 BLAKE2B 8d053fdea7a992043010ab0c845e9305ab302e52447d1ee9b30c673d4ff4be235db599c53f8d833029d738ede7e8cf23198f22912e3cebc417aa61e2840a51a9 SHA512 4c135eafcbbba3efa35ad550fe2e24e4e6102842ed96c2cc064970c1921be889078de88d65bb5fac87f223e83dfa508f2c033b3235ac50187d69826d2f5341b4
-EBUILD compiler-rt-17.0.0.9999.ebuild 4167 BLAKE2B b0ba171817aaf242be61a372747b538666f1c05010c6e086c8db6e5bfa0e5dc9394b35b7d5d474b4a81cbfaae74605518f5a4a90b45bec395ece0c48b95f8a0b SHA512 f78666a3aaead3587b14cec2af7def9fced4bb9a7f89eaa2888355c217243e1fde668154c2dcb2ed163aef986e71899003daf1bc93abfa3e29bd1db40ea75189
-EBUILD compiler-rt-17.0.0_rc1.ebuild 4167 BLAKE2B b0ba171817aaf242be61a372747b538666f1c05010c6e086c8db6e5bfa0e5dc9394b35b7d5d474b4a81cbfaae74605518f5a4a90b45bec395ece0c48b95f8a0b SHA512 f78666a3aaead3587b14cec2af7def9fced4bb9a7f89eaa2888355c217243e1fde668154c2dcb2ed163aef986e71899003daf1bc93abfa3e29bd1db40ea75189
-EBUILD compiler-rt-17.0.0_rc2.ebuild 4167 BLAKE2B b0ba171817aaf242be61a372747b538666f1c05010c6e086c8db6e5bfa0e5dc9394b35b7d5d474b4a81cbfaae74605518f5a4a90b45bec395ece0c48b95f8a0b SHA512 f78666a3aaead3587b14cec2af7def9fced4bb9a7f89eaa2888355c217243e1fde668154c2dcb2ed163aef986e71899003daf1bc93abfa3e29bd1db40ea75189
-EBUILD compiler-rt-18.0.0.9999.ebuild 4167 BLAKE2B b0ba171817aaf242be61a372747b538666f1c05010c6e086c8db6e5bfa0e5dc9394b35b7d5d474b4a81cbfaae74605518f5a4a90b45bec395ece0c48b95f8a0b SHA512 f78666a3aaead3587b14cec2af7def9fced4bb9a7f89eaa2888355c217243e1fde668154c2dcb2ed163aef986e71899003daf1bc93abfa3e29bd1db40ea75189
-EBUILD compiler-rt-18.0.0_pre20230803.ebuild 4167 BLAKE2B b0ba171817aaf242be61a372747b538666f1c05010c6e086c8db6e5bfa0e5dc9394b35b7d5d474b4a81cbfaae74605518f5a4a90b45bec395ece0c48b95f8a0b SHA512 f78666a3aaead3587b14cec2af7def9fced4bb9a7f89eaa2888355c217243e1fde668154c2dcb2ed163aef986e71899003daf1bc93abfa3e29bd1db40ea75189
-EBUILD compiler-rt-18.0.0_pre20230810.ebuild 4167 BLAKE2B b0ba171817aaf242be61a372747b538666f1c05010c6e086c8db6e5bfa0e5dc9394b35b7d5d474b4a81cbfaae74605518f5a4a90b45bec395ece0c48b95f8a0b SHA512 f78666a3aaead3587b14cec2af7def9fced4bb9a7f89eaa2888355c217243e1fde668154c2dcb2ed163aef986e71899003daf1bc93abfa3e29bd1db40ea75189
-EBUILD compiler-rt-18.0.0_pre20230820.ebuild 4167 BLAKE2B b0ba171817aaf242be61a372747b538666f1c05010c6e086c8db6e5bfa0e5dc9394b35b7d5d474b4a81cbfaae74605518f5a4a90b45bec395ece0c48b95f8a0b SHA512 f78666a3aaead3587b14cec2af7def9fced4bb9a7f89eaa2888355c217243e1fde668154c2dcb2ed163aef986e71899003daf1bc93abfa3e29bd1db40ea75189
+EBUILD compiler-rt-16.0.6.ebuild 5208 BLAKE2B afc59515558ee4dcc0f7e0eebe8b281e43c7d6cef68d7301d690dabf3abee2cfb8a47f092cf8f5300c99dba5a9dea307625e960d5c64c5b30a0c25a5eadd1e43 SHA512 0b37254f0b2847adfdc983b1f7394f7ad73d7500e4ca4a333983be4d8e02cd5727244bc7a331c40ddba18196af7b8ec243390c1933c0a1aff18e927d591373d8
+EBUILD compiler-rt-17.0.0.9999.ebuild 5135 BLAKE2B 9ac6c4ba7e405d74a3cd74f42aa67c50164c3d721e4842ae0453a9f6eb1085fbe36ab806d1412378d8ffa6592ccd4e6617e34fb31c7e372a1af4ed9a2599df4e SHA512 78044bd66f2ca8bd49fac61dc579f7989797fcf6d341b179f245f19e57602d4efd4e0448ccb4734f31aad1226aba4a29eb1f27e19176b35ea789e9b9f0cb5d91
+EBUILD compiler-rt-17.0.0_rc1.ebuild 5135 BLAKE2B 9ac6c4ba7e405d74a3cd74f42aa67c50164c3d721e4842ae0453a9f6eb1085fbe36ab806d1412378d8ffa6592ccd4e6617e34fb31c7e372a1af4ed9a2599df4e SHA512 78044bd66f2ca8bd49fac61dc579f7989797fcf6d341b179f245f19e57602d4efd4e0448ccb4734f31aad1226aba4a29eb1f27e19176b35ea789e9b9f0cb5d91
+EBUILD compiler-rt-17.0.0_rc2.ebuild 5135 BLAKE2B 9ac6c4ba7e405d74a3cd74f42aa67c50164c3d721e4842ae0453a9f6eb1085fbe36ab806d1412378d8ffa6592ccd4e6617e34fb31c7e372a1af4ed9a2599df4e SHA512 78044bd66f2ca8bd49fac61dc579f7989797fcf6d341b179f245f19e57602d4efd4e0448ccb4734f31aad1226aba4a29eb1f27e19176b35ea789e9b9f0cb5d91
+EBUILD compiler-rt-18.0.0.9999.ebuild 5135 BLAKE2B 9ac6c4ba7e405d74a3cd74f42aa67c50164c3d721e4842ae0453a9f6eb1085fbe36ab806d1412378d8ffa6592ccd4e6617e34fb31c7e372a1af4ed9a2599df4e SHA512 78044bd66f2ca8bd49fac61dc579f7989797fcf6d341b179f245f19e57602d4efd4e0448ccb4734f31aad1226aba4a29eb1f27e19176b35ea789e9b9f0cb5d91
+EBUILD compiler-rt-18.0.0_pre20230803.ebuild 5135 BLAKE2B 9ac6c4ba7e405d74a3cd74f42aa67c50164c3d721e4842ae0453a9f6eb1085fbe36ab806d1412378d8ffa6592ccd4e6617e34fb31c7e372a1af4ed9a2599df4e SHA512 78044bd66f2ca8bd49fac61dc579f7989797fcf6d341b179f245f19e57602d4efd4e0448ccb4734f31aad1226aba4a29eb1f27e19176b35ea789e9b9f0cb5d91
+EBUILD compiler-rt-18.0.0_pre20230810.ebuild 5135 BLAKE2B 9ac6c4ba7e405d74a3cd74f42aa67c50164c3d721e4842ae0453a9f6eb1085fbe36ab806d1412378d8ffa6592ccd4e6617e34fb31c7e372a1af4ed9a2599df4e SHA512 78044bd66f2ca8bd49fac61dc579f7989797fcf6d341b179f245f19e57602d4efd4e0448ccb4734f31aad1226aba4a29eb1f27e19176b35ea789e9b9f0cb5d91
+EBUILD compiler-rt-18.0.0_pre20230820.ebuild 5135 BLAKE2B 9ac6c4ba7e405d74a3cd74f42aa67c50164c3d721e4842ae0453a9f6eb1085fbe36ab806d1412378d8ffa6592ccd4e6617e34fb31c7e372a1af4ed9a2599df4e SHA512 78044bd66f2ca8bd49fac61dc579f7989797fcf6d341b179f245f19e57602d4efd4e0448ccb4734f31aad1226aba4a29eb1f27e19176b35ea789e9b9f0cb5d91
MISC metadata.xml 416 BLAKE2B 79a58249c94b605ba57f346c4e05b43853cf6cfb8bb65a4f4e3c44039cccfdb83dd31bfaaaf398bcbdc393efabdfc7ed186fe775976c46227e74decf2c8f4fb2 SHA512 ce30c79a575e5933effb1fec36f9a4ef02d9f97f312feb39c55a88cbda9a1bae1d7af2ec4ad5f66212cbb2cdbfb26f1a436689f16f410153c9d65eb010264c48
diff --git a/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild b/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
index 50726932b7b2..855c52056bcb 100644
--- a/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
diff --git a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild
index f31c17f1962a..f5ece0834a5e 100644
--- a/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+inherit cmake crossdev flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
DESCRIPTION="Compiler runtime library for clang (built-in part)"
HOMEPAGE="https://llvm.org/"
@@ -52,10 +52,18 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
fi
+
+ if target_is_not_host || tc-is-cross-compiler ; then
+ # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
+ CHOST=${CTARGET} strip-unsupported-flags
+ # overrides host docs otherwise
+ DOCS=()
+ fi
python-any-r1_pkg_setup
}
test_compiler() {
+ target_is_not_host && return
$(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
<<<'int main() { return 0; }' &>/dev/null
}
@@ -67,7 +75,7 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- if use clang; then
+ if use clang && ! is_crosspkg; then
# Only do this conditionally to allow overriding with
# e.g. CC=clang-13 in case of breakage
if ! tc-is-clang ; then
@@ -78,7 +86,7 @@ src_configure() {
strip-unsupported-flags
fi
- if ! test_compiler; then
+ if ! is_crosspkg && ! test_compiler ; then
local nolib_flags=( -nodefaultlibs -lc )
if test_compiler "${nolib_flags[@]}"; then
@@ -108,13 +116,33 @@ src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
- if use amd64; then
+ if use amd64 && ! target_is_not_host; then
mycmakeargs+=(
-DCAN_TARGET_i386=$(usex abi_x86_32)
-DCAN_TARGET_x86_64=$(usex abi_x86_64)
)
fi
+ if is_crosspkg; then
+ # Needed to target built libc headers
+ export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include"
+ mycmakeargs+=(
+ # Without this, the compiler will compile a test program
+ # and fail due to no builtins.
+ -DCMAKE_C_COMPILER_WORKS=1
+ -DCMAKE_CXX_COMPILER_WORKS=1
+
+ # Without this, compiler-rt install location is not unique
+ # to target triples, only to architecture.
+ # Needed if you want to target multiple libcs for one arch.
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+
+ -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}"
+ -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
+ )
+ fi
+
if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
mycmakeargs+=(
# setting -isysroot is disabled with compiler-rt-prefix-paths.patch