Skip to contentSkip to conversation

binutils: apply override toolchain-clang last

PATCH In review [email protected] 2 participants 5 messages Sep 29, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binutils: apply override toolchain-clang last

From: Kai Kang <[email protected]>

It disables gprofng for toolchain clang, so it should clear GPROFNG_ALTS when clang is used. But override 'toolchain-clang' is applied before overrides 'TRANSLATED_TARGET_ARCH' such as x86-64, then GPROFNG_ALTS is still set and not cleared. Append 'forcevariable' to apply it last then make it work as expected.

---
 meta/recipes-devtools/binutils/binutils.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils.inc +1 -1
index 4dde387a8a..c7113f8a1f 100644
@@ -50,7 +50,7 @@ GPROFNG_ALTS:x86-64 = "${GPROFNGS}"
 GPROFNG_ALTS:aarch64 = "${GPROFNGS}"
 
 # it disables gprofng for clang and musl in the bb file
-GPROFNG_ALTS:toolchain-clang = ""
+GPROFNG_ALTS:toolchain-clang:forcevariable = ""
 GPROFNG_ALTS:libc-musl = ""
 
 LDGOLD_ALTS ?= "ld.gold dwp"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 18 lines · kai

From: Kai Kang <[email protected]>

It disables gprofng for toolchain clang, so it should clear GPROFNG_ALTS when clang is used. But override 'toolchain-clang' is applied before overrides 'TRANSLATED_TARGET_ARCH' such as x86-64, then GPROFNG_ALTS is still set and not cleared. Append 'forcevariable' to apply it last then make it work as expected.

---
 meta/recipes-devtools/binutils/binutils.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils.inc +0 -0
index 4dde387a8a..c7113f8a1f 100644

meta/recipes-devtools/binutils/binutils.inc GPROFNG_ALTS:x86-64 = "${GPROFNGS}" · line 56

Quoted 8 lines
meta/recipes-devtools/binutils/binutils.inc +1 -1
@@ -50,7 +50,7 @@ GPROFNG_ALTS:x86-64 = "${GPROFNGS}"
 GPROFNG_ALTS:aarch64 = "${GPROFNGS}"
 
 # it disables gprofng for clang and musl in the bb file
-GPROFNG_ALTS:toolchain-clang = ""
+GPROFNG_ALTS:toolchain-clang:forcevariable = ""
 GPROFNG_ALTS:libc-musl = ""
 
 LDGOLD_ALTS ?= "ld.gold dwp"

I've never wanted to see forcevariable used in layers, it is really there as a last resort for end users. There must be some other way we can arrange this?

Cheers,

Richard

author
#2 lore raw
Quoted 26 lines · Richard Purdie
Quoted 25 lines · kai

From: Kai Kang <[email protected]>

It disables gprofng for toolchain clang, so it should clear GPROFNG_ALTS when clang is used. But override 'toolchain-clang' is applied before overrides 'TRANSLATED_TARGET_ARCH' such as x86-64, then GPROFNG_ALTS is still set and not cleared. Append 'forcevariable' to apply it last then make it work as expected.

---
  meta/recipes-devtools/binutils/binutils.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils.inc +1 -1
index 4dde387a8a..c7113f8a1f 100644
@@ -50,7 +50,7 @@ GPROFNG_ALTS:x86-64 = "${GPROFNGS}"
  GPROFNG_ALTS:aarch64 = "${GPROFNGS}"
 
  # it disables gprofng for clang and musl in the bb file
-GPROFNG_ALTS:toolchain-clang = ""
+GPROFNG_ALTS:toolchain-clang:forcevariable = ""
  GPROFNG_ALTS:libc-musl = ""
 
Quoted 4 lines

meta/recipes-devtools/binutils/binutils.inc GPROFNG_ALTS:x86-64 = "${GPROFNGS}" · line 56

Quoted 1 line
meta/recipes-devtools/binutils/binutils.inc +0 -0
  LDGOLD_ALTS ?= "ld.gold dwp"

