From 085c08bdb44032ea63ff4e2e5af1ad8d4e16a2d3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 16 Aug 2022 19:35:50 +0200 Subject: [PATCH] gcc/binutils: disable sysv style hash tables for generated binaries GNU hash tables are always preferred by musl, so the sysv ones are completely unused and only waste space. Reduces image size by ~1.4% Signed-off-by: Felix Fietkau --- toolchain/binutils/Makefile | 1 + toolchain/build_version | 2 +- toolchain/gcc/common.mk | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index 7077195e27..4959c165f2 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -56,6 +56,7 @@ HOST_CONFIGURE_ARGS = \ --with-system-zlib \ --with-zstd \ --enable-deterministic-archives \ + $(if $(findstring mips,$(ARCH)),,--enable-default-hash-style=gnu) \ --enable-plugins \ --enable-lto \ --disable-gprofng \ diff --git a/toolchain/build_version b/toolchain/build_version index d00491fd7e..0cfbf08886 100644 --- a/toolchain/build_version +++ b/toolchain/build_version @@ -1 +1 @@ -1 +2 diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 8bd898e095..0de05bd945 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -112,6 +112,7 @@ GCC_CONFIGURE:= \ --disable-libssp \ $(GRAPHITE_CONFIGURE) \ --with-host-libstdcxx=-lstdc++ \ + $(if $(findstring mips,$(ARCH)),,--with-linker-hash-style=gnu) \ $(SOFT_FLOAT_CONFIG_OPTION) \ $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ $(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \ -- 2.30.2