config BR2_PACKAGE_BINUTILS
- bool "libbfd (binutils)"
- depends on BR2_TOOLCHAIN_BUILDROOT
+ bool "binutils"
select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
help
- Install libbfd from binutils in the target.
-
- This is used by oprofile to avoid a full-blown target binutils.
+ Install binutils on the target
config BR2_PACKAGE_BINUTILS_TARGET
bool "binutils binaries"
#
#############################################################
+# 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)
$(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
+ $(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install
endef
+endif
$(eval $(call AUTOTARGETS))
$(eval $(call AUTOTARGETS,host))