Skip to contentSkip to conversation

remove libiberty from target install

PATCH Applied Jonathan Borne via buildroot 2 participants 4 messages Jan 27, 2022 – Jan 28, 2022

lore
Share & tools
lore
#0 lore raw

cover remove libiberty from target install

Hi,
Following my earlier request for comment and your answers, I'm providing this patch...

I hope this is Ok. This is pretty much my first patch submission...

Thanks again for your nice answers.

Best regards.
Jonathan.

Jonathan Borne (1):
package/binutils: remove libiberty from target install

 package/binutils/binutils.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 1/1 package/binutils: remove libiberty from target install

In BINUTILS_INSTALL_TARGET_CMDS, libiberty is installed to STAGING_DIR

This is not necessary since libiberty is already unconditionally installed to staging in BINUTILS_INSTALL_STAGING_CMDS. Furthermore the presence of STAGING_DIR path in TARGET_CMDS is confusing.

Moreover libiberty is static only. Static libraries are only used at build time, not at run time so we do not want to install libiberty on target.

This commit removes the unnecessary libiberty install in TARGET_CMDS and add a comment to clarify why we do not see libiberty installed on target.

---
 package/binutils/binutils.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/binutils/binutils.mk +2 -1
index 13f61be035..32ca70d325 100644
@@ -95,6 +95,8 @@ BINUTILS_MAKE_ENV = $(TARGET_CONFIGURE_ARGS)
 
 # We just want libbfd, libiberty and libopcodes,
 # not the full-blown binutils in staging
+# Static-only libraries such as libiberty are used at buildtime in staging
+# but are not installed to target.
 define BINUTILS_INSTALL_STAGING_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(STAGING_DIR) install
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/opcodes DESTDIR=$(STAGING_DIR) install
@@ -106,7 +108,6 @@ ifneq ($(BR2_PACKAGE_BINUTILS_TARGET),y)
 define BINUTILS_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(TARGET_DIR) install
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/opcodes DESTDIR=$(TARGET_DIR) install
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install
 endef
 endif
 
Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 1/1] package/binutils: remove libiberty from target install

Jonathan, All,

Thanks for this new iteration. :-)

On 2022-01-27 14:53 +0100, Jonathan Borne via buildroot spake thusly:

Quoted 8 lines

In BINUTILS_INSTALL_TARGET_CMDS, libiberty is installed to STAGING_DIR

This is not necessary since libiberty is already unconditionally installed to staging in BINUTILS_INSTALL_STAGING_CMDS. Furthermore the presence of STAGING_DIR path in TARGET_CMDS is confusing.

Quoted 7 lines

Moreover libiberty is static only. Static libraries are only used at build time, not at run time so we do not want to install libiberty on target.

This commit removes the unnecessary libiberty install in TARGET_CMDS and add a comment to clarify why we do not see libiberty installed on target.

I've slightly reworded the commit log, and rewrapped it closer to the usual 72-char width.

Quoted 10 lines
---
 package/binutils/binutils.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/binutils/binutils.mk +0 -0
index 13f61be035..32ca70d325 100644

package/binutils/binutils.mk BINUTILS_MAKE_ENV = $(TARGET_CONFIGURE_ARGS) · line 99

Quoted 5 lines
package/binutils/binutils.mk +2 -0
@@ -95,6 +95,8 @@ BINUTILS_MAKE_ENV = $(TARGET_CONFIGURE_ARGS)
 
 # We just want libbfd, libiberty and libopcodes,
 # not the full-blown binutils in staging
+# Static-only libraries such as libiberty are used at buildtime in staging
+# but are not installed to target.

I believe the comment in fact makes more sense closer to the _ISNTALL_TARGET_CMDS, so I moved it there, and reworded it appropriately.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 18 lines
package/binutils/binutils.mk +0 -1
 define BINUTILS_INSTALL_STAGING_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(STAGING_DIR) install
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/opcodes DESTDIR=$(STAGING_DIR) install
@@ -106,7 +108,6 @@ ifneq ($(BR2_PACKAGE_BINUTILS_TARGET),y)
 define BINUTILS_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(TARGET_DIR) install
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/opcodes DESTDIR=$(TARGET_DIR) install
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install
 endef
 endif
 
Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH 1/1] package/binutils: remove libiberty from target install

Quoted 17 lines · ----- On Jan 27, 2022, at 10:18 PM, Yann E. MORIN [email protected] wrote:

Jonathan, All,

Thanks for this new iteration. :-)

On 2022-01-27 14:53 +0100, Jonathan Borne via buildroot spake thusly:

Quoted 12 lines

In BINUTILS_INSTALL_TARGET_CMDS, libiberty is installed to STAGING_DIR

This is not necessary since libiberty is already unconditionally installed to staging in BINUTILS_INSTALL_STAGING_CMDS. Furthermore the presence of STAGING_DIR path in TARGET_CMDS is confusing.

Moreover libiberty is static only. Static libraries are only used at build time, not at run time so we do not want to install libiberty on target.

Quoted 7 lines
Quoted 3 lines

This commit removes the unnecessary libiberty install in TARGET_CMDS and add a comment to clarify why we do not see libiberty installed on target.

I've slightly reworded the commit log, and rewrapped it closer to the usual 72-char width.

That's perfect. I will think about the wrapping next time.

Quoted 11 lines
Quoted 11 lines
---
 package/binutils/binutils.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/binutils/binutils.mk +0 -0
index 13f61be035..32ca70d325 100644
@@ -95,6 +95,8 @@ BINUTILS_MAKE_ENV = $(TARGET_CONFIGURE_ARGS)
 
Quoted 9 lines

package/binutils/binutils.mk BINUTILS_MAKE_ENV = $(TARGET_CONFIGURE_ARGS) · line 99

Quoted 4 lines
package/binutils/binutils.mk +2 -0
 # We just want libbfd, libiberty and libopcodes,
 # not the full-blown binutils in staging
+# Static-only libraries such as libiberty are used at buildtime in staging
+# but are not installed to target.

I believe the comment in fact makes more sense closer to the _ISNTALL_TARGET_CMDS, so I moved it there, and reworded it appropriately.

I hesitated a bit about the right place to put this comment but that's definitively cleaner this way.

Quoted 5 lines

Applied to master, thanks.

Regards,
Yann E. MORIN.

Nice! Thank you very much!

Best regards,
Jonathan

Quoted 25 lines
Quoted 14 lines
package/binutils/binutils.mk +0 -2
 define BINUTILS_INSTALL_STAGING_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(STAGING_DIR) install
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/opcodes DESTDIR=$(STAGING_DIR) install
@@ -106,7 +108,6 @@ ifneq ($(BR2_PACKAGE_BINUTILS_TARGET),y)
 define BINUTILS_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(TARGET_DIR) install
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/opcodes DESTDIR=$(TARGET_DIR) install
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install
 endef
 endif
 
--

2.17.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
Quoted 5 lines

'------------------------------^-------^------------------^--------------------'

To declare a filtering error, please use the following link :
https://www.security-mail.net/reporter.php?mid=16157.61f30c1f.e3bf2.0&r=jborne%40kalray.eu&s=yann.morin.1998%40free.fr&o=Re%3A+%5BBuildroot%5D+%5BPATCH+1%2F1%5D+package%2Fbinutils%3A+remove+libiberty+from+target+install&verdict=C&c=175bda5746a47a6dc86efbf686983009e1fe0acd

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot