All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] kbuild: Move vmlinux link out of top-level Makefile
@ 2012-04-28 20:56 Sam Ravnborg
  2012-04-28 20:58   ` Sam Ravnborg
                   ` (4 more replies)
  0 siblings, 5 replies; 41+ messages in thread
From: Sam Ravnborg @ 2012-04-28 20:56 UTC (permalink / raw)
  To: linux arch, lkml, linux-kbuild, Michal Marek
  Cc: Richard Weinberger, David S. Miller, Arnaud Lacombe, Andi Kleen

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


^ permalink raw reply	[flat|nested] 41+ messages in thread
* [PATCH 0/4] kbuild: Move vmlinux link out of top-level Makefile
@ 2012-04-24 19:41 Sam Ravnborg
  2012-04-24 19:44   ` Sam Ravnborg
  0 siblings, 1 reply; 41+ messages in thread
From: Sam Ravnborg @ 2012-04-24 19:41 UTC (permalink / raw)
  To: linux arch, lkml, linux-kbuild, Michal Marek
  Cc: Richard Weinberger, David S. Miller, Arnaud Lacombe, Linus Torvalds

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


^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2012-09-06 20:43 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-28 20:56 [PATCH v2 0/4] kbuild: Move vmlinux link out of top-level Makefile Sam Ravnborg
2012-04-28 20:58 ` [PATCH 1/4] kbuild: drop unused KBUILD_VMLINUX_OBJS from " Sam Ravnborg
2012-04-28 20:58   ` Sam Ravnborg
2012-04-28 20:58 ` [PATCH 2/4] kbuild: refactor final link of sparc32 Sam Ravnborg
2012-04-28 20:58   ` Sam Ravnborg
2012-04-29  8:27   ` Geert Uytterhoeven
2012-04-28 20:59 ` [PATCH 3/4] kbuild: link of vmlinux moved to a script Sam Ravnborg
2012-04-28 20:59   ` Sam Ravnborg
2012-04-29  8:28   ` Geert Uytterhoeven
2012-04-29  8:28     ` Geert Uytterhoeven
2012-05-04 23:05   ` Michal Marek
2012-05-05  8:29     ` Sam Ravnborg
2012-05-07 23:15       ` Tony Luck
2012-05-08 16:51         ` Sam Ravnborg
2012-05-08 17:39           ` Tony Luck
2012-05-08 17:39             ` Tony Luck
2012-05-08 17:53             ` [PATCH] kbuild: fix ia64 link Sam Ravnborg
2012-05-08 17:53               ` Sam Ravnborg
2012-05-08 17:53               ` Sam Ravnborg
2012-05-10 12:22               ` Michal Marek
2012-05-09 22:58           ` [PATCH 3/4] kbuild: link of vmlinux moved to a script Paul Gortmaker
2012-05-10  5:16             ` Sam Ravnborg
2012-05-10  5:16               ` Sam Ravnborg
2012-05-10 12:22             ` Michal Marek
2012-05-10 12:22               ` Michal Marek
2012-05-10 12:22               ` Michal Marek
2012-05-10 14:44               ` Paul Gortmaker
2012-05-10 14:44                 ` Paul Gortmaker
2012-05-15 22:20                 ` Michal Marek
2012-09-06 20:43   ` James Hogan
2012-04-28 21:00 ` [PATCH 4/4] kbuild: document KBUILD_LDS, KBUILD_VMLINUX_{INIT,MAIN} and LDFLAGS_vmlinux Sam Ravnborg
2012-04-28 21:00   ` Sam Ravnborg
2012-04-29  8:29   ` Geert Uytterhoeven
2012-04-29  8:29     ` Geert Uytterhoeven
2012-04-29  8:26 ` [PATCH v2 0/4] kbuild: Move vmlinux link out of top-level Makefile Geert Uytterhoeven
2012-04-29  8:26   ` Geert Uytterhoeven
2012-04-29 11:03   ` Sam Ravnborg
  -- strict thread matches above, loose matches on Subject: below --
2012-04-24 19:41 [PATCH " Sam Ravnborg
2012-04-24 19:44 ` [PATCH 3/4] kbuild: link of vmlinux moved to a script Sam Ravnborg
2012-04-24 19:44   ` Sam Ravnborg
2012-04-25 14:24   ` Nick Bowler
2012-04-25 16:30     ` Sam Ravnborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.