summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2022-08-16 17:35:50 +0000
committerFelix Fietkau2025-10-22 09:06:36 +0000
commit085c08bdb44032ea63ff4e2e5af1ad8d4e16a2d3 (patch)
tree2763f09494729827a7ced58847d4810ead376cfd
parentc2025c0015b4049781f337a85edffa9cd6dba047 (diff)
downloadnbd-085c08bdb44032ea63ff4e2e5af1ad8d4e16a2d3.tar.gz
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 <nbd@nbd.name>
-rw-r--r--toolchain/binutils/Makefile1
-rw-r--r--toolchain/build_version2
-rw-r--r--toolchain/gcc/common.mk1
3 files changed, 3 insertions, 1 deletions
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 \