diff mbox series

[v3] binutils: handle symlink files for gprofng

Message ID 20220922082545.40540-1-kai.kang@windriver.com
State Accepted, archived
Commit 35bec42c4023a00a0a3639935633051ce9c1c0ba
Headers show
Series [v3] binutils: handle symlink files for gprofng | expand

Commit Message

Kai Sept. 22, 2022, 8:25 a.m. UTC
From: Kai Kang <kai.kang@windriver.com>

It provides gprofng by binutils 2.39 for x86, x86_64 and aarch64
according to configure.ac:

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=configure.ac;h=a5555a9c91b42214afc46a0ab8b629e4c6fedcc0;hb=HEAD#l401

Add them to USE_ALTERNATIVES_FOR the same as others to handle symlink
files via update-alternative mechanism. And it disables gprofng for
clang and musl in .bb file, so clear GPROFNG_ALTS for them too.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
v3:
* clear GPROFNG_ALTS for clang and musl

 meta/recipes-devtools/binutils/binutils.inc | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Ross Burton Sept. 23, 2022, 3:30 p.m. UTC | #1
This is making our CI explode, I suspect the trigger is having meta-clang present and enabled:

WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gp-archive: /usr/bin/aarch64-poky-linux-gp-archive does not exist
WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gp-collect-app: /usr/bin/aarch64-poky-linux-gp-collect-app does not exist
WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gp-display-html: /usr/bin/aarch64-poky-linux-gp-display-html does not exist
WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gp-display-src: /usr/bin/aarch64-poky-linux-gp-display-src does not exist
WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gp-display-text: /usr/bin/aarch64-poky-linux-gp-display-text does not exist
WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gprofng: /usr/bin/aarch64-poky-linux-gprofng does not exist

Ross

> On 22 Sep 2022, at 09:25, kai via lists.openembedded.org <kai.kang=windriver.com@lists.openembedded.org> wrote:
> 
> From: Kai Kang <kai.kang@windriver.com>
> 
> It provides gprofng by binutils 2.39 for x86, x86_64 and aarch64
> according to configure.ac:
> 
> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=configure.ac;h=a5555a9c91b42214afc46a0ab8b629e4c6fedcc0;hb=HEAD#l401
> 
> Add them to USE_ALTERNATIVES_FOR the same as others to handle symlink
> files via update-alternative mechanism. And it disables gprofng for
> clang and musl in .bb file, so clear GPROFNG_ALTS for them too.
> 
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
> v3:
> * clear GPROFNG_ALTS for clang and musl
> 
> meta/recipes-devtools/binutils/binutils.inc | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
> 
> diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
> index 789c8bec21..4dde387a8a 100644
> --- a/meta/recipes-devtools/binutils/binutils.inc
> +++ b/meta/recipes-devtools/binutils/binutils.inc
> @@ -36,6 +36,23 @@ FILES:${PN}-dev = " \
> # Rather than duplicating multiple entries for these, make one
> # list and reuse it.
> 
> +GPROFNGS = " \
> +	gp-archive \
> +	gp-collect-app \
> +	gp-display-html \
> +	gp-display-src \
> +	gp-display-text \
> +	gprofng \
> +"
> +GPROFNG_ALTS ?= ""
> +GPROFNG_ALTS:x86 = "${GPROFNGS}"
> +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:libc-musl = ""
> +
> LDGOLD_ALTS ?= "ld.gold dwp"
> LDGOLD_ALTS:riscv64 = ""
> LDGOLD_ALTS:riscv32 = ""
> @@ -48,6 +65,7 @@ USE_ALTERNATIVES_FOR = " \
> 	c++filt \
> 	elfedit \
> 	gprof \
> +	${GPROFNG_ALTS} \
> 	ld \
> 	ld.bfd \
> 	${LDGOLD_ALTS} \
> -- 
> 2.17.1
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#170965): https://lists.openembedded.org/g/openembedded-core/message/170965
> Mute This Topic: https://lists.openembedded.org/mt/93844412/6875888
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ross.burton@arm.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Kai Sept. 26, 2022, 8:58 a.m. UTC | #2
On 9/23/22 23:30, Ross Burton wrote:


Hi Ross,

