diff options
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/Manifest.gz | bin | 14737 -> 14741 bytes | |||
-rw-r--r-- | sys-libs/compiler-rt/Manifest | 16 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-16.0.6.ebuild | 36 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild | 36 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-17.0.0_rc1.ebuild | 36 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-17.0.0_rc2.ebuild | 36 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-18.0.0.9999.ebuild | 36 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230803.ebuild | 36 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230810.ebuild | 36 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-18.0.0_pre20230820.ebuild | 36 | ||||
-rw-r--r-- | sys-libs/musl/Manifest | 4 | ||||
-rw-r--r-- | sys-libs/musl/musl-1.2.4.ebuild | 34 | ||||
-rw-r--r-- | sys-libs/musl/musl-9999.ebuild | 40 |
13 files changed, 291 insertions, 91 deletions
diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz Binary files differindex 1e043ec22850..7774c669f0de 100644 --- a/sys-libs/Manifest.gz +++ b/sys-libs/Manifest.gz 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 diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest index 2e2f4a99df93..8c013965d7e0 100644 --- a/sys-libs/musl/Manifest +++ b/sys-libs/musl/Manifest @@ -10,6 +10,6 @@ DIST musl-getent-93a08815f8598db442d8b766b463d0150ed8e2ab.c 11656 BLAKE2B 1b7bf7 EBUILD musl-1.2.3-r7.ebuild 5787 BLAKE2B e561ae500abddac9886731a2e44b7e82aaf0d8f4c0433e209a3c7f68977956de06caa77185086929b802badcbd555729a28be49e91ffa66783a94f146fc406b2 SHA512 f481d373f5fdc81a210569684a2d9cac896d85969bf2b1be91177f83c3b292657e3d28e0efa16dc375f581b5adebec19b3b73c933173116f250fd15fb2c5d472 EBUILD musl-1.2.3-r8.ebuild 5943 BLAKE2B 7ac8fa3c1ba248ff3ec2404ba6f97b8fdf3a75c74a230a085223f0496410125edecb4f119e9879a535cea0a45ac894fdc57b2f47346d9c04bfa0d619a0981857 SHA512 5b0ea16d3304a6abb52d3ecd71ab24e5727abe3f874ca17c7c67c2afaf12a0818e66ec21a3efd55ab1f6843bb127dc4185b984406abbbe4ca357be9a76fe9aaf EBUILD musl-1.2.3.ebuild 4854 BLAKE2B 3dc5660be02d1fc55ad28dc687cdc08cf6533d36ca2c3dcbfb53761fc1cbc298520a61c0fb83706daa7bac01990eaf000f0a434209205e8e1e5848ae1945d934 SHA512 f87dff05d04b965d49fe005d0dd277ad3effc41f3c049c8ce376207fc7bf7da4e108a7f5f08e67c6a67ebe7a5b788fe1b782aa8b6b838d1296508de1989ea086 -EBUILD musl-1.2.4.ebuild 5936 BLAKE2B afc35786072b14cbb199afc7ff0b1406436f18ab3dfd68e71d1c2191f75c146273408261aebcdfd06da0453b84b534f4db79a4d9a22573250b9c7e3a70e34a70 SHA512 40db75d29a621a3a2168cbc891937b0410f92be9f7df76df5a5f0f8649a4c10102ee2e6113cc2324acaafc41433a0e82eec550e461cbf889a1e56326e3644451 -EBUILD musl-9999.ebuild 5943 BLAKE2B 7ac8fa3c1ba248ff3ec2404ba6f97b8fdf3a75c74a230a085223f0496410125edecb4f119e9879a535cea0a45ac894fdc57b2f47346d9c04bfa0d619a0981857 SHA512 5b0ea16d3304a6abb52d3ecd71ab24e5727abe3f874ca17c7c67c2afaf12a0818e66ec21a3efd55ab1f6843bb127dc4185b984406abbbe4ca357be9a76fe9aaf +EBUILD musl-1.2.4.ebuild 5673 BLAKE2B 801404431cbc7d40e386eb6dc8ccba4fcef44797bf631b03f6600a615c1371d5fd6e77cb6366e9510ef2fb23f825b84f4651430f37caefee8637ec4b6523f7ed SHA512 954c0c4f815d7a84f5d4cc9434c26990ea421ecbcc3674bfd405ae6f428bf009985b0c31678e8ad7fdaa4aadf8ccc74f35dde906de3b2c912a0b89ecfc794d0c +EBUILD musl-9999.ebuild 5673 BLAKE2B 801404431cbc7d40e386eb6dc8ccba4fcef44797bf631b03f6600a615c1371d5fd6e77cb6366e9510ef2fb23f825b84f4651430f37caefee8637ec4b6523f7ed SHA512 954c0c4f815d7a84f5d4cc9434c26990ea421ecbcc3674bfd405ae6f428bf009985b0c31678e8ad7fdaa4aadf8ccc74f35dde906de3b2c912a0b89ecfc794d0c MISC metadata.xml 559 BLAKE2B 8b1093a5278f716b8e21467b325e373a790f54c8ab71b92adc4c87dd569a92b20e08009372065f0f27ced39e3361c9e5e5a2e1bff271753d280439fabbddd3a4 SHA512 a35c13ea32ac8f26984bdb0d70d28a4285f34e32a2b0b17ad98fe3f357fb46c87a1e853377630d4da58fd5953de3fdeb02ee89181394e1815f5e0bbba4cd9f92 diff --git a/sys-libs/musl/musl-1.2.4.ebuild b/sys-libs/musl/musl-1.2.4.ebuild index a0653436a844..20b3c7f93d59 100644 --- a/sys-libs/musl/musl-1.2.4.ebuild +++ b/sys-libs/musl/musl-1.2.4.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit flag-o-matic toolchain-funcs prefix +inherit crossdev flag-o-matic toolchain-funcs prefix if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="git://git.musl-libc.org/musl" inherit git-r3 @@ -25,14 +25,6 @@ SRC_URI+=" https://dev.gentoo.org/~blueness/musl-misc/iconv.c " -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety" HOMEPAGE="https://musl.libc.org" @@ -49,19 +41,15 @@ QA_PRESTRIPPED="usr/lib/crtn.o" # built as part as crossdev. Also, elide the blockers when in cross-*, # as it doesn't make sense to block the normal CBUILD libxcrypt at all # there when we're installing into /usr/${CHOST} anyway. -if [[ ${CATEGORY} == cross-* ]] ; then +if is_crosspkg ; then IUSE="${IUSE/crypt/+crypt}" else RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )" PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )" fi -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} - just_headers() { - use headers-only && is_crosscompile + use headers-only && target_is_not_host } pkg_setup() { @@ -74,7 +62,7 @@ pkg_setup() { # fix for #667126, copied from glibc ebuild # make sure host make.conf doesn't pollute us - if is_crosscompile || tc-is-cross-compiler ; then + if target_is_not_host || tc-is-cross-compiler ; then CHOST=${CTARGET} strip-unsupported-flags fi } @@ -86,7 +74,7 @@ src_unpack() { # We only verify the release; not the additional (fixed, safe) files # we download. # (Seem to get IPC error on verifying in cross?) - ! is_crosscompile && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc} + ! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc} fi default @@ -108,7 +96,7 @@ src_configure() { just_headers && export CC=true local sysroot - is_crosscompile && sysroot=/usr/${CTARGET} + target_is_not_host && sysroot=/usr/${CTARGET} ./configure \ --target=${CTARGET} \ --prefix="${EPREFIX}${sysroot}/usr" \ @@ -121,7 +109,7 @@ src_compile() { just_headers && return 0 emake - if [[ ${CATEGORY} != cross-* ]] ; then + if ! is_crosspkg ; then emake -C "${T}" getconf getent iconv \ CC="$(tc-getCC)" \ CFLAGS="${CFLAGS}" \ @@ -142,7 +130,7 @@ src_install() { # musl provides ldd via a sym link to its ld.so local sysroot= - is_crosscompile && sysroot=/usr/${CTARGET} + target_is_not_host && sysroot=/usr/${CTARGET} local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*) dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd" @@ -152,7 +140,7 @@ src_install() { rm "${ED}/usr/$(get_libdir)/libcrypt.a" || die fi - if [[ ${CATEGORY} != cross-* ]] ; then + if ! is_crosspkg ; then # Fish out of config: # ARCH = ... # SUBARCH = ... @@ -187,7 +175,7 @@ src_install() { doenvd "${T}"/00musl fi - if is_crosscompile ; then + if target_is_not_host ; then into /usr/${CTARGET} dolib.a libssp_nonshared.a else @@ -204,7 +192,7 @@ pkg_preinst() { } pkg_postinst() { - is_crosscompile && return 0 + target_is_not_host && return 0 [ -n "${ROOT}" ] && return 0 diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild index a72d5929d386..20b3c7f93d59 100644 --- a/sys-libs/musl/musl-9999.ebuild +++ b/sys-libs/musl/musl-9999.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit eapi8-dosym flag-o-matic toolchain-funcs prefix +inherit crossdev flag-o-matic toolchain-funcs prefix if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="git://git.musl-libc.org/musl" inherit git-r3 @@ -13,7 +13,7 @@ else SRC_URI="https://musl.libc.org/releases/${P}.tar.gz" SRC_URI+=" verify-sig? ( https://musl.libc.org/releases/${P}.tar.gz.asc )" - KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~x86" + KEYWORDS="-* ~amd64 ~arm ~arm64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86" BDEPEND="verify-sig? ( sec-keys/openpgp-keys-musl )" fi @@ -25,14 +25,6 @@ SRC_URI+=" https://dev.gentoo.org/~blueness/musl-misc/iconv.c " -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety" HOMEPAGE="https://musl.libc.org" @@ -49,19 +41,15 @@ QA_PRESTRIPPED="usr/lib/crtn.o" # built as part as crossdev. Also, elide the blockers when in cross-*, # as it doesn't make sense to block the normal CBUILD libxcrypt at all # there when we're installing into /usr/${CHOST} anyway. -if [[ ${CATEGORY} == cross-* ]] ; then +if is_crosspkg ; then IUSE="${IUSE/crypt/+crypt}" else RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )" PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )" fi -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} - just_headers() { - use headers-only && is_crosscompile + use headers-only && target_is_not_host } pkg_setup() { @@ -74,7 +62,7 @@ pkg_setup() { # fix for #667126, copied from glibc ebuild # make sure host make.conf doesn't pollute us - if is_crosscompile || tc-is-cross-compiler ; then + if target_is_not_host || tc-is-cross-compiler ; then CHOST=${CTARGET} strip-unsupported-flags fi } @@ -86,7 +74,7 @@ src_unpack() { # We only verify the release; not the additional (fixed, safe) files # we download. # (Seem to get IPC error on verifying in cross?) - ! is_crosscompile && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc} + ! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc} fi default @@ -108,7 +96,7 @@ src_configure() { just_headers && export CC=true local sysroot - is_crosscompile && sysroot=/usr/${CTARGET} + target_is_not_host && sysroot=/usr/${CTARGET} ./configure \ --target=${CTARGET} \ --prefix="${EPREFIX}${sysroot}/usr" \ @@ -121,7 +109,7 @@ src_compile() { just_headers && return 0 emake - if [[ ${CATEGORY} != cross-* ]] ; then + if ! is_crosspkg ; then emake -C "${T}" getconf getent iconv \ CC="$(tc-getCC)" \ CFLAGS="${CFLAGS}" \ @@ -142,9 +130,9 @@ src_install() { # musl provides ldd via a sym link to its ld.so local sysroot= - is_crosscompile && sysroot=/usr/${CTARGET} + target_is_not_host && sysroot=/usr/${CTARGET} local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*) - dosym8 -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd" + dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd" if ! use crypt ; then # Allow sys-libs/libxcrypt[system] to provide it instead @@ -152,7 +140,7 @@ src_install() { rm "${ED}/usr/$(get_libdir)/libcrypt.a" || die fi - if [[ ${CATEGORY} != cross-* ]] ; then + if ! is_crosspkg ; then # Fish out of config: # ARCH = ... # SUBARCH = ... @@ -187,7 +175,7 @@ src_install() { doenvd "${T}"/00musl fi - if is_crosscompile ; then + if target_is_not_host ; then into /usr/${CTARGET} dolib.a libssp_nonshared.a else @@ -204,7 +192,7 @@ pkg_preinst() { } pkg_postinst() { - is_crosscompile && return 0 + target_is_not_host && return 0 [ -n "${ROOT}" ] && return 0 |