blob: 224b7778efdb663dd614b81c02149e4430f32866 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001deltask do_configure
2deltask do_compile
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003deltask do_install
4deltask do_populate_sysroot
5deltask do_populate_lic
Brad Bishop6e60e8b2018-02-01 10:27:11 -05006RM_WORK_EXCLUDE += "${PN}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05008inherit nopackages
9
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010PN = "gcc-source-${PV}"
11WORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
12SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
13
14STAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}"
15STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-${PV}-*"
16
17INHIBIT_DEFAULT_DEPS = "1"
18DEPENDS = ""
19PACKAGES = ""
20
Andrew Geissler615f2f12022-07-15 14:00:58 -050021B = "${WORKDIR}/build"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022
23# This needs to be Python to avoid lots of shell variables becoming dependencies.
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024python do_preconfigure () {
25 import subprocess
26 cmd = d.expand('cd ${S} && PATH=${PATH} gnu-configize')
27 subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
28 # See 0044-gengtypes.patch, we need to regenerate this file
29 bb.utils.remove(d.expand("${S}/gcc/gengtype-lex.c"))
30 cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure")
31 subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050032
33 # Easiest way to stop bad RPATHs getting into the library since we have a
34 # broken libtool here (breaks cross-canadian and target at least)
35 cmd = d.expand("sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${S}/libcc1/configure")
36 subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037}
38addtask do_preconfigure after do_patch
39do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"
40