mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-05-05 09:56:12 +02:00
toolchain: binutils: add version 2.46
Release Notes: - https://sourceware.org/pipermail/binutils/2026-February/148149.html OpenWrt changes: - adjust patch manually: - 500-Change-default-emulation-for-mips64-linux.patch - rearrange configure options and variables - provide variables for both configure and build stages (binutils has more than one ./configure script in source tree) Signed-off-by: Konstantin Demin <rockdrilla@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21997 Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
parent
eac927fadf
commit
9b3ee8218b
@ -13,6 +13,10 @@ choice
|
||||
config BINUTILS_USE_VERSION_2_45
|
||||
bool "Binutils 2.45.1"
|
||||
select BINUTILS_VERSION_2_45
|
||||
|
||||
config BINUTILS_USE_VERSION_2_46
|
||||
bool "Binutils 2.46"
|
||||
select BINUTILS_VERSION_2_46
|
||||
endchoice
|
||||
|
||||
config EXTRA_BINUTILS_CONFIG_OPTIONS
|
||||
|
||||
@ -6,7 +6,11 @@ config BINUTILS_VERSION_2_44
|
||||
config BINUTILS_VERSION_2_45
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION_2_46
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION
|
||||
string
|
||||
default "2.44" if BINUTILS_VERSION_2_44
|
||||
default "2.45.1" if BINUTILS_VERSION_2_45
|
||||
default "2.46.0" if BINUTILS_VERSION_2_46
|
||||
|
||||
@ -24,6 +24,10 @@ ifeq ($(PKG_VERSION),2.45.1)
|
||||
PKG_HASH:=5fe101e6fe9d18fdec95962d81ed670fdee5f37e3f48f0bef87bddf862513aa5
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_VERSION),2.46.0)
|
||||
PKG_HASH:=d75a94f4d73e7a4086f7513e67e439e8fcdcbb726ffe63f4661744e6256b2cf2
|
||||
endif
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
PATCH_DIR:=./patches/$(BASE_VERSION)
|
||||
@ -45,17 +49,21 @@ HOST_CONFIGURE_ARGS = \
|
||||
--host=$(GNU_HOST_NAME) \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--with-sysroot=$(TOOLCHAIN_DIR) \
|
||||
--with-system-zlib \
|
||||
--with-zstd \
|
||||
--enable-dependency-tracking \
|
||||
--enable-serial-configure \
|
||||
--enable-obsolete \
|
||||
--enable-deterministic-archives \
|
||||
--enable-plugins \
|
||||
--enable-lto \
|
||||
--disable-werror \
|
||||
--disable-gprofng \
|
||||
--disable-multilib \
|
||||
--disable-werror \
|
||||
--disable-nls \
|
||||
--disable-sim \
|
||||
--disable-gdb \
|
||||
--with-system-zlib \
|
||||
--with-zstd \
|
||||
--without-debuginfod \
|
||||
$(GRAPHITE_CONFIGURE) \
|
||||
$(SOFT_FLOAT_CONFIG_OPTION) \
|
||||
$(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS))
|
||||
@ -73,8 +81,34 @@ ifneq ($(CONFIG_EXTRA_TARGET_ARCH),)
|
||||
--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX)
|
||||
endif
|
||||
|
||||
HOST_CONFIGURE_VARS += \
|
||||
acx_cv_cc_gcc_supports_ada=false
|
||||
BINUTILS_VARS = \
|
||||
ac_cv_path_EXPECT= \
|
||||
ac_cv_path_GMSGFMT=: \
|
||||
ac_cv_path_MSGFMT=: \
|
||||
ac_cv_path_MSGMERGE=: \
|
||||
ac_cv_path_XGETTEXT=: \
|
||||
ac_cv_prog_ACLOCAL=$(STAGING_DIR_HOST)/bin/aclocal \
|
||||
ac_cv_prog_AUTOCONF=$(STAGING_DIR_HOST)/bin/autoconf \
|
||||
ac_cv_prog_AUTOHEADER=$(STAGING_DIR_HOST)/bin/autoheader \
|
||||
ac_cv_prog_AUTOMAKE=$(STAGING_DIR_HOST)/bin/automake \
|
||||
ac_cv_prog_CARGO= \
|
||||
ac_cv_prog_EXPECT= \
|
||||
ac_cv_prog_GDC= \
|
||||
ac_cv_prog_GNATBIND= \
|
||||
ac_cv_prog_GNATMAKE= \
|
||||
ac_cv_prog_MAKEINFO= \
|
||||
ac_cv_prog_ac_ct_GDC= \
|
||||
ac_cv_prog_ac_ct_GNATBIND= \
|
||||
ac_cv_prog_ac_ct_GNATMAKE= \
|
||||
ac_cv_dejagnu_compat=no \
|
||||
ac_cv_libctf_tcl_try=no \
|
||||
acx_cv_cc_gcc_supports_ada=no \
|
||||
acx_cv_d_compiler_works=no \
|
||||
|
||||
|
||||
HOST_CONFIGURE_VARS += $(BINUTILS_VARS)
|
||||
|
||||
HOST_MAKE_VARS += $(BINUTILS_VARS)
|
||||
|
||||
define Host/Prepare
|
||||
$(call Host/Prepare/Default)
|
||||
@ -83,7 +117,8 @@ define Host/Prepare
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all
|
||||
+$(HOST_MAKE_VARS) \
|
||||
$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS)
|
||||
# We put the scripts in the directory $(scriptdir)/ldscripts.
|
||||
# We can't put the scripts in $(datadir) because the SEARCH_DIR
|
||||
# directives need to be different for native and cross linkers.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -588,7 +588,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS)
|
||||
# We put the scripts in the directory $(scriptdir)/ldscripts.
|
||||
# We can't put the scripts in $(datadir) because the SEARCH_DIR
|
||||
# directives need to be different for native and cross linkers.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
@ -0,0 +1,18 @@
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -8214,6 +8214,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
|
||||
bh = NULL;
|
||||
+ if (0) {
|
||||
if (!(_bfd_generic_link_add_one_symbol
|
||||
(info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0,
|
||||
NULL, false, get_elf_backend_data (abfd)->collect, &bh)))
|
||||
@@ -8226,6 +8227,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
if (! bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
return false;
|
||||
+ }
|
||||
|
||||
if (! mips_elf_hash_table (info)->use_rld_obj_head)
|
||||
{
|
||||
@ -0,0 +1,45 @@
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -963,16 +963,16 @@ case "${targ}" in
|
||||
targ_selvecs="mips_elf64_trad_be_vec mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec"
|
||||
;;
|
||||
mips64*el-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_le_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
|
||||
+ targ_defvec=mips_elf64_trad_le_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
|
||||
;;
|
||||
mips64*-*-linux*-gnuabi64)
|
||||
targ_defvec=mips_elf64_trad_be_vec
|
||||
targ_selvecs="mips_elf64_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec"
|
||||
;;
|
||||
mips64*-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_be_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
|
||||
+ targ_defvec=mips_elf64_trad_be_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
|
||||
;;
|
||||
mips*el-*-linux*)
|
||||
targ_defvec=mips_elf32_trad_le_vec
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -574,15 +574,15 @@ mips64*el-*-linux-gnuabi64)
|
||||
targ_emul=elf64ltsmip
|
||||
targ_extra_libpath="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip"
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_libpath="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_libpath="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
;;
|
||||
mips64*-*-linux-gnuabi64)
|
||||
targ_emul=elf64btsmip
|
||||
targ_extra_libpath="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip"
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_libpath="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_libpath="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
targ_extra_libpath="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
|
||||
Loading…
x
Reference in New Issue
Block a user