> This is making our CI explode, I suspect the trigger is having meta-clang present and enabled:
>
> WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gp-archive: /usr/bin/aarch64-poky-linux-gp-archive does not exist
> WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gp-collect-app: /usr/bin/aarch64-poky-linux-gp-collect-app does not exist
> WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gp-display-html: /usr/bin/aarch64-poky-linux-gp-display-html does not exist
> WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gp-display-src: /usr/bin/aarch64-poky-linux-gp-display-src does not exist
> WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gp-display-text: /usr/bin/aarch64-poky-linux-gp-display-text does not exist
> WARNING: binutils-2.39-r0 do_package: binutils: NOT adding alternative provide /usr/bin/gprofng: /usr/bin/aarch64-poky-linux-gprofng does not exist

Sorry, I'll figure it out.

Regards,
Kai

>
> Ross
>
>> On 22 Sep 2022, at 09:25, kai via lists.openembedded.org <kai.kang=windriver.com@lists.openembedded.org> wrote:
>>
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> It provides gprofng by binutils 2.39 for x86, x86_64 and aarch64
>> according to configure.ac:
>>
>> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=configure.ac;h=a5555a9c91b42214afc46a0ab8b629e4c6fedcc0;hb=HEAD#l401
>>
>> Add them to USE_ALTERNATIVES_FOR the same as others to handle symlink
>> files via update-alternative mechanism. And it disables gprofng for
>> clang and musl in .bb file, so clear GPROFNG_ALTS for them too.
>>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>> v3:
>> * clear GPROFNG_ALTS for clang and musl
>>
>> meta/recipes-devtools/binutils/binutils.inc | 18 ++++++++++++++++++
>> 1 file changed, 18 insertions(+)
>>
>> diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
>> index 789c8bec21..4dde387a8a 100644
>> --- a/meta/recipes-devtools/binutils/binutils.inc
>> +++ b/meta/recipes-devtools/binutils/binutils.inc
>> @@ -36,6 +36,23 @@ FILES:${PN}-dev = " \
>> # Rather than duplicating multiple entries for these, make one
>> # list and reuse it.
>>
>> +GPROFNGS = " \
>> +	gp-archive \
>> +	gp-collect-app \
>> +	gp-display-html \
>> +	gp-display-src \
>> +	gp-display-text \
>> +	gprofng \
>> +"
>> +GPROFNG_ALTS ?= ""
>> +GPROFNG_ALTS:x86 = "${GPROFNGS}"
>> +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:libc-musl = ""
>> +
>> LDGOLD_ALTS ?= "ld.gold dwp"
>> LDGOLD_ALTS:riscv64 = ""
>> LDGOLD_ALTS:riscv32 = ""
>> @@ -48,6 +65,7 @@ USE_ALTERNATIVES_FOR = " \
>> 	c++filt \
>> 	elfedit \
>> 	gprof \
>> +	${GPROFNG_ALTS} \
>> 	ld \
>> 	ld.bfd \
>> 	${LDGOLD_ALTS} \
>> -- 
>> 2.17.1
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#170965): https://lists.openembedded.org/g/openembedded-core/message/170965
>> Mute This Topic: https://lists.openembedded.org/mt/93844412/6875888
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ross.burton@arm.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
diff mbox series

Patch

diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 789c8bec21..4dde387a8a 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -36,6 +36,23 @@  FILES:${PN}-dev = " \
 # Rather than duplicating multiple entries for these, make one
 # list and reuse it.
 
+GPROFNGS = " \
+	gp-archive \
+	gp-collect-app \
+	gp-display-html \
+	gp-display-src \
+	gp-display-text \
+	gprofng \
+"
+GPROFNG_ALTS ?= ""
+GPROFNG_ALTS:x86 = "${GPROFNGS}"
+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:libc-musl = ""
+
 LDGOLD_ALTS ?= "ld.gold dwp"
 LDGOLD_ALTS:riscv64 = ""
 LDGOLD_ALTS:riscv32 = ""
@@ -48,6 +65,7 @@  USE_ALTERNATIVES_FOR = " \
 	c++filt \
 	elfedit \
 	gprof \
+	${GPROFNG_ALTS} \
 	ld \
 	ld.bfd \
 	${LDGOLD_ALTS} \