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 /libstb | |
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 'libstb')
-rw-r--r-- | libstb/Makefile.inc | 2 | ||||
-rw-r--r-- | libstb/drivers/Makefile.inc | 2 | ||||
-rw-r--r-- | libstb/mbedtls/Makefile.inc | 2 | ||||
-rw-r--r-- | libstb/tss/Makefile.inc | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/libstb/Makefile.inc b/libstb/Makefile.inc index 3ea530a..6d54c5c 100644 --- a/libstb/Makefile.inc +++ b/libstb/Makefile.inc @@ -6,7 +6,7 @@ SUBDIRS += $(LIBSTB_DIR) LIBSTB_SRCS = container.c tpm_chip.c cvc.c secureboot.c trustedboot.c LIBSTB_OBJS = $(LIBSTB_SRCS:%.c=%.o) -LIBSTB = $(LIBSTB_DIR)/built-in.o +LIBSTB = $(LIBSTB_DIR)/built-in.a include $(SRC)/$(LIBSTB_DIR)/mbedtls/Makefile.inc include $(SRC)/$(LIBSTB_DIR)/drivers/Makefile.inc diff --git a/libstb/drivers/Makefile.inc b/libstb/drivers/Makefile.inc index 3b8ed0f..80356eb 100644 --- a/libstb/drivers/Makefile.inc +++ b/libstb/drivers/Makefile.inc @@ -6,6 +6,6 @@ SUBDIRS += $(DRIVERS_DIR) DRIVERS_SRCS = tpm_i2c_interface.c tpm_i2c_nuvoton.c DRIVERS_OBJS = $(DRIVERS_SRCS:%.c=%.o) -DRIVERS = $(DRIVERS_DIR)/built-in.o +DRIVERS = $(DRIVERS_DIR)/built-in.a $(DRIVERS): $(DRIVERS_OBJS:%=$(DRIVERS_DIR)/%) diff --git a/libstb/mbedtls/Makefile.inc b/libstb/mbedtls/Makefile.inc index 07aa26a..deacd26 100644 --- a/libstb/mbedtls/Makefile.inc +++ b/libstb/mbedtls/Makefile.inc @@ -6,6 +6,6 @@ SUBDIRS += $(MBEDTLS_DIR) MBEDTLS_SRCS = sha512.c MBEDTLS_OBJS = $(MBEDTLS_SRCS:%.c=%.o) -MBEDTLS = $(MBEDTLS_DIR)/built-in.o +MBEDTLS = $(MBEDTLS_DIR)/built-in.a $(MBEDTLS): $(MBEDTLS_OBJS:%=$(MBEDTLS_DIR)/%) diff --git a/libstb/tss/Makefile.inc b/libstb/tss/Makefile.inc index 2b5c3b9..ed5154d 100644 --- a/libstb/tss/Makefile.inc +++ b/libstb/tss/Makefile.inc @@ -7,7 +7,7 @@ SUBDIRS += $(TSS_DIR) TSS_SRCS = trustedbootCmds.C trustedTypes.C trustedbootUtils.C \ tpmLogMgr.C TSS_OBJS = $(TSS_SRCS:%.C=%.o) -TSS = $(TSS_DIR)/built-in.o +TSS = $(TSS_DIR)/built-in.a $(TSS): $(TSS_OBJS:%=$(TSS_DIR)/%) |