toolchain.eclass: disable USE=jit for cross-compilers, bug #594572
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 27 Apr 2019 19:42:02 +0000 (20:42 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 27 Apr 2019 19:52:08 +0000 (20:52 +0100)
USE=jit is not very useful for a cross-compiler as it assumes
running generated code on the host. At least avr-* targets
can't build libgccjit.so.

The change disables IUSE=jit for cross-compilers only.
Cross-built compilers could still get libgccjit.so built for a
target.

Reported-by: Maciej Piechotka
Reported-by: Marco Sirabella
Closes: https://bugs.gentoo.org/594572
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
eclass/toolchain.eclass

index be94db869d52d1cd50d2fdcf4e1dde887a87de7a..f5daa73233db51df54eb3ed02b7a10c673fbd5f9 100644 (file)
@@ -2394,6 +2394,10 @@ is_go() {
 
 is_jit() {
        gcc-lang-supported jit || return 1
+       # cross-compiler does not really support jit as it has
+       # to generate code for a target. On target like avr
+       # libgcclit.so can't link at all: bug #594572
+       is_crosscompile && return 1
        use_if_iuse jit
 }