diff mbox series

[1/4] build: -fno-asynchronous-unwind-tables

Message ID 20190414125041.11512-1-npiggin@gmail.com
State Accepted
Headers show
Series [1/4] build: -fno-asynchronous-unwind-tables | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (ff79070d1c4cdc38f2ecb42e45b8322cb1efb819)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Nicholas Piggin April 14, 2019, 12:50 p.m. UTC
skiboot does not use unwind tables, this option saves about 100kB,
mostly from .text.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 Makefile.main | 2 +-
 skiboot.lds.S | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Stewart Smith April 17, 2019, 7:37 a.m. UTC | #1
Nicholas Piggin <npiggin@gmail.com> writes:
> skiboot does not use unwind tables, this option saves about 100kB,
> mostly from .text.

10kb off the xz compressed image! Woohoo!

Series merged to master as of 065877fc59de64ae22b4677667ce42db609ffdf5.

Just before the --orphan-handling=warn patch, I merged in a bump to the
toolchain we were using on the centos7 docker image. It's now GCC 8.1
(latest crosstool builds -
https://mirrors.edge.kernel.org/pub/tools/crosstool/ ).

I heard zero people advocating for ancient GCC (granted, I asked the
people in my house, which at the time was me) :)
diff mbox series

Patch

diff --git a/Makefile.main b/Makefile.main
index 8a99ec9f4..68c744d07 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -74,7 +74,7 @@  ifeq ($(DEBUG),1)
 CPPFLAGS += -DDEBUG -DCCAN_LIST_DEBUG
 endif
 
-CFLAGS := -fno-strict-aliasing -pie -fpie -fno-pic -mbig-endian -m64
+CFLAGS := -fno-strict-aliasing -pie -fpie -fno-pic -mbig-endian -m64 -fno-asynchronous-unwind-tables
 CFLAGS += -mcpu=power7
 CFLAGS += -Wl,--oformat,elf64-powerpc
 CFLAGS += $(call try-cflag,$(CC),-ffixed-r13)
diff --git a/skiboot.lds.S b/skiboot.lds.S
index 8d09b40e6..6f6f77155 100644
--- a/skiboot.lds.S
+++ b/skiboot.lds.S
@@ -175,6 +175,7 @@  SECTIONS
 	/* Discards */
 	/DISCARD/ : {
 		*(.comment)
+		*(.eh_frame)
 		*(.interp)
 	}
 }