Message ID | 20240116-autofoo-v1-9-626f6b54bd06@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Autotools papercuts, linker GC, symlink dbus-org.bluez.obex.service | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
diff --git a/acinclude.m4 b/acinclude.m4 index c5d6de7b3..4b73a5bfc 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -134,6 +134,8 @@ AC_DEFUN([MISC_FLAGS], [ misc_cflags="$misc_cflags --coverage" misc_ldflags="$misc_ldflags --coverage" fi + misc_cflags="$misc_cflags -ffunction-sections -fdata-sections" + misc_ldflags="$misc_ldflags -Wl,--gc-sections" AC_SUBST([MISC_CFLAGS], $misc_cflags) AC_SUBST([MISC_LDFLAGS], $misc_ldflags) ])
From: Emil Velikov <emil.velikov@collabora.com> Currently, there's plenty of unused code in most binaries. Enable -fdata/function-sections, which allows the linker garbage collection to do its job. On a maintainer build, this reduces the (unstriped) binaries from 117 to 114MiB. --- acinclude.m4 | 2 ++ 1 file changed, 2 insertions(+)