diff mbox series

[1/2] gdb: use update-alternatives for sframe-spec.info

Message ID 1682057176-19939-1-git-send-email-wangmy@fujitsu.com
State New
Headers show
Series [1/2] gdb: use update-alternatives for sframe-spec.info | expand

Commit Message

Mingyu Wang (Fujitsu) April 21, 2023, 6:06 a.m. UTC
From: Wang Mingyu <wangmy@fujitsu.com>

binutils also uses the doc 'sframe-spec.info'.

binutils has a priority of 100.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
---
 meta/recipes-devtools/gdb/gdb-common.inc | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Khem Raj April 21, 2023, 6:19 a.m. UTC | #1
On Thu, Apr 20, 2023 at 11:06 PM wangmy <wangmy@fujitsu.com> wrote:
>
> From: Wang Mingyu <wangmy@fujitsu.com>
>
> binutils also uses the doc 'sframe-spec.info'.
>
> binutils has a priority of 100.

I think binutils is right package to provide this info file. Please
delete it in do_install of gdb. We do not need two copies.

>
> Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
> ---
>  meta/recipes-devtools/gdb/gdb-common.inc | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
> index 925b0c2f80..338d1650d2 100644
> --- a/meta/recipes-devtools/gdb/gdb-common.inc
> +++ b/meta/recipes-devtools/gdb/gdb-common.inc
> @@ -53,6 +53,12 @@ do_configure () {
>
>  # we don't want gdb to provide bfd/iberty/opcodes, which instead will override the
>  # right bits installed by binutils.  Same for bfd.info -- also from binutils.
> +inherit update-alternatives
> +
> +ALTERNATIVE_PRIORITY = "50"
> +ALTERNATIVE:${PN}-doc = "sframe-spec"
> +ALTERNATIVE_LINK_NAME[sframe-spec] = "${infodir}/sframe-spec.info"
> +
>  do_install:append() {
>         rm -rf ${D}${libdir}
>         rm -rf ${D}${includedir}
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#180272): https://lists.openembedded.org/g/openembedded-core/message/180272
> Mute This Topic: https://lists.openembedded.org/mt/98405289/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
index 925b0c2f80..338d1650d2 100644
--- a/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/meta/recipes-devtools/gdb/gdb-common.inc
@@ -53,6 +53,12 @@  do_configure () {
 
 # we don't want gdb to provide bfd/iberty/opcodes, which instead will override the
 # right bits installed by binutils.  Same for bfd.info -- also from binutils.
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "50"
+ALTERNATIVE:${PN}-doc = "sframe-spec"
+ALTERNATIVE_LINK_NAME[sframe-spec] = "${infodir}/sframe-spec.info"
+
 do_install:append() {
 	rm -rf ${D}${libdir}
 	rm -rf ${D}${includedir}