diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2006-07-27 23:30:06 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2006-07-30 16:45:03 -0700 |
commit | 7f6c1bcb969de5caf8d1337973cb289465de29af (patch) | |
tree | 5b78f2d24f66743a243b69ab41a2ccdb5e263e23 | |
parent | ddf18a1d9270ad46d19e5b8574f146d03df5757c (diff) | |
download | klibc-7f6c1bcb969de5caf8d1337973cb289465de29af.tar.gz |
Temporary fix for the kinit parallel build problemklibc-1.4.14
How to deal with the kinit stuff...
On Thu, Jul 27, 2006 at 01:33:18PM -0700, H. Peter Anvin wrote:
> Hi Sam,
>
> Any thoughts about how to deal with the kinit stuff?
Here is a quick hack.
The way I try to solve it is:
1) define a list of targets that must be build before descending.
This is the "common/" stuff.
2) In resume/ define a number of .o files that shall be linked but
not know as target by make.
Naming of variables are bad and they need better integration (kbuild
shall do objectify, assign targets etc.).
This was just something so you had a possibility to toy with it while
I'm having fun.
Sam
-rw-r--r-- | scripts/Kbuild.klibc | 4 | ||||
-rw-r--r-- | usr/kinit/Kbuild | 6 | ||||
-rw-r--r-- | usr/kinit/resume/Kbuild | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc index 3aa40cdc68fb3..f80345d7da00d 100644 --- a/scripts/Kbuild.klibc +++ b/scripts/Kbuild.klibc @@ -313,7 +313,7 @@ $(sort $(addsuffix /lib.a,$(kprog-dirs))): $(kprog-dirs) ; stripobj = $(subst $(obj)/,,$@) addliba = $(addprefix $(obj)/, $(patsubst %/, %/lib.a, $(1))) -link-deps = $(if $($(stripobj)-y), $(call addliba, $($(stripobj)-y)), $@.o) +link-deps = $(if $($(stripobj)-y), $(call addliba, $($(stripobj)-y)), $@.o) $(use-libs) quiet_cmd_ld-static = KLIBCLD $@ cmd_ld-static = $(KLIBCLD) $(KLIBCLDFLAGS) -o $@ \ @@ -363,7 +363,7 @@ endif # --------------------------------------------------------------------------- .PHONY: $(subdir-y) $(kprog-dirs) $(klib-dirs) -$(sort $(subdir-y) $(kprog-dirs) $(klib-dirs)): +$(sort $(subdir-y) $(kprog-dirs) $(klib-dirs)): $(before-descend) $(Q)$(MAKE) $(klibc)=$@ # Add FORCE to the prequisites of a target to force it to be always rebuilt. diff --git a/usr/kinit/Kbuild b/usr/kinit/Kbuild index 59db29bfb58fa..8b4620e14dff8 100644 --- a/usr/kinit/Kbuild +++ b/usr/kinit/Kbuild @@ -2,6 +2,10 @@ # Kbuild file for kinit # +before-descend := name_to_dev.o devname.o getarg.o +targets := $(before-descend) +before-descend := $(call objectify, $(before-descend)) +use-libs := $(before-descend) static-y := kinit kinit-y := kinit.o do_mounts.o ramdisk_load.o initrd.o kinit-y += getintfile.o open.o readfile.o xpio.o @@ -24,7 +28,7 @@ KLIBCCFLAGS += -I$(srctree)/$(src)/fstype \ -I$(srctree)/$(src)/run-init # Cleaning -targets := kinit kinit.g kinit.shared kinit.shared.g +targets += kinit kinit.g kinit.shared kinit.shared.g subdir- := fstype ipconfig nfsmount resume run-init diff --git a/usr/kinit/resume/Kbuild b/usr/kinit/resume/Kbuild index ce6d0ce3ce615..32b924e31365c 100644 --- a/usr/kinit/resume/Kbuild +++ b/usr/kinit/resume/Kbuild @@ -6,8 +6,8 @@ static-y := static/resume shared-y := shared/resume # common .o files -objs := resume.o resumelib.o ../getarg.o ../name_to_dev.o ../devname.o - +objs := resume.o resumelib.o +use-libs := $(call objectify, ../getarg.o ../name_to_dev.o ../devname.o) # TODO - do we want a stripped version # TODO - do we want the static.g + shared.g directories? |