From 12b163dbd81cafafec1ebe3c4039c65af60ee261 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 28 Mar 2011 15:09:50 +0100 Subject: bitbake/gcc: Enable a shared common source tree This patch is a quick proof of concept to show how source code could be shared between recipes which use ${B} to have a separate build directory compared to source directory ${S}. Issues: a) gcc uses sed and creates config files against ${S} which means the directory should not be shared. Need to change the way that works. b) Could be extended to cover eglibc except there is a patch applied against nativesdk versions which again makes the source incompatible. c) Need to clean up the layout in work-shared and make a directory level deeper to ensure patch separation. d) clean task does not remove stamps Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bitbake/lib/bb/runqueue.py') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 3db083b261..cb9e462869 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -105,6 +105,11 @@ class RunQueueScheduler(object): if self.rq.runq_running[taskid] == 1: continue if self.rq.runq_buildable[taskid] == 1: + fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[taskid]] + taskname = self.rqdata.runq_task[taskid] + stamp = bb.build.stampfile(taskname, self.rqdata.dataCache, fn) + if stamp in self.rq.build_stamps.values(): + continue return taskid def next(self): @@ -1010,6 +1015,7 @@ class RunQueueExecute: self.runq_complete = [] self.build_pids = {} self.build_pipes = {} + self.build_stamps = {} self.failed_fnids = [] def runqueue_process_waitpid(self): @@ -1024,6 +1030,7 @@ class RunQueueExecute: del self.build_pids[result[0]] self.build_pipes[result[0]].close() del self.build_pipes[result[0]] + del self.build_stamps[result[0]] if result[1] != 0: self.task_fail(task, result[1]>>8) else: @@ -1312,6 +1319,7 @@ class RunQueueExecuteTasks(RunQueueExecute): self.build_pids[pid] = task self.build_pipes[pid] = runQueuePipe(pipein, pipeout, self.cfgData) + self.build_stamps[pid] = bb.build.stampfile(taskname, self.rqdata.dataCache, fn) self.runq_running[task] = 1 self.stats.taskActive() if self.stats.active < self.number_tasks: -- cgit v1.2.3-54-g00ecf