Skip to contentSkip to conversation

binutils: add libopcodes package for perf

PATCH In review Alan Perry 2 participants 5 messages Dec 16, 2020

lore
Share & tools
lore

Alan Perry

author
#0 lore raw

PATCH 1/1 binutils: add libopcodes package for perf

Add a package for libopcodes, since, like libbfd, it is needed by perf. Without separate packages for these libraries, all of the binutil tools get added as well.

---
 meta/recipes-devtools/binutils/binutils_2.35.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-devtools/binutils/binutils_2.35.bb +4 -2
index 2e645e1ed8..976e49765a 100644
@@ -52,9 +52,11 @@ do_install_class-native () {
 	rmdir ${D}/${libdir}64 || :
 }
 
-# Split out libbfd-*.so so including perf doesn't include extra stuff
-PACKAGE_BEFORE_PN += "libbfd"
+# Split out libbfd-*.so and libopcodes-*.so so including perf doesn't include
+# extra stuff
+PACKAGE_BEFORE_PN += "libbfd libopcodes"
 FILES_libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so"
+FILES_libopcodes = "${libdir}/libopcodes-*.so.* ${libdir}/libopcodes-*.so"
 
 SRC_URI_append_class-nativesdk =  " file://0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch "
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 5 lines · Alan Perry

Add a package for libopcodes, since, like libbfd, it is needed by perf. Without separate packages for these libraries, all of the binutil tools get added as well.

libopcodes is not an API that binutils publish for wider consumption, its meant for internal components and
external components can use it from binutils itself knowing very well that it will change with binutils and therefore
I would prefer to not separate it out into separate package like this which can appear as if its an external API
that binutils will respect.

Quoted 29 lines
---
 meta/recipes-devtools/binutils/binutils_2.35.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-devtools/binutils/binutils_2.35.bb +4 -3
index 2e645e1ed8..976e49765a 100644
@@ -52,9 +52,11 @@ do_install_class-native () {
        rmdir ${D}/${libdir}64 || :
 }
 
-# Split out libbfd-*.so so including perf doesn't include extra stuff
-PACKAGE_BEFORE_PN += "libbfd"
+# Split out libbfd-*.so and libopcodes-*.so so including perf doesn't include
+# extra stuff
+PACKAGE_BEFORE_PN += "libbfd libopcodes"
 FILES_libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so"
+FILES_libopcodes = "${libdir}/libopcodes-*.so.* ${libdir}/libopcodes-*.so"
 
 SRC_URI_append_class-nativesdk =  " file://0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch "
 
--

2.17.1

author
#2 lore raw
Quoted 5 lines · Khem Raj
Quoted 4 lines · Alan Perry

Add a package for libopcodes, since, like libbfd, it is needed by perf. Without separate packages for these libraries, all of the binutil tools get added as well.

Quoted 7 lines

libopcodes is not an API that binutils publish for wider consumption, its meant for internal components and
external components can use it from binutils itself knowing very well that it will change with binutils and therefore
I would prefer to not separate it out into separate package like this which can appear as if its an external API
that binutils will respect.

Currently in binutils, the libbfd package is there "so including perf doesn't include extra stuff".

Without this change, including perf includes that extra stuff anyway.

If that comment is to be believed, the libbfd is not currently being provided in binutils as an external API.

Quoted 30 lines
Quoted 30 lines
---
  meta/recipes-devtools/binutils/binutils_2.35.bb | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-devtools/binutils/binutils_2.35.bb +4 -3
index 2e645e1ed8..976e49765a 100644
@@ -52,9 +52,11 @@ do_install_class-native () {
         rmdir ${D}/${libdir}64 || :
  }
 
-# Split out libbfd-*.so so including perf doesn't include extra stuff
-PACKAGE_BEFORE_PN += "libbfd"
+# Split out libbfd-*.so and libopcodes-*.so so including perf doesn't include
+# extra stuff
+PACKAGE_BEFORE_PN += "libbfd libopcodes"
  FILES_libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so"