I've never wanted to see forcevariable used in layers, it is really there as a last resort for end users. There must be some other way we can arrange this?

It could clear GPROFNG_ALTS for toolchain-clang in python anonymous function. I'll send for review.

Regards,
Kai

Quoted 4 lines

Cheers,

Richard

Signature · 2 lines
Kai Kang
Wind River Linux
#3 lore raw
Quoted 27 lines · kai
Quoted 26 lines · Richard Purdie
Quoted 25 lines · kai

From: Kai Kang <[email protected]>

It disables gprofng for toolchain clang, so it should clear GPROFNG_ALTS when clang is used. But override 'toolchain-clang' is applied before overrides 'TRANSLATED_TARGET_ARCH' such as x86-64, then GPROFNG_ALTS is still set and not cleared. Append 'forcevariable' to apply it last then make it work as expected.

---
  meta/recipes-devtools/binutils/binutils.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils.inc +1 -1
index 4dde387a8a..c7113f8a1f 100644
@@ -50,7 +50,7 @@ GPROFNG_ALTS:x86-64 = "${GPROFNGS}"
  GPROFNG_ALTS:aarch64 = "${GPROFNGS}"
 
  # it disables gprofng for clang and musl in the bb file
-GPROFNG_ALTS:toolchain-clang = ""
+GPROFNG_ALTS:toolchain-clang:forcevariable = ""
  GPROFNG_ALTS:libc-musl = ""
 
Quoted 7 lines
Quoted 4 lines

meta/recipes-devtools/binutils/binutils.inc GPROFNG_ALTS:x86-64 = "${GPROFNGS}" · line 56

Quoted 1 line
meta/recipes-devtools/binutils/binutils.inc +0 -0
  LDGOLD_ALTS ?= "ld.gold dwp"

I've never wanted to see forcevariable used in layers, it is really there as a last resort for end users. There must be some other way we can arrange this?

It could clear GPROFNG_ALTS for toolchain-clang in python anonymous function. I'll send for review.

GPROFNG:toolchain-clang = ""

might work?

Cheers,

Richard

author
#4 lore raw
Quoted 32 lines · Richard Purdie
Quoted 31 lines · kai
Quoted 30 lines · Richard Purdie
Quoted 18 lines · kai

From: Kai Kang <[email protected]>

It disables gprofng for toolchain clang, so it should clear GPROFNG_ALTS when clang is used. But override 'toolchain-clang' is applied before overrides 'TRANSLATED_TARGET_ARCH' such as x86-64, then GPROFNG_ALTS is still set and not cleared. Append 'forcevariable' to apply it last then make it work as expected.

---
   meta/recipes-devtools/binutils/binutils.inc | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils.inc +0 -0
index 4dde387a8a..c7113f8a1f 100644

meta/recipes-devtools/binutils/binutils.inc GPROFNG_ALTS:x86-64 = "${GPROFNGS}" · line 56

Quoted 8 lines
meta/recipes-devtools/binutils/binutils.inc +1 -1
@@ -50,7 +50,7 @@ GPROFNG_ALTS:x86-64 = "${GPROFNGS}"
   GPROFNG_ALTS:aarch64 = "${GPROFNGS}"
 
   # it disables gprofng for clang and musl in the bb file
-GPROFNG_ALTS:toolchain-clang = ""
+GPROFNG_ALTS:toolchain-clang:forcevariable = ""
   GPROFNG_ALTS:libc-musl = ""
 
   LDGOLD_ALTS ?= "ld.gold dwp"

I've never wanted to see forcevariable used in layers, it is really there as a last resort for end users. There must be some other way we can arrange this?

Quoted 5 lines
Quoted 2 lines

It could clear GPROFNG_ALTS for toolchain-clang in python anonymous function. I'll send for review.

GPROFNG:toolchain-clang = ""

might work?

That should be the right way for both toolchain-clang and libc-musl.

Thanks a lot.

Kai

Quoted 5 lines

Cheers,

Richard

Signature · 2 lines
Kai Kang
Wind River Linux