View previous topic :: View next topic |
Author |
Message |
Fitap Guru


Joined: 13 Mar 2011 Posts: 481 Location: Rosario, Argentina
|
|
Back to top |
|
 |
sam_ Developer


Joined: 14 Aug 2020 Posts: 2371
|
Posted: Sat Jun 07, 2025 2:16 am Post subject: |
|
|
Huh. I've pushed a workaround to crossdev.git but I'm a bit surprised by this (another workaround is to disable openmp in package.use for avr, by the way).
But toolchain.eclass has:
Code: |
if in_iuse openmp ; then
# Make sure target has pthreads support: bug #326757, bug #335883
# There shouldn't be a chicken & egg problem here as openmp won't
# build without a C library, and you can't build that w/o
# already having a compiler...
if ! is_crosscompile || \
$(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>" >& /dev/null
then
confgcc+=( $(use_enable openmp libgomp) )
else
# Force disable as the configure script can be dumb, bug #359855
confgcc+=( --disable-libgomp )
fi
else
# For gcc variants where we don't want openmp (e.g. kgcc)
confgcc+=( --disable-libgomp )
fi
|
That pthread.h test should fail for you when building an AVR cross-compiler. Would you be so kind to edit toolchain.eclass to replace that block with:
Code: |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 418ca888f14b1..b76cf9e421399 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1717,14 +1717,16 @@ toolchain_src_configure() {
# There shouldn't be a chicken & egg problem here as openmp won't
# build without a C library, and you can't build that w/o
# already having a compiler...
+ set -x
if ! is_crosscompile || \
- $(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>" >& /dev/null
+ $(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>"
then
confgcc+=( $(use_enable openmp libgomp) )
else
# Force disable as the configure script can be dumb, bug #359855
confgcc+=( --disable-libgomp )
fi
+ set +x
else
# For gcc variants where we don't want openmp (e.g. kgcc)
confgcc+=( --disable-libgomp )
|
and show me the new build.log? |
|
Back to top |
|
 |
Fitap Guru


Joined: 13 Mar 2011 Posts: 481 Location: Rosario, Argentina
|
|
Back to top |
|
 |
sam_ Developer


Joined: 14 Aug 2020 Posts: 2371
|
Posted: Sat Jun 07, 2025 8:28 pm Post subject: |
|
|
Thank you! It looks like it succeeded this time.. did you switch to crossdev-9999, or did we get lucky or I perhaps accidentally fixed it with the tracing toolchain.eclass patch somehow? |
|
Back to top |
|
 |
Fitap Guru


Joined: 13 Mar 2011 Posts: 481 Location: Rosario, Argentina
|
Posted: Sun Jun 08, 2025 1:52 pm Post subject: |
|
|
Both the approach of disabling USE=-openmp and the patch to toolchain.eclass worked well.
I decided to go with the patch this time.
Code: | [ebuild R ] cross-avr/gcc-14.3.0:14::crossdev USE="cet cxx lto (multilib) nls openmp -ada -custom-cflags -d -debug -default-stack-clash-protection -default-znow -doc -fixed-point -fortran -go -graphite (-hardened) -ieee-long-double -jit -libssp -modula2 -objc -objc++ -objc-gc (-pch) -pgo (-pie) -rust -sanitize (-ssp) -systemtap -test (-time64) -valgrind -vanilla -vtv -zstd" |
Thank you! |
|
Back to top |
|
 |
sam_ Developer


Joined: 14 Aug 2020 Posts: 2371
|
Posted: Mon Jun 09, 2025 7:02 am Post subject: |
|
|
The eclass patch wasn't supposed to make anything work, just give me more useful output to debug it with. Are you sure it fails if you revert it? |
|
Back to top |
|
 |
Fitap Guru


Joined: 13 Mar 2011 Posts: 481 Location: Rosario, Argentina
|
Posted: Mon Jun 09, 2025 8:20 pm Post subject: |
|
|
Sir, I am using toolchain.eclass without patch and the cross-avr/gcc package recompiled perfectly.
Honestly, I don't know what happened.
Sorry. |
|
Back to top |
|
 |
|