diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-02-10 18:42:49 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2018-02-28 20:28:39 -0600 |
commit | f6159cff5d91e5c0810d0c9285a1d2370a38e2b7 (patch) | |
tree | c6148aef1cc7f967baaf9b7a65486b7b4c95678f /hw | |
parent | f30286c494312caa81333a077da58f501894c2bb (diff) | |
download | skiboot-f6159cff5d91e5c0810d0c9285a1d2370a38e2b7.zip skiboot-f6159cff5d91e5c0810d0c9285a1d2370a38e2b7.tar.gz skiboot-f6159cff5d91e5c0810d0c9285a1d2370a38e2b7.tar.bz2 |
build: use thin archives rather than incremental linking
This changes to build system to use thin archives rather than
incremental linking for built-in.o, similar to recent change to Linux.
built-in.o is renamed to built-in.a, and is created as a thin archive
with no index, for speed and size. All built-in.a are aggregated into
a skiboot.tmp.a which is a thin archive built with an index, making it
suitable or linking. This is input into the final link.
The advantags of build size and linker code placement flexibility are
not as great with skiboot as a bigger project like Linux, but it's a
conceptually better way to build, and is more compatible with link
time optimisation in toolchains which might be interesting for skiboot
particularly for size reductions.
Size of build tree before this patch is 34.4MB, afterwards 23.1MB.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/Makefile.inc | 2 | ||||
-rw-r--r-- | hw/ast-bmc/Makefile.inc | 2 | ||||
-rw-r--r-- | hw/ec/Makefile.inc | 2 | ||||
-rw-r--r-- | hw/fsp/Makefile.inc | 2 | ||||
-rw-r--r-- | hw/ipmi/Makefile.inc | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/hw/Makefile.inc b/hw/Makefile.inc index 04cacd1..2dc3cc0 100644 --- a/hw/Makefile.inc +++ b/hw/Makefile.inc @@ -8,7 +8,7 @@ HW_OBJS += phb3.o sfc-ctrl.o fake-rtc.o bt.o p8-i2c.o prd.o HW_OBJS += dts.o lpc-rtc.o npu.o npu-hw-procedures.o xive.o phb4.o HW_OBJS += fake-nvram.o lpc-mbox.o npu2.o npu2-hw-procedures.o HW_OBJS += phys-map.o sbe-p9.o capp.o occ-sensor.o vas.o -HW=hw/built-in.o +HW=hw/built-in.a # FIXME hack this for now CFLAGS_hw/phb4.o = -Wno-unused-value -Wno-unused-parameter diff --git a/hw/ast-bmc/Makefile.inc b/hw/ast-bmc/Makefile.inc index a97c0db..29e7a35 100644 --- a/hw/ast-bmc/Makefile.inc +++ b/hw/ast-bmc/Makefile.inc @@ -1,5 +1,5 @@ SUBDIRS += hw/ast-bmc AST_BMC_OBJS = ast-io.o ast-sf-ctrl.o -AST_BMC = hw/ast-bmc/built-in.o +AST_BMC = hw/ast-bmc/built-in.a $(AST_BMC): $(AST_BMC_OBJS:%=hw/ast-bmc/%) diff --git a/hw/ec/Makefile.inc b/hw/ec/Makefile.inc index 09c9c84..f944d4d 100644 --- a/hw/ec/Makefile.inc +++ b/hw/ec/Makefile.inc @@ -3,6 +3,6 @@ SUBDIRS += hw/ec EC_OBJS = gpio.o -EC=hw/ec/built-in.o +EC=hw/ec/built-in.a $(EC): $(EC_OBJS:%=hw/ec/%) diff --git a/hw/fsp/Makefile.inc b/hw/fsp/Makefile.inc index 7169095..7a477db 100644 --- a/hw/fsp/Makefile.inc +++ b/hw/fsp/Makefile.inc @@ -6,5 +6,5 @@ FSP_OBJS += fsp-diag.o fsp-leds.o fsp-mem-err.o fsp-op-panel.o FSP_OBJS += fsp-elog-read.o fsp-elog-write.o fsp-epow.o fsp-dpo.o FSP_OBJS += fsp-dump.o fsp-mdst-table.o fsp-chiptod.o fsp-ipmi.o FSP_OBJS += fsp-attn.o -FSP = hw/fsp/built-in.o +FSP = hw/fsp/built-in.a $(FSP): $(FSP_OBJS:%=hw/fsp/%) diff --git a/hw/ipmi/Makefile.inc b/hw/ipmi/Makefile.inc index a54602c..34d6bd3 100644 --- a/hw/ipmi/Makefile.inc +++ b/hw/ipmi/Makefile.inc @@ -3,5 +3,5 @@ SUBDIRS += hw/ipmi IPMI_OBJS = ipmi-rtc.o ipmi-power.o ipmi-fru.o ipmi-sel.o IPMI_OBJS += ipmi-watchdog.o ipmi-sensor.o ipmi-attn.o -IPMI = hw/ipmi/built-in.o +IPMI = hw/ipmi/built-in.a $(IPMI): $(IPMI_OBJS:%=hw/ipmi/%) |