Skip to contentSkip to conversation

bpftool-native: Empty DEBUG_PREFIX_MAP_EXTRA

PATCH In review [email protected] 3 participants 3 messages Dec 2, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpftool-native: Empty DEBUG_PREFIX_MAP_EXTRA

From: Mingli Yu <[email protected]>

Most host gcc doesn't support -fcanon-prefix-map right now, so
empty DEBUG_PREFIX_MAP_EXTRA to fix the below build error.
| gcc: error: unrecognized command-line option ‘-fcanon-prefix-map’; did you mean ‘-fmacro-prefix-map=’?

---
 meta-oe/recipes-kernel/bpftool/bpftool-native_6.16.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-kernel/bpftool/bpftool-native_6.16.bb +2 -0
index bc7712ce4d..fe3ad6138e 100644
@@ -14,6 +14,8 @@ SRC_URI[sha256sum] = "1a4be2fe6b5246aa4ac8987a8a4af34c42a8dd7d08b46ab48516bcc1be
 
 S = "${UNPACKDIR}/linux-${PV}"
 
+DEBUG_PREFIX_MAP_EXTRA:toolchain-gcc = ""
+
 EXTRA_OEMAKE = "\
     V=1 \
     -C ${S}/tools/bpf/bpftool \
Signature · 1 line
2.34.1
#1 lore raw

Hmmm... this doesn't sound right. DEBUG_PREFIX_MAP_EXTRA supposed to be set only for class-target. This sounds like a possible bug in oe-core:
maybe it should get a weak-default value in gcc.bbclass, and a strong (empty) assignment in gcc-native.bbclass?

Quoted 33 lines · Mingli via lists.openembedded.org

From: Mingli Yu <[email protected]>

Most host gcc doesn't support -fcanon-prefix-map right now, so
empty DEBUG_PREFIX_MAP_EXTRA to fix the below build error.
| gcc: error: unrecognized command-line option ‘-fcanon-prefix-map’; did you mean ‘-fmacro-prefix-map=’?

---
 meta-oe/recipes-kernel/bpftool/bpftool-native_6.16.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-kernel/bpftool/bpftool-native_6.16.bb +2 -1
index bc7712ce4d..fe3ad6138e 100644
@@ -14,6 +14,8 @@ SRC_URI[sha256sum] = "1a4be2fe6b5246aa4ac8987a8a4af34c42a8dd7d08b46ab48516bcc1be
 
 S = "${UNPACKDIR}/linux-${PV}"
 
+DEBUG_PREFIX_MAP_EXTRA:toolchain-gcc = ""
+
 EXTRA_OEMAKE = "\
     V=1 \
     -C ${S}/tools/bpf/bpftool \
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#122230): https://lists.openembedded.org/g/openembedded-devel/message/122230
Mute This Topic: https://lists.openembedded.org/mt/116572173/6084445
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
In reply to [email protected]
Quoted 20 lines · Mingli via lists.openembedded.org

From: Mingli Yu <[email protected]>

Most host gcc doesn't support -fcanon-prefix-map right now, so
empty DEBUG_PREFIX_MAP_EXTRA to fix the below build error.
| gcc: error: unrecognized command-line option ‘-fcanon-prefix-map’; did you mean ‘-fmacro-prefix-map=’?

---
meta-oe/recipes-kernel/bpftool/bpftool-native_6.16.bb | 2 ++

1 file changed, 2 insertions(+)
meta-oe/recipes-kernel/bpftool/bpftool-native_6.16.bb +0 -0
index bc7712ce4d..fe3ad6138e 100644
@@ -14,6 +14,8 @@ SRC_URI[sha256sum] = "1a4be2fe6b5246aa4ac8987a8a4af34c42a8dd7d08b46ab48516bcc1be
 

S = "${UNPACKDIR}/linux-${PV}"

Quoted 1 line

+DEBUG_PREFIX_MAP_EXTRA:toolchain-gcc = “"

This is exposing a bug in either the recipe, or more likely the oe-core change. The variable should only be used in target recipe builds. Copying Khem.

Ross