Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: benoit.mauduit at gmail.com <benoit.mauduit@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] binutils: Makefile and Config.in rework for oprofile ext toolchain compilation
Date: Wed,  8 Jun 2011 15:57:26 +0200	[thread overview]
Message-ID: <1307541448-15176-1-git-send-email-benoit.mauduit@gmail.com> (raw)

From: Benoit Mauduit <benoit.mauduit@openwide.fr>

  * 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(-)

diff --git a/package/binutils/Config.in b/package/binutils/Config.in
index 9e4821a..449ba46 100644
--- a/package/binutils/Config.in
+++ b/package/binutils/Config.in
@@ -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
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index 5454af8..d65e68f 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -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))
-- 
1.7.5.2

             reply	other threads:[~2011-06-08 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-08 13:57 benoit.mauduit at gmail.com [this message]
2011-06-08 13:57 ` [Buildroot] [PATCH 2/3] oprofile: Make it possible to select it with external toolchain benoit.mauduit at gmail.com
2011-06-08 13:57 ` [Buildroot] [PATCH 3/3] oprofile: Bump to 0.9.6 benoit.mauduit at gmail.com
2011-10-27 13:17 ` [Buildroot] [PATCH 1/3] binutils: Makefile and Config.in rework for oprofile ext toolchain compilation Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307541448-15176-1-git-send-email-benoit.mauduit@gmail.com \
    --to=benoit.mauduit@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox