diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-28 15:09:50 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-28 15:09:50 +0100 |
commit | 12b163dbd81cafafec1ebe3c4039c65af60ee261 (patch) | |
tree | bb4b0aed62393b27c05d2a977b256be67c42be58 /bitbake/lib | |
parent | afd28598368963dc49bfd02ef2d6f54218d663ae (diff) | |
download | ast2050-yocto-poky-12b163dbd81cafafec1ebe3c4039c65af60ee261.zip ast2050-yocto-poky-12b163dbd81cafafec1ebe3c4039c65af60ee261.tar.gz |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/build.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/cache.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 8 |
3 files changed, 14 insertions, 2 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 83a378f..19a9ba1 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -382,10 +382,10 @@ def stamp_internal(taskname, d, file_name): taskflagname = taskname.replace("_setscene", "") if file_name: - stamp = d.stamp[file_name] + stamp = d.stamp_base[file_name].get(taskflagname) or d.stamp[file_name] extrainfo = d.stamp_extrainfo[file_name].get(taskflagname) or "" else: - stamp = d.getVar('STAMP', True) + stamp = d.getVarFlag(taskflagname, 'stamp-base', True) or d.getVar('STAMP', True) file_name = d.getVar('BB_FILENAME', True) extrainfo = d.getVarFlag(taskflagname, 'stamp-extra-info', True) or "" diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index c56b4b4..4e76857 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -55,6 +55,7 @@ recipe_fields = ( 'provides', 'task_deps', 'stamp', + 'stamp_base', 'stamp_extrainfo', 'broken', 'not_world', @@ -160,6 +161,7 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)): broken = cls.getvar('BROKEN', metadata), not_world = cls.getvar('EXCLUDE_FROM_WORLD', metadata), stamp = cls.getvar('STAMP', metadata), + stamp_base = cls.flaglist('stamp-base', tasks, metadata), stamp_extrainfo = cls.flaglist('stamp-extra-info', tasks, metadata), packages_dynamic = cls.listvar('PACKAGES_DYNAMIC', metadata), depends = cls.depvar('DEPENDS', metadata), @@ -579,6 +581,7 @@ class CacheData(object): self.task_queues = {} self.task_deps = {} self.stamp = {} + self.stamp_base = {} self.stamp_extrainfo = {} self.preferred = {} self.tasks = {} @@ -604,6 +607,7 @@ class CacheData(object): self.pkg_pepvpr[fn] = (info.pe, info.pv, info.pr) self.pkg_dp[fn] = info.defaultpref self.stamp[fn] = info.stamp + self.stamp_base[fn] = info.stamp_base self.stamp_extrainfo[fn] = info.stamp_extrainfo provides = [info.pn] diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 3db083b..cb9e462 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: |