summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-01 02:06:43 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-01 02:06:43 +0000
commitc635a4b7ddb6105bfc6fef130b188a087726677b (patch)
tree6707959596af4883f9621a0cdf56d35c06dbc63e /eclass
parent080d89feff80cae2fc974ff2f24d463141c20635 (diff)
gentoo auto-resync : 01:12:2024 - 02:06:42
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin39024 -> 39051 bytes
-rw-r--r--eclass/distutils-r1.eclass3
-rw-r--r--eclass/llvm.org.eclass3
-rw-r--r--eclass/python-any-r1.eclass5
-rw-r--r--eclass/python-utils-r1.eclass9
-rwxr-xr-xeclass/tests/python-utils-r1.sh4
-rw-r--r--eclass/toolchain.eclass56
7 files changed, 65 insertions, 15 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index f8f717c50371..126119ebd31b 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index c2d7e7eb8d06..a65dd3ef2a8f 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1259,7 +1259,8 @@ distutils_pep517_install() {
# set it globally in case we were using "standalone" wrapper
local -x HATCH_METADATA_CLASSIFIERS_NO_VERIFY=1
- local -x GENTOO_VALIDATE_PYPROJECT_NO_TROVE_CLASSIFIERS=1
+ local -x VALIDATE_PYPROJECT_NO_NETWORK=1
+ local -x VALIDATE_PYPROJECT_NO_TROVE_CLASSIFIERS=1
if in_iuse debug && use debug; then
local -x SETUPTOOLS_RUST_CARGO_PROFILE=dev
fi
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index fe93a0deb841..269ed3b85cb0 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -72,6 +72,9 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
case ${PV} in
+ 20.0.0_pre20241130)
+ EGIT_COMMIT=a348f223cab54b21a7b1c38dec7bc6aa2f81c949
+ ;;
20.0.0_pre20241123)
EGIT_COMMIT=19ddafafdf131aed40abbdaf5af1fb7b59c1e8ac
;;
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index 0c01a49f9000..adc7b1bfec47 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -167,8 +167,7 @@ inherit python-utils-r1
# @CODE
_python_any_set_globals() {
- local usestr deps i PYTHON_PKG_DEP
- [[ ${PYTHON_REQ_USE} ]] && usestr="[${PYTHON_REQ_USE}]"
+ local deps i PYTHON_PKG_DEP
_python_set_impls
@@ -259,7 +258,7 @@ python_gen_any_dep() {
local i_depstr=${depstr//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
i_depstr=${i_depstr//\$\{PYTHON_SINGLE_USEDEP\}/${PYTHON_SINGLE_USEDEP}}
# note: need to strip '=' slot operator for || deps
- out="( ${PYTHON_PKG_DEP%:=} ${i_depstr} ) ${out}"
+ out="( ${PYTHON_PKG_DEP/:=} ${i_depstr} ) ${out}"
done
echo "|| ( ${out})"
}
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index aa22b164020c..0cb132b72e3a 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -450,20 +450,15 @@ _python_export() {
local d
case ${impl} in
python*)
- PYTHON_PKG_DEP="dev-lang/python:${impl#python}"
+ PYTHON_PKG_DEP="dev-lang/python:${impl#python}${PYTHON_REQ_USE:+[${PYTHON_REQ_USE}]}"
;;
pypy3)
- PYTHON_PKG_DEP="dev-python/${impl}:="
+ PYTHON_PKG_DEP=">=dev-lang/pypy-3.10:=[symlink${PYTHON_REQ_USE:+,${PYTHON_REQ_USE}}]"
;;
*)
die "Invalid implementation: ${impl}"
esac
- # use-dep
- if [[ ${PYTHON_REQ_USE} ]]; then
- PYTHON_PKG_DEP+=[${PYTHON_REQ_USE}]
- fi
-
export PYTHON_PKG_DEP
debug-print "${FUNCNAME}: PYTHON_PKG_DEP = ${PYTHON_PKG_DEP}"
;;
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 732f53381b22..81c3c6f78158 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -79,6 +79,7 @@ for minor in {10..13} 13t; do
test_var PYTHON_LIBS "python3_${minor}" "*-lpython3.${minor}*"
fi
test_var PYTHON_PKG_DEP "python3_${minor}" "*dev-lang/python*:3.${minor}"
+ PYTHON_REQ_USE=sqlite test_var PYTHON_PKG_DEP "python3_${minor}" "*dev-lang/python*:3.${minor}\[sqlite\]"
test_var PYTHON_SCRIPTDIR "python3_${minor}" "/usr/lib/python-exec/python3.${minor}"
tbegin "Testing that python3_${minor} is present in an impl array"
@@ -126,7 +127,8 @@ if [[ -x /usr/bin/pypy3 ]]; then
test_var PYTHON_SITEDIR pypy3 "/usr/lib*/pypy3.*/site-packages"
test_var PYTHON_INCLUDEDIR pypy3 "/usr/include/pypy3.*"
fi
-test_var PYTHON_PKG_DEP pypy3 '*dev-python/pypy3*:='
+test_var PYTHON_PKG_DEP pypy3 '*dev-lang/pypy*:=\[symlink\]'
+PYTHON_REQ_USE=sqlite test_var PYTHON_PKG_DEP pypy3 '*dev-lang/pypy*:=\[symlink,sqlite\]'
test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3
eoutdent
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 13f3298fea90..505e7c2666d7 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1311,8 +1311,31 @@ toolchain_src_configure() {
confgcc+=( --enable-shared --disable-threads )
;;
nvptx*)
- # "LTO is not supported for this target"
- confgcc+=( --disable-lto )
+ needed_libc=newlib
+ confgcc+=(
+ # "LTO is not supported for this target"
+ --disable-lto
+ )
+
+ # --enable-as-accelerator-for= seems to disable
+ # installing nvtpx-none-cc etc, so we have to
+ # avoid passing that for the stage1-build that
+ # crossdev does. If we pass it unconditionally,
+ # we can't build newlib after building stage1 gcc.
+ if has_version ${CATEGORY}/${PN} ; then
+ confgcc+=(
+ # It's unlikely that anyone will want
+ # to build nvptx-none as a pure standalone
+ # toolchain (which will be single-threaded, etc).
+ #
+ # If someone really wants it, we can see about
+ # adding a USE=offload or similar based on CTARGET
+ # for cross targets. But for now, we always assume
+ # we're being built as an offloading compiler (accelerator).
+ --enable-as-accelerator-for=${CHOST}
+ --disable-sjlj-exceptions
+ )
+ fi
;;
esac
@@ -1389,7 +1412,7 @@ toolchain_src_configure() {
# __cxa_atexit is "essential for fully standards-compliant handling of
# destructors", but apparently requires glibc.
case ${CTARGET} in
- *-elf|*-eabi)
+ nvptx*|*-elf|*-eabi)
confgcc+=( --with-newlib )
;;
*-musl*)
@@ -1546,6 +1569,12 @@ toolchain_src_configure() {
[[ ${CTARGET} == *-darwin* ]] && \
confgcc+=( --enable-version-specific-runtime-libs )
+ # TODO: amdgcn-amdhsa?
+ [[ ${CTARGET} == x86_64* ]] && confgcc+=(
+ --enable-offload-defaulted
+ --enable-offload-targets=nvptx-none
+ )
+
### library options
if in_iuse openmp ; then
@@ -1966,6 +1995,9 @@ gcc_do_filter_flags() {
fi
fi
+ # https://gcc.gnu.org/PR100431
+ filter-flags -Werror=format-security
+
if ver_test -lt 13.6 ; then
# These aren't supported by the just-built compiler either.
filter-flags -fharden-compares -fharden-conditional-branches \
@@ -2666,6 +2698,24 @@ gcc_movelibs() {
fix_libtool_libdir_paths "${LIBPATH}/${MULTIDIR}"
done
+ # Without this, we end up either unable to find the libgomp spec/archive, or
+ # we underlink and can't find gomp_nvptx_main (presumably because we can't find the plugin)
+ # https://src.fedoraproject.org/rpms/gcc/blob/02c34dfa3627ef05d676d30e152a66e77b58529b/f/gcc.spec#_1445
+ if [[ ${CTARGET} == nvptx* ]] && has_version ${CATEGORY}/${PN} ; then
+ rm -rf "${ED}"/usr/libexec/gcc/nvptx-none/${GCCMAJOR}/install-tools
+ rm -rf "${ED}"/usr/libexec/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/{install-tools,plugin,cc1,cc1plus,f951}
+ rm -rf "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/{install-tools,plugin}
+ rm -rf "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/{install-tools,plugin,include-fixed}
+ mv "${ED}"/usr/nvptx-none/lib/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/
+ mv "${ED}"/usr/nvptx-none/lib/mgomp/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/
+ mv "${ED}"/usr/nvptx-none/lib/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mptx-3.1/
+ mv "${ED}"/usr/nvptx-none/lib/mgomp/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/mptx-3.1/
+ mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/ || die
+ mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mgomp/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/ || die
+ mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mptx-3.1/ || die
+ mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mgomp/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/mptx-3.1/ || die
+ fi
+
# We remove directories separately to avoid this case:
# mv SRC/lib/../lib/*.o DEST
# rmdir SRC/lib/../lib/