+FILES_libopcodes = "${libdir}/libopcodes-*.so.* ${libdir}/libopcodes-*.so"
 
  SRC_URI_append_class-nativesdk =  " file://0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch "
 
--

2.17.1

#3 lore raw
Quoted 17 lines · Alan Perry
Quoted 5 lines · Khem Raj
Quoted 4 lines · Alan Perry

Add a package for libopcodes, since, like libbfd, it is needed by perf. Without separate packages for these libraries, all of the binutil tools get added as well.

Quoted 7 lines

libopcodes is not an API that binutils publish for wider consumption, its meant for internal components and
external components can use it from binutils itself knowing very well that it will change with binutils and therefore
I would prefer to not separate it out into separate package like this which can appear as if its an external API
that binutils will respect.

Quoted 7 lines

Currently in binutils, the libbfd package is there "so including perf doesn't include extra stuff".

Without this change, including perf includes that extra stuff anyway.

If that comment is to be believed, the libbfd is not currently being provided in binutils as an external API.

yes libbfd should also have not been done this way as well but I guess there are more than
one user for libbfd which tilted in its favor.

Quoted 33 lines
Quoted 32 lines
Quoted 32 lines
---
  meta/recipes-devtools/binutils/binutils_2.35.bb | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-devtools/binutils/binutils_2.35.bb +4 -3
index 2e645e1ed8..976e49765a 100644
@@ -52,9 +52,11 @@ do_install_class-native () {
         rmdir ${D}/${libdir}64 || :
  }
 
-# Split out libbfd-*.so so including perf doesn't include extra stuff
-PACKAGE_BEFORE_PN += "libbfd"
+# Split out libbfd-*.so and libopcodes-*.so so including perf doesn't include
+# extra stuff
+PACKAGE_BEFORE_PN += "libbfd libopcodes"
  FILES_libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so"
+FILES_libopcodes = "${libdir}/libopcodes-*.so.* ${libdir}/libopcodes-*.so"
 
  SRC_URI_append_class-nativesdk =  " file://0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch "
 
--

2.17.1

author
#4 lore raw
Quoted 19 lines · Khem Raj
Quoted 18 lines · Alan Perry
Quoted 5 lines · Khem Raj
Quoted 4 lines · Alan Perry

Add a package for libopcodes, since, like libbfd, it is needed by perf. Without separate packages for these libraries, all of the binutil tools get added as well.

Quoted 7 lines

libopcodes is not an API that binutils publish for wider consumption, its meant for internal components and
external components can use it from binutils itself knowing very well that it will change with binutils and therefore
I would prefer to not separate it out into separate package like this which can appear as if its an external API
that binutils will respect.

Currently in binutils, the libbfd package is there "so including perf doesn't include extra stuff".

Quoted 7 lines
Quoted 4 lines

Without this change, including perf includes that extra stuff anyway.

If that comment is to be believed, the libbfd is not currently being provided in binutils as an external API.

yes libbfd should also have not been done this way as well but I guess there are more than
one user for libbfd which tilted in its favor.

As I mentioned, the reason that it is done that way is broken without doing something similar with libopcodes as well.

Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
---
   meta/recipes-devtools/binutils/binutils_2.35.bb | 6 ++++--
   1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-devtools/binutils/binutils_2.35.bb +4 -3
index 2e645e1ed8..976e49765a 100644
@@ -52,9 +52,11 @@ do_install_class-native () {
          rmdir ${D}/${libdir}64 || :
   }
 
-# Split out libbfd-*.so so including perf doesn't include extra stuff
-PACKAGE_BEFORE_PN += "libbfd"
+# Split out libbfd-*.so and libopcodes-*.so so including perf doesn't include
+# extra stuff
+PACKAGE_BEFORE_PN += "libbfd libopcodes"
   FILES_libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so"
+FILES_libopcodes = "${libdir}/libopcodes-*.so.* ${libdir}/libopcodes-*.so"
 
   SRC_URI_append_class-nativesdk =  " file://0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch "
 
--

2.17.1