]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kbuild: minor improvement for thin archives build
authorNicholas Piggin <npiggin@gmail.com>
Wed, 23 Nov 2016 16:41:43 +0000 (03:41 +1100)
committerMichal Marek <mmarek@suse.com>
Tue, 29 Nov 2016 14:58:57 +0000 (15:58 +0100)
The root built-in.o archive is currently generated before all object
files are built for the final link, due to final build of init/ after
version update. In practice it seems like it doesn't matter because
the archive symbol table does not change, but it is more logical to
create the final archive as the last step.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
scripts/link-vmlinux.sh

index 6b94fe4e932d18921a53e3fdbb6a12832c762dd3..c80291319cb2e20e15df93b685b8065ffdd9742e 100755 (executable)
@@ -209,15 +209,6 @@ case "${KCONFIG_CONFIG}" in
        . "./${KCONFIG_CONFIG}"
 esac
 
-archive_builtin
-
-#link vmlinux.o
-info LD vmlinux.o
-modpost_link vmlinux.o
-
-# modpost vmlinux.o to check for section mismatches
-${MAKE} -f "${srctree}/scripts/Makefile.modpost" vmlinux.o
-
 # Update version
 info GEN .version
 if [ ! -r .version ]; then
@@ -231,6 +222,15 @@ fi;
 # final build of init/
 ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}"
 
+archive_builtin
+
+#link vmlinux.o
+info LD vmlinux.o
+modpost_link vmlinux.o
+
+# modpost vmlinux.o to check for section mismatches
+${MAKE} -f "${srctree}/scripts/Makefile.modpost" vmlinux.o
+
 kallsymso=""
 kallsyms_vmlinux=""
 if [ -n "${CONFIG_KALLSYMS}" ]; then