Skip to contentSkip to conversation

binutils: Also install libopcodes in staging

PATCH New Paul Cercueil 3 participants 8 messages Aug 5, 2014 – Jan 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 binutils: Also install libopcodes in staging

This library will be used later in the "lightning" package.

---
 package/binutils/binutils.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/binutils/binutils.mk +3 -1
index 4888eeb..d4f6753 100644
@@ -75,9 +75,11 @@ HOST_BINUTILS_CONF_OPT = --disable-multilib --disable-werror \
 			$(BINUTILS_DISABLE_GDB_CONF_OPT) \
 			$(BINUTILS_EXTRA_CONFIG_OPTIONS)
 
-# We just want libbfd and libiberty, not the full-blown binutils in staging
+# We just want libbfd, libiberty and libopcodes,
+# not the full-blown binutils in staging
 define BINUTILS_INSTALL_STAGING_CMDS
 	$(MAKE) -C $(@D)/bfd DESTDIR=$(STAGING_DIR) install
+	$(MAKE) -C $(@D)/opcodes DESTDIR=$(STAGING_DIR) install
 	$(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install
 endef
 
Signature · 1 line
2.0.1
#1 lore raw

PATCH 2/2 lightning: Added package

GNU lightning is a library that generates assembly language code at run-time.

https://www.gnu.org/software/lightning/

---
 package/Config.in              |  1 +
 package/lightning/Config.in    |  8 ++++++++
 package/lightning/lightning.mk | 18 ++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/lightning/Config.in
 create mode 100644 package/lightning/lightning.mk
package/Config.in +1 -0
index 1e4bc50..6ca10a8 100644
@@ -864,6 +864,7 @@ menu "Other"
 	source "package/libunwind/Config.in"
 	source "package/liburcu/Config.in"
 	source "package/libuv/Config.in"
+	source "package/lightning/Config.in"
 	source "package/linux-pam/Config.in"
 	source "package/lttng-libust/Config.in"
 	source "package/mpc/Config.in"
package/lightning/Config.in new file +8 -0
new file mode 100644
index 0000000..5a7152a
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIGHTNING
+	bool "lightning"
+	depends on BR2_sparc || BR2_i386 || BR2_x86_64 || BR2_mips || BR2_mipsel || BR2_arm || BR2_powerpc
+	help
+	  GNU lightning is a library that generates
+	  assembly language code at run-time.
+
+	  https://www.gnu.org/software/lightning/
package/lightning/lightning.mk new file +18 -0
new file mode 100644
index 0000000..ff3ea92
@@ -0,0 +1,18 @@
+################################################################################
+#
+# lightning
+#
+################################################################################
+
+LIGHTNING_VERSION = 2.0.4
+LIGHTNING_SITE = http://ftp.gnu.org/gnu/lightning/
+LIGHTNING_LICENSE = GPLv3
+LIGHTNING_LICENSE_FILES = COPYING
+LIGHTNING_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_BINUTILS),y)
+LIGHTNING_DEPENDENCIES += binutils
+LIGHTNING_CONF_OPT += --enable-disassembler
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
2.0.1
#2 lore raw

PATCH 2/2 lightning: Added package

Hi Paul,

Quoted 52 lines · Paul Cercueil

GNU lightning is a library that generates assembly language code at run-time.

https://www.gnu.org/software/lightning/

---
 package/Config.in              |  1 +
 package/lightning/Config.in    |  8 ++++++++
 package/lightning/lightning.mk | 18 ++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/lightning/Config.in
 create mode 100644 package/lightning/lightning.mk
package/Config.in +1 -0
index 1e4bc50..6ca10a8 100644
@@ -864,6 +864,7 @@ menu "Other"
 	source "package/libunwind/Config.in"
 	source "package/liburcu/Config.in"
 	source "package/libuv/Config.in"
+	source "package/lightning/Config.in"
 	source "package/linux-pam/Config.in"
 	source "package/lttng-libust/Config.in"
 	source "package/mpc/Config.in"
package/lightning/Config.in new file +8 -0
new file mode 100644
index 0000000..5a7152a
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIGHTNING
+	bool "lightning"
+	depends on BR2_sparc || BR2_i386 || BR2_x86_64 || BR2_mips || BR2_mipsel || BR2_arm || BR2_powerpc
+	help
+	  GNU lightning is a library that generates
+	  assembly language code at run-time.
+
+	  https://www.gnu.org/software/lightning/
package/lightning/lightning.mk new file +6 -0
new file mode 100644
index 0000000..ff3ea92
@@ -0,0 +1,18 @@
+################################################################################
+#
+# lightning
+#
+################################################################################
+

package/lightning/lightning.mk line 16

Quoted 10 lines
package/lightning/lightning.mk new file +10 -0
+LIGHTNING_VERSION = 2.0.4
+LIGHTNING_SITE = http://ftp.gnu.org/gnu/lightning/
+LIGHTNING_LICENSE = GPLv3
+LIGHTNING_LICENSE_FILES = COPYING
+LIGHTNING_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_BINUTILS),y)
+LIGHTNING_DEPENDENCIES += binutils
+LIGHTNING_CONF_OPT += --enable-disassembler
+endif

Have you tested external toolchains?

baruch

Quoted 2 lines
package/lightning/lightning.mk new file +2 -0
+
+$(eval $(autotools-package))
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#3 lore raw

PATCH 2/2 lightning: Added package

Hi Baruch,

Le 06/08/2014 05:12, Baruch Siach a ?crit :

Quoted 68 lines

Hi Paul,

Quoted 52 lines · Paul Cercueil

GNU lightning is a library that generates assembly language code at run-time.

https://www.gnu.org/software/lightning/

