2011-02-21 11:43:16 +00:00
|
|
|
#
|
2013-09-11 13:18:23 +00:00
|
|
|
# Copyright (C) 2006-2013 OpenWrt.org
|
2006-06-27 00:44:04 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2005-03-06 03:34:52 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2006-06-21 06:19:43 +00:00
|
|
|
PKG_NAME:=binutils
|
2008-07-14 23:24:58 +00:00
|
|
|
PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION))
|
2009-10-19 02:09:59 +00:00
|
|
|
BIN_VERSION:=$(PKG_VERSION)
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2015-11-10 12:03:59 +00:00
|
|
|
PKG_SOURCE_URL:=@GNU/binutils/
|
2018-04-16 23:15:30 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
2015-11-10 12:03:59 +00:00
|
|
|
|
2018-03-12 20:29:07 +00:00
|
|
|
TAR_OPTIONS += --exclude='*.rej'
|
|
|
|
|
2021-07-19 11:09:38 +00:00
|
|
|
ifeq ($(PKG_VERSION),2.37)
|
|
|
|
PKG_HASH:=820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c
|
|
|
|
endif
|
|
|
|
|
2022-02-09 15:18:45 +00:00
|
|
|
ifeq ($(PKG_VERSION),2.38)
|
|
|
|
PKG_HASH:=e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024
|
|
|
|
endif
|
|
|
|
|
2022-08-07 21:26:05 +00:00
|
|
|
ifeq ($(PKG_VERSION),2.39)
|
|
|
|
PKG_HASH:=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
|
|
|
|
endif
|
|
|
|
|
2023-01-15 04:39:06 +00:00
|
|
|
ifeq ($(PKG_VERSION),2.40)
|
|
|
|
PKG_HASH:=0f8a4c272d7f17f369ded10a4aca28b8e304828e95526da482b0ccc4dfc9d8e1
|
|
|
|
endif
|
|
|
|
|
2012-09-15 14:18:16 +00:00
|
|
|
HOST_BUILD_PARALLEL:=1
|
|
|
|
|
2007-06-28 07:20:42 +00:00
|
|
|
PATCH_DIR:=./patches/$(PKG_VERSION)
|
2008-11-08 21:18:33 +00:00
|
|
|
|
2009-02-23 23:52:27 +00:00
|
|
|
include $(INCLUDE_DIR)/toolchain-build.mk
|
2005-07-20 14:58:27 +00:00
|
|
|
|
2023-01-31 10:07:42 +00:00
|
|
|
ifdef CONFIG_GCC_USE_GRAPHITE
|
|
|
|
GRAPHITE_CONFIGURE:= --with-isl=$(STAGING_DIR_HOST)
|
|
|
|
else
|
|
|
|
GRAPHITE_CONFIGURE:= --without-isl --without-cloog
|
|
|
|
endif
|
|
|
|
|
2019-04-22 12:22:40 +00:00
|
|
|
HOST_CONFIGURE_ARGS = \
|
|
|
|
--prefix=$(TOOLCHAIN_DIR) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--host=$(GNU_HOST_NAME) \
|
|
|
|
--target=$(REAL_GNU_TARGET_NAME) \
|
|
|
|
--with-sysroot=$(TOOLCHAIN_DIR) \
|
2023-01-31 10:27:00 +00:00
|
|
|
--with-system-zlib \
|
|
|
|
--without-zstd \
|
2019-04-22 12:22:40 +00:00
|
|
|
--enable-deterministic-archives \
|
|
|
|
--enable-plugins \
|
2023-01-31 10:27:00 +00:00
|
|
|
--enable-lto \
|
|
|
|
--disable-gprofng \
|
2019-04-22 12:22:40 +00:00
|
|
|
--disable-multilib \
|
|
|
|
--disable-werror \
|
|
|
|
--disable-nls \
|
|
|
|
--disable-sim \
|
|
|
|
--disable-gdb \
|
|
|
|
$(GRAPHITE_CONFIGURE) \
|
|
|
|
$(SOFT_FLOAT_CONFIG_OPTION) \
|
|
|
|
$(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS))
|
2008-04-12 23:14:42 +00:00
|
|
|
|
2009-02-02 23:45:33 +00:00
|
|
|
ifneq ($(CONFIG_SSP_SUPPORT),)
|
2019-04-22 12:22:40 +00:00
|
|
|
HOST_CONFIGURE_ARGS+= \
|
2009-02-03 21:25:48 +00:00
|
|
|
--enable-libssp
|
2009-02-02 23:45:33 +00:00
|
|
|
else
|
2019-04-22 12:22:40 +00:00
|
|
|
HOST_CONFIGURE_ARGS+= \
|
2009-02-03 21:25:48 +00:00
|
|
|
--disable-libssp
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_EXTRA_TARGET_ARCH),)
|
2019-04-22 12:22:40 +00:00
|
|
|
HOST_CONFIGURE_ARGS+= \
|
2009-02-03 21:25:48 +00:00
|
|
|
--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX)
|
2009-02-02 23:45:33 +00:00
|
|
|
endif
|
|
|
|
|
2021-03-06 22:17:45 +00:00
|
|
|
HOST_CONFIGURE_VARS += \
|
|
|
|
acx_cv_cc_gcc_supports_ada=false
|
|
|
|
|
2009-02-22 04:37:20 +00:00
|
|
|
define Host/Prepare
|
|
|
|
$(call Host/Prepare/Default)
|
2014-10-18 19:25:24 +00:00
|
|
|
ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
|
2009-02-22 04:37:20 +00:00
|
|
|
$(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/
|
2009-01-08 01:49:11 +00:00
|
|
|
endef
|
|
|
|
|
2009-02-22 04:37:20 +00:00
|
|
|
define Host/Compile
|
2012-09-23 09:50:01 +00:00
|
|
|
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all
|
2006-06-21 06:19:43 +00:00
|
|
|
endef
|
2005-07-20 14:58:27 +00:00
|
|
|
|
2009-02-22 04:37:20 +00:00
|
|
|
define Host/Install
|
2012-06-30 18:12:15 +00:00
|
|
|
$(MAKE) -C $(HOST_BUILD_DIR) \
|
|
|
|
install
|
2023-02-07 20:33:33 +00:00
|
|
|
$(call FixupLibdir,$(TOOLCHAIN_DIR))
|
2017-05-03 13:01:03 +00:00
|
|
|
$(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(HOST_BUILD_PREFIX)/bin/readelf
|
2006-06-21 06:19:43 +00:00
|
|
|
endef
|
2005-07-20 14:58:27 +00:00
|
|
|
|
2009-02-22 04:37:20 +00:00
|
|
|
define Host/Clean
|
2009-01-08 01:49:11 +00:00
|
|
|
rm -rf \
|
2009-02-22 04:37:20 +00:00
|
|
|
$(HOST_BUILD_DIR) \
|
2009-01-08 01:49:11 +00:00
|
|
|
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
|
|
|
|
endef
|
|
|
|
|
2006-06-21 06:19:43 +00:00
|
|
|
$(eval $(call HostBuild))
|