binutils: apply override toolchain-clang last
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
@@ -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
Quoted 18 lines · kai
From: Kai Kang <[email protected]>
It disables gprofng for toolchain clang, so it should clear
GPROFNG_ALTSwhen clang is used. But override 'toolchain-clang' is applied before overrides 'TRANSLATED_TARGET_ARCH' such as x86-64, thenGPROFNG_ALTSis still set and not cleared. Append 'forcevariable' to apply it last then make it work as expected.Signed-off-by Kai Kang <[email protected]>--- meta/recipes-devtools/binutils/binutils.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-devtools/binutils/binutils.inc +0
-0
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
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_ALTSwhen clang is used. But override 'toolchain-clang' is applied before overrides 'TRANSLATED_TARGET_ARCH' such as x86-64, thenGPROFNG_ALTSis still set and not cleared. Append 'forcevariable' to apply it last then make it work as expected.Signed-off-by Kai Kang <[email protected]>--- meta/recipes-devtools/binutils/binutils.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)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 = ""
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
-0LDGOLD_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
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_ALTSwhen clang is used. But override 'toolchain-clang' is applied before overrides 'TRANSLATED_TARGET_ARCH' such as x86-64, thenGPROFNG_ALTSis still set and not cleared. Append 'forcevariable' to apply it last then make it work as expected.Signed-off-by Kai Kang <[email protected]>--- meta/recipes-devtools/binutils/binutils.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)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 = ""
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
-0LDGOLD_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_ALTSfor toolchain-clang in python anonymous function. I'll send for review.
GPROFNG:toolchain-clang = ""
might work?
Cheers,
Richard
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_ALTSwhen clang is used. But override 'toolchain-clang' is applied before overrides 'TRANSLATED_TARGET_ARCH' such as x86-64, thenGPROFNG_ALTSis still set and not cleared. Append 'forcevariable' to apply it last then make it work as expected.Signed-off-by Kai Kang <[email protected]>--- meta/recipes-devtools/binutils/binutils.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-devtools/binutils/binutils.inc +0
-0meta/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_ALTSfor 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