---
  package/Config.in              |  1 +
  package/lightning/Config.in    |  8 ++++++++
  package/lightning/lightning.mk | 18 ++++++++++++++++++
  3 files changed, 27 insertions(+)

create mode 100644 package/lightning/Config.in create mode 100644 package/lightning/lightning.mk

package/Config.in +1 -0
index 1e4bc50..6ca10a8 100644
@@ -864,6 +864,7 @@ menu "Other"
  	source "package/libunwind/Config.in"
  	source "package/liburcu/Config.in"
  	source "package/libuv/Config.in"
+	source "package/lightning/Config.in"
  	source "package/linux-pam/Config.in"
  	source "package/lttng-libust/Config.in"
  	source "package/mpc/Config.in"
package/lightning/Config.in new file +8 -0
new file mode 100644
index 0000000..5a7152a
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIGHTNING
+	bool "lightning"
+	depends on BR2_sparc || BR2_i386 || BR2_x86_64 || BR2_mips || BR2_mipsel || BR2_arm || BR2_powerpc
+	help
+	  GNU lightning is a library that generates
+	  assembly language code at run-time.
+
+	  https://www.gnu.org/software/lightning/
package/lightning/lightning.mk new file +6 -0
new file mode 100644
index 0000000..ff3ea92
@@ -0,0 +1,18 @@
+################################################################################
+#
+# lightning
+#
+################################################################################
+

package/lightning/lightning.mk line 16

Quoted 10 lines
package/lightning/lightning.mk new file +10 -0
+LIGHTNING_VERSION = 2.0.4
+LIGHTNING_SITE = http://ftp.gnu.org/gnu/lightning/
+LIGHTNING_LICENSE = GPLv3
+LIGHTNING_LICENSE_FILES = COPYING
+LIGHTNING_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_BINUTILS),y)
+LIGHTNING_DEPENDENCIES += binutils
+LIGHTNING_CONF_OPT += --enable-disassembler
+endif

Have you tested external toolchains?

Quoted 1 line

baruch

No I did not, as I don't use one. Furthermore, I only tested the package on mipsel, the list of archs specified in this package is taken from lightning's web page and may be incorrect (hopefully not).

Regards,

Paul

Quoted 4 lines
Quoted 3 lines
package/lightning/lightning.mk new file +2 -0
+
+$(eval $(autotools-package))
#4 lore raw

PATCH 2/2 lightning: Added package

Hi Paul,

Quoted 9 lines · Paul Cercueil

Le 06/08/2014 05:12, Baruch Siach a ?crit :

Quoted 7 lines · Paul Cercueil

package/lightning/lightning.mk line 16

Quoted 4 lines
package/lightning/lightning.mk new file +4 -0
+ifeq ($(BR2_PACKAGE_BINUTILS),y)
+LIGHTNING_DEPENDENCIES += binutils
+LIGHTNING_CONF_OPT += --enable-disassembler
+endif

Have you tested external toolchains?

Quoted 3 lines

No I did not, as I don't use one. Furthermore, I only tested the package on mipsel, the list of archs specified in this package is taken from lightning's web page and may be incorrect (hopefully not).

You can easily test external toolchains using the minimal configs at
http://autobuild.buildroot.net/toolchains/configs/. You'll also find a few mipsel variants there.

If this package is not compatible with external toolchain (and so I suspect) then it should depend on BR2_TOOLCHAIN_BUILDROOT.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#5 lore raw

PATCH 2/2 lightning: Added package

Dear Baruch Siach,

Quoted 2 lines · Baruch Siach

If this package is not compatible with external toolchain (and so I suspect) then it should depend on BR2_TOOLCHAIN_BUILDROOT.

Why do you think this package is not compatible with external toolchain? Because of:

+ifeq ($(BR2_PACKAGE_BINUTILS),y)
+LIGHTNING_DEPENDENCIES += binutils
+LIGHTNING_CONF_OPT += --enable-disassembler
+endif

There's absolutely no problem in having the _target_ binutils package enabled with external toolchains. So I don't see why this package would be particularly problematic for external toolchains.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 2/2 lightning: Added package

In reply to Paul Cercueil

Dear Paul Cercueil,

Quoted 5 lines · Paul Cercueil

GNU lightning is a library that generates assembly language code at run-time.

https://www.gnu.org/software/lightning/

Quoted 8 lines
---
 package/Config.in              |  1 +
 package/lightning/Config.in    |  8 ++++++++
 package/lightning/lightning.mk | 18 ++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/lightning/Config.in
 create mode 100644 package/lightning/lightning.mk

Applied, after doing a number of changes. Note that this package was not compiling properly with a uClibc toolchain with the disassembler enabled.

The changes I made:

[Thomas:
- Wrap list of architectures in Config.in
- Introduce an explicit Config.in option for the disassembler support, since it needs both binutils and zlib, which may not be easy to guess.
- Add hash file.
- Bump to version 2.0.5.
- Add patch to fix cross-compilation issues on ARM and x86 due to AC_RUN_IFELSE() tests.
- Adjust license information: the library is actually under LGPLv3+, not GPLv3. There is a COPYING file with the text of the GPLv3 in the code base, but this license doesn't seem to be used in anything that is actually installed.
- Add AUTORECONF = YES since we're now patching configure.ac.
- Add missing dependency on zlib for the disassembler support.
- Add a special LIBS=-lintl when enabling the disassembler support because binutils libraries use gettext functions, but they are not linked against libintl.]

See
http://git.buildroot.net/buildroot/commit/?id=952391db0477d1baa9c451fe0b3dabbfaef5a9b7
for the final commit.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH 1/2 binutils: Also install libopcodes in staging

In reply to Paul Cercueil

Dear Paul Cercueil,

Quoted 6 lines · Paul Cercueil

This library will be used later in the "lightning" package.

---
 package/binutils/binutils.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com