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 /libc | |
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 'libc')
-rw-r--r-- | libc/Makefile.inc | 2 | ||||
-rw-r--r-- | libc/ctype/Makefile.inc | 2 | ||||
-rw-r--r-- | libc/stdio/Makefile.inc | 2 | ||||
-rw-r--r-- | libc/stdlib/Makefile.inc | 2 | ||||
-rw-r--r-- | libc/string/Makefile.inc | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/libc/Makefile.inc b/libc/Makefile.inc index 66ce4ab..13f8034 100644 --- a/libc/Makefile.inc +++ b/libc/Makefile.inc @@ -1,7 +1,7 @@ LIBCDIR = libc SUBDIRS += $(LIBCDIR) -LIBC = $(LIBCDIR)/built-in.o $(LIBCDIR)/time.o +LIBC = $(LIBCDIR)/built-in.a $(LIBCDIR)/time.o include $(SRC)/$(LIBCDIR)/string/Makefile.inc include $(SRC)/$(LIBCDIR)/ctype/Makefile.inc diff --git a/libc/ctype/Makefile.inc b/libc/ctype/Makefile.inc index da78c98..c183a54 100644 --- a/libc/ctype/Makefile.inc +++ b/libc/ctype/Makefile.inc @@ -14,6 +14,6 @@ SUBDIRS += $(LIBCDIR)/ctype CTYPE_OBJS = isdigit.o isprint.o isspace.o isxdigit.o tolower.o toupper.o -CTYPE = $(LIBCDIR)/ctype/built-in.o +CTYPE = $(LIBCDIR)/ctype/built-in.a $(CTYPE): $(CTYPE_OBJS:%=$(LIBCDIR)/ctype/%) diff --git a/libc/stdio/Makefile.inc b/libc/stdio/Makefile.inc index d2aee0f..a5436d7 100644 --- a/libc/stdio/Makefile.inc +++ b/libc/stdio/Makefile.inc @@ -17,5 +17,5 @@ STDIO_OBJS = vfprintf.o vsnprintf.o fprintf.o \ setvbuf.o fputc.o puts.o fputs.o putchar.o \ stdchnls.o fileno.o snprintf.o -STDIO = $(LIBCDIR)/stdio/built-in.o +STDIO = $(LIBCDIR)/stdio/built-in.a $(STDIO): $(STDIO_OBJS:%=$(LIBCDIR)/stdio/%) diff --git a/libc/stdlib/Makefile.inc b/libc/stdlib/Makefile.inc index 22417df..8a78d17 100644 --- a/libc/stdlib/Makefile.inc +++ b/libc/stdlib/Makefile.inc @@ -15,6 +15,6 @@ SUBDIRS += $(LIBCDIR)/stdlib STDLIB_OBJS = error.o atoi.o atol.o strtol.o strtoul.o \ rand.o labs.o -STDLIB = $(LIBCDIR)/stdlib/built-in.o +STDLIB = $(LIBCDIR)/stdlib/built-in.a $(STDLIB): $(STDLIB_OBJS:%=$(LIBCDIR)/stdlib/%) diff --git a/libc/string/Makefile.inc b/libc/string/Makefile.inc index fb2f037..122f5da 100644 --- a/libc/string/Makefile.inc +++ b/libc/string/Makefile.inc @@ -16,6 +16,6 @@ STRING_OBJS = strcat.o strchr.o strcmp.o strcpy.o strlen.o \ strncmp.o strncpy.o strstr.o memset.o memcpy.o memcpy_from_ci.o \ memmove.o memchr.o memcmp.o strcasecmp.o strncasecmp.o \ strtok.o strdup.o -STRING = $(LIBCDIR)/string/built-in.o +STRING = $(LIBCDIR)/string/built-in.a $(STRING): $(STRING_OBJS:%=$(LIBCDIR)/string/%) |