From 002cb02f4e67630b55b9f0d034535782c57d00b2 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Wed, 25 Feb 2015 15:30:58 +0200 Subject: [PATCH] Apply a size tweak from busybox. Hinders debugging, but saves 10-20% from a binary. --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index dfb8eaf..0773e10 100644 --- a/configure.ac +++ b/configure.ac @@ -637,6 +637,16 @@ AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [ac_cv_visiblity_supported=no], []) +# Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary) +AX_CHECK_COMPILE_FLAG([-fno-unwind-tables], + [CFLAGS="$CFLAGS -fno-unwind-tables"], + [], + []) +AX_CHECK_COMPILE_FLAG([-fno-asynchronous-unwind-tables], + [CFLAGS="$CFLAGS -fno-asynchronous-unwind-tables"], + [], + []) + AX_CHECK_LINK_FLAG([-Wl,-as-needed], [LDFLAGS="$LDFLAGS -Wl,-as-needed"], [], [])