2014-11-25 17:58:10 +00:00
|
|
|
deltask do_configure
|
|
|
|
deltask do_compile
|
|
|
|
deltask do_install
|
|
|
|
deltask do_populate_sysroot
|
|
|
|
deltask do_populate_lic
|
|
|
|
deltask do_rm_work
|
|
|
|
|
2015-12-10 22:50:56 +00:00
|
|
|
inherit nopackages
|
|
|
|
|
2015-04-29 09:35:00 +00:00
|
|
|
PN = "gcc-source-${PV}"
|
2014-11-25 17:58:10 +00:00
|
|
|
WORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
|
|
|
|
SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
|
|
|
|
|
|
|
|
STAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}"
|
gcc-source.inc: fix STAMPCLEAN to avoid race issue
Fixed race issue when build more than one gcc-source and inherit
rm_work, for example:
$ bitbake gcc-source-4.9.2 gcc-source-5.1.0
File "/path/to/bitbake/lib/bb/build.py", line 512, in exec_task
return _exec_task(fn, task, d, quieterr)
File "/path/to/bitbake/lib/bb/build.py", line 489, in _exec_task
make_stamp(task, localdata)
File "/path/to/bitbake/lib/bb/build.py", line 599, in make_stamp
os.unlink(name)
OSError: [Errno 2] No such file or directory: '/path/to/tmp/stamps/work-shared/gcc-4.9.2-r0.do_rm_work_all.02cf1ed9b79d4edb0a51d3b913b7f9ba'
This is because make_stamp() uses glob.glob() to remove the old stamps
before create the new one, when gcc-source-5.1.0 removes gcc-4.9.2-r0's
stamp, we may get the error.
We can't use deltask do_rm_work_all as do_rm_work since it is a
recrdeptask, otherwise:
ERROR: Command execution failed: Traceback (most recent call last):
File "/path/to/bitbake/lib/bb/command.py", line 102, in runAsyncCommand
commandmethod(self.cmds_async, self, options)
File "/path/to/bitbake/lib/bb/command.py", line 324, in generateDotGraph
command.cooker.generateDotGraphFiles(pkgs_to_build, task)
File "/path/to/bitbake/lib/bb/cooker.py", line 847, in generateDotGraphFiles
depgraph = self.generateTaskDepTreeData(pkgs_to_build, task)
File "/path/to/bitbake/lib/bb/cooker.py", line 672, in generateTaskDepTreeData
rq.rqdata.prepare()
File "/path/to/bitbake/lib/bb/runqueue.py", line 587, in prepare
generate_recdeps(dep)
File "/path/to/bitbake/lib/bb/runqueue.py", line 575, in generate_recdeps
add_resolved_dependencies([taskData.tasks_fnid[t]], tasknames, newdeps)
TypeError: list indices must be integers, not NoneType
Update STAMPCLEAN to contain ${PV} to fix the problem.
(From OE-Core rev: 9099d46a46ee511d1b7e496472c5b973e8e8feaf)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-09 09:04:46 +00:00
|
|
|
STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-${PV}-*"
|
2014-11-25 17:58:10 +00:00
|
|
|
|
|
|
|
INHIBIT_DEFAULT_DEPS = "1"
|
|
|
|
DEPENDS = ""
|
2015-03-02 11:34:48 +00:00
|
|
|
PACKAGES = ""
|
2014-11-25 17:58:10 +00:00
|
|
|
|
|
|
|
python do_preconfigure () {
|
|
|
|
import subprocess
|
2015-05-26 23:04:31 +00:00
|
|
|
cmd = d.expand('cd ${S} && PATH=${PATH} gnu-configize')
|
2014-11-25 17:58:10 +00:00
|
|
|
subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
|
|
|
|
# See 0044-gengtypes.patch, we need to regenerate this file
|
|
|
|
bb.utils.remove(d.expand("${S}/gcc/gengtype-lex.c"))
|
|
|
|
cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure")
|
|
|
|
subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
|
|
|
|
}
|
|
|
|
addtask do_preconfigure after do_patch
|
|
|
|
do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"
|
|
|
|
|