[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120428205651.GA7426@merkur.ravnborg.org>
Date: Sat, 28 Apr 2012 22:56:51 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: linux arch <linux-arch@...r.kernel.org>,
lkml <linux-kernel@...r.kernel.org>,
linux-kbuild <linux-kbuild@...r.kernel.org>,
Michal Marek <mmarek@...e.cz>
Cc: Richard Weinberger <richard@....at>,
"David S. Miller" <davem@...emloft.net>,
Arnaud Lacombe <lacombar@...il.com>,
Andi Kleen <andi@...stfloor.org>
Subject: [PATCH v2 0/4] kbuild: Move vmlinux link out of top-level Makefile
The following patchset moves all the magic used
to deal with the final link of vmlinux from the
top-level Makefile to a shell script.
The main motivation was to convert the almost
unreadable mess in the top-level Makefile to
an easy to read/maintain shell script.
The final link stages are serialized
anyway - so there where nothing gained by using
the Makefile logic to handle this.
What we gain:
- A readable final link of vmlinux
- Less junk in the top-level Makefile
What we loose by the conversion:
- We no logner rebuild if one of the .tmp_kallsyms
files are deleted.
- We no longer rebuild if vmlinux.o is deleted
None of the above cases are hit by a typical
kernel developer so the drawbacks are acceptable.
I had to implement special handling of um in the
link-vmlinux script. It is not pretty by any means,
but I could not come up with something better.
My previous attempts to use ld for um linking has failed,
so this kludge was introduced.
There is no outstanding issues to my knowledge,
and the patchset is ready to be applied.
I assume this should go in via the kbuild#misc tree.
v2:
- rebuild if options to ld changes (Andi Kleen)
- shell script improvements from Nick Bowler
- clean target calls script to clean up after link
- include documentation of LDFLAGS_vmlinux
Sam
Documentation/kbuild/kbuild.txt | 19 +++++
Makefile | 217 ++++----------------------------------------------
arch/sparc/Makefile | 11 ---
arch/sparc/boot/Makefile | 14 ++--
arch/um/Makefile | 11 +--
scripts/link-vmlinux.sh | 211 ++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 256 insertions(+), 227 deletions(-)
Sam Ravnborg (4):
kbuild: drop unused KBUILD_VMLINUX_OBJS from top-level Makefile
kbuild: refactor final link of sparc32
kbuild: link of vmlinux moved to a script
kbuild: document KBUILD_LDS, KBUILD_VMLINUX_{INIT,MAIN} and LDFLAGS_vmlinux
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists