| Message ID | 20251202075844.3270075-1-skandigraun@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | gcc.bbclass: set -fcanon-prefix-map for class-target only | expand |
diff --git a/meta/classes/toolchain/gcc.bbclass b/meta/classes/toolchain/gcc.bbclass index 0ed49ba892..5ec98bf7c5 100644 --- a/meta/classes/toolchain/gcc.bbclass +++ b/meta/classes/toolchain/gcc.bbclass @@ -30,6 +30,6 @@ PREFERRED_PROVIDER_virtual/nativesdk-cross-cc:class-cross-canadian = "gcc-crosss PREFERRED_PROVIDER_virtual/nativesdk-cross-c++:class-cross-canadian = "gcc-crosssdk-${SDK_SYS}" PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs:class-cross-canadian = "nativesdk-gcc-runtime" -DEBUG_PREFIX_MAP_EXTRA = "-fcanon-prefix-map" +DEBUG_PREFIX_MAP_EXTRA:class-target = "-fcanon-prefix-map" TCOVERRIDE = "toolchain-gcc"
-fcanon-prefix-map is not supported by all host gcc version that is supported by the Yocto project, which causes build failures when building recipes for the host machine. This flag was supposed to be set for class-target anyway when gcc is the toolchain, but even when a native target is compiled with gcc, both gcc and gcc-native classes are loaded, and gcc.bbclass overwrites the DEBUG_PREFIX_MAP_EXTRA value. To avoid this, set this variable for only for class-target, explicitly. Reported-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> --- meta/classes/toolchain/gcc.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)