linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: linux arch <linux-arch@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Michal Marek <mmarek@suse.cz>
Cc: Richard Weinberger <richard@nod.at>,
	"David S. Miller" <davem@davemloft.net>,
	Arnaud Lacombe <lacombar@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 0/4] kbuild: Move vmlinux link out of top-level Makefile
Date: Tue, 24 Apr 2012 21:41:48 +0200	[thread overview]
Message-ID: <20120424194148.GA2216@merkur.ravnborg.org> (raw)

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 were 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 longer rebuild if options to ld changes.
- 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.

	Sam

 Documentation/kbuild/kbuild.txt |   15 +++
 Makefile                        |  213 ++------------------------------------
 arch/sparc/Makefile             |   11 --
 arch/sparc/boot/Makefile        |   14 ++-
 arch/um/Makefile                |   11 +--
 scripts/link-vmlinux.sh         |  204 +++++++++++++++++++++++++++++++++++++
 6 files changed, 242 insertions(+), 226 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 and KBUILD_VMLINUX_MAIN


             reply	other threads:[~2012-04-24 19:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 19:41 Sam Ravnborg [this message]
2012-04-24 19:41 ` [PATCH 0/4] kbuild: Move vmlinux link out of top-level Makefile Sam Ravnborg
2012-04-24 19:42 ` [PATCH 1/4] kbuild: drop unused KBUILD_VMLINUX_OBJS from " Sam Ravnborg
2012-04-24 19:43 ` [PATCH 2/4] kbuild: refactor final link of sparc32 Sam Ravnborg
2012-04-24 19:44 ` [PATCH 3/4] kbuild: link of vmlinux moved to a script Sam Ravnborg
2012-04-25 14:24   ` Nick Bowler
2012-04-25 16:30     ` Sam Ravnborg
2012-04-24 19:45 ` [PATCH 4/4] kbuild: document KBUILD_LDS, KBUILD_VMLINUX_INIT and KBUILD_VMLINUX_MAIN Sam Ravnborg
2012-04-25 10:01 ` [PATCH 0/4] kbuild: Move vmlinux link out of top-level Makefile Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120424194148.GA2216@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=davem@davemloft.net \
    --cc=lacombar@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=richard@nod.at \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).