xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/gcc/gcc-source.inc (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyundeltask do_configure
2*4882a593Smuzhiyundeltask do_compile
3*4882a593Smuzhiyundeltask do_install
4*4882a593Smuzhiyundeltask do_populate_sysroot
5*4882a593Smuzhiyundeltask do_populate_lic
6*4882a593SmuzhiyunRM_WORK_EXCLUDE += "${PN}"
7*4882a593Smuzhiyun
8*4882a593Smuzhiyuninherit nopackages
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunPN = "gcc-source-${PV}"
11*4882a593SmuzhiyunWORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
12*4882a593SmuzhiyunSSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunSTAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}"
15*4882a593SmuzhiyunSTAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-${PV}-*"
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunINHIBIT_DEFAULT_DEPS = "1"
18*4882a593SmuzhiyunDEPENDS = ""
19*4882a593SmuzhiyunPACKAGES = ""
20*4882a593SmuzhiyunTARGET_ARCH = "allarch"
21*4882a593SmuzhiyunTARGET_AS_ARCH = "none"
22*4882a593SmuzhiyunTARGET_CC_ARCH = "none"
23*4882a593SmuzhiyunTARGET_LD_ARCH = "none"
24*4882a593SmuzhiyunTARGET_OS = "linux"
25*4882a593Smuzhiyunbaselib = "lib"
26*4882a593SmuzhiyunPACKAGE_ARCH = "all"
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunB = "${WORKDIR}/build"
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun# This needs to be Python to avoid lots of shell variables becoming dependencies.
31*4882a593Smuzhiyunpython do_preconfigure () {
32*4882a593Smuzhiyun    import subprocess
33*4882a593Smuzhiyun    cmd = d.expand('cd ${S} && PATH=${PATH} gnu-configize')
34*4882a593Smuzhiyun    subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
35*4882a593Smuzhiyun    cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure")
36*4882a593Smuzhiyun    subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun    # Easiest way to stop bad RPATHs getting into the library since we have a
39*4882a593Smuzhiyun    # broken libtool here (breaks cross-canadian and target at least)
40*4882a593Smuzhiyun    cmd = d.expand("sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${S}/libcc1/configure")
41*4882a593Smuzhiyun    subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
42*4882a593Smuzhiyun}
43*4882a593Smuzhiyunaddtask do_preconfigure after do_patch
44*4882a593Smuzhiyundo_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"
45*4882a593Smuzhiyun
46