binutils: Makefile and Config.in rework for oprofile ext toolchain compilation
PATCH 1/3 binutils: Makefile and Config.in rework for oprofile ext toolchain compilation
From: Benoit Mauduit <[email protected]>
* When select full binutils binaries use the default INSTALL_TARGET_CMDS
from AUTOTARGET.
* Menu config improvement.
* Install libiberty into Staging dir.
--- package/binutils/Config.in | 15 +++++++++++++-- package/binutils/binutils.mk | 23 ++++++++++++----------- 2 files changed, 25 insertions(+), 13 deletions(-)
package/binutils/Config.in +13 -2
@@ -1,6 +1,14 @@ config BR2_PACKAGE_BINUTILS - bool "libbfd (binutils)" - depends on BR2_TOOLCHAIN_BUILDROOT + bool "binutils" + help + Install bintutils on the target. + +menu "binutils Options" +depends on BR2_PACKAGE_BINUTILS + +config BR2_PACKAGE_BINUTILS_LIBBFD + bool "libbfd" + depends on BR2_PACKAGE_BINUTILS select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE help
@@ -11,6 +19,7 @@ config BR2_PACKAGE_BINUTILS config BR2_PACKAGE_BINUTILS_TARGET bool "binutils binaries" depends on BR2_PACKAGE_BINUTILS + select BR2_PACKAGE_BINUTILS_LIBBFD help The GNU Binutils are a collection of binary tools:
@@ -19,3 +28,5 @@ config BR2_PACKAGE_BINUTILS_TARGET and others... http://www.gnu.org/software/binutils/ + +endmenu
package/binutils/binutils.mk +12 -11
@@ -4,7 +4,13 @@ # ############################################################# +# Version is set when using buildroot toolchain. +# If not, we do like other packages BINUTILS_VERSION = $(call qstrip,$(BR2_BINUTILS_VERSION)) +ifeq ($(BINUTILS_VERSION),) +BINUTILS_VERSION = 2.21 +endif + BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.bz2 BINUTILS_SITE = $(BR2_GNU_MIRROR)/binutils ifeq ($(ARCH),avr32)
@@ -33,23 +39,18 @@ HOST_BINUTILS_CONF_OPT = --disable-multilib --disable-werror \ $(BR2_CONFIGURE_STAGING_SYSROOT) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) -# We just want libbfd, not the full-blown binutils in staging +# We just want libbfd and libiberty, not the full-blown binutils in staging define BINUTILS_INSTALL_STAGING_CMDS $(MAKE) -C $(@D)/bfd DESTDIR=$(STAGING_DIR) install + $(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install endef -# only libbfd in the target... -BINUTILS_INSTALL_FROM = $(@D)/bfd - -# unless we want full... -ifeq ($(BR2_PACKAGE_BINUTILS_TARGET),y) -BINUTILS_INSTALL_FROM = $(@D) -endif - +# If we don't want full binutils on target +ifneq ($(BR2_PACKAGE_BINUTILS_TARGET), y) define BINUTILS_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(BINUTILS_INSTALL_FROM) \ - DESTDIR=$(TARGET_DIR) install + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(TARGET_DIR) install endef +endif $(eval $(call AUTOTARGETS,package,binutils)) $(eval $(call AUTOTARGETS,package,binutils,host))
Signature · 1 line
1.7.5.2
PATCH 2/3 oprofile: Make it possible to select it with external toolchain
From: Benoit Mauduit <[email protected]>
--- package/oprofile/Config.in | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
package/oprofile/Config.in +6 -3
@@ -3,10 +3,10 @@ config BR2_PACKAGE_OPROFILE # The dependency on binutils_target does not work with # external toolchains since the binutils version was not # choosen in the config. This will have to be fixed later. - depends on !BR2_TOOLCHAIN_EXTERNAL select BR2_PACKAGE_POPT select BR2_PACKAGE_BINUTILS - depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_BINUTILS_LIBBFD + depends on BR2_INSTALL_LIBSTDCPP || BR2_TOOLCHAIN_EXTERNAL help OProfile is a system-wide profiler for Linux systems, capable of profiling all running code at low overhead.
@@ -23,5 +23,8 @@ config BR2_PACKAGE_OPROFILE interrupt handlers, kernel modules, the kernel, shared libraries, and applications. + If you compile oprofile with external toolchain, make sure + you have C++ support enabled. + comment "oprofile requires a toolchain with C++ support enabled" - depends on !BR2_INSTALL_LIBSTDCPP + depends on !BR2_TOOLCHAIN_EXTERNAL && !BR2_INSTALL_LIBSTDCPP
Signature · 1 line
1.7.5.2
PATCH 3/3 oprofile: Bump to 0.9.6
In reply to benoit.mauduit at gmail.comFrom: Benoit Mauduit <[email protected]>
--- package/oprofile/oprofile.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
package/oprofile/oprofile.mk +1 -1
@@ -3,7 +3,7 @@ # oprofile # ############################################################# -OPROFILE_VERSION := 0.9.4 +OPROFILE_VERSION := 0.9.6 OPROFILE_CONF_OPT := --localstatedir=/var \ --with-kernel-support
Signature · 1 line
1.7.5.2
PATCH 1/3 binutils: Makefile and Config.in rework for oprofile ext toolchain compilation
In reply to benoit.mauduit at gmail.comQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"benoit" == benoit mauduit <[email protected]> writes:
benoit> From: Benoit Mauduit <[email protected]>
benoit> * When select full binutils binaries use the default INSTALL_TARGET_CMDS
benoit> from AUTOTARGET.
benoit> * Menu config improvement.
benoit> * Install libiberty into Staging dir.
Committed with minor changes, thanks.
Signature · 1 line
Bye, Peter Korsgaard