summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc10
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial.inc10
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc29
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc7
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers.inc6
-rw-r--r--meta/recipes-devtools/gcc/libgcc-common.inc3
-rw-r--r--meta/recipes-devtools/gcc/libgcc-initial.inc2
-rw-r--r--meta/recipes-devtools/gcc/libgcc.inc2
-rw-r--r--meta/recipes-devtools/gcc/libgfortran.inc4
9 files changed, 41 insertions, 32 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index d17ba29d1d..44e7c2891c 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -8,6 +8,16 @@ NATIVEDEPS = ""
8inherit autotools gettext texinfo 8inherit autotools gettext texinfo
9 9
10BPN = "gcc" 10BPN = "gcc"
11COMPILERINITIAL = ""
12COMPILERDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}gcc${COMPILERINITIAL}:do_gcc_stash_builddir"
13COMPILERDEP_class-nativesdk = "virtual/${TARGET_PREFIX}gcc${COMPILERINITIAL}-crosssdk:do_gcc_stash_builddir"
14
15python extract_stashed_builddir () {
16 src = d.expand("${STAGING_DIR}-components/${BUILD_ARCH}/gcc-stashed-builddir${COMPILERINITIAL}-${TARGET_SYS}")
17 dest = d.getVar("B")
18 oe.path.copyhardlinktree(src, dest)
19 staging_processfixme([src + "/fixmepath"], dest, dest, dest, d)
20}
11 21
12def get_gcc_float_setting(bb, d): 22def get_gcc_float_setting(bb, d):
13 if d.getVar('ARMPKGSFX_EABI') == "hf" and d.getVar('TRANSLATED_TARGET_ARCH') == "arm": 23 if d.getVar('ARMPKGSFX_EABI') == "hf" and d.getVar('TRANSLATED_TARGET_ARCH') == "arm":
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index d47f42e4c3..dd35681c98 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -75,14 +75,6 @@ do_install () {
75 # so we overwirte the generated include-fixed/limits.h for gcc-cross-initial 75 # so we overwirte the generated include-fixed/limits.h for gcc-cross-initial
76 # to get rid references to real limits.h 76 # to get rid references to real limits.h
77 cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include/limits.h 77 cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include/limits.h
78
79 # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
80 case ${PN} in
81 *gcc-cross-initial-${TARGET_ARCH}|*gcc-crosssdk-initial-${SDK_SYS})
82 dest=${D}/${includedir}/gcc-build-internal-initial-${TARGET_SYS}
83 hardlinkdir . $dest
84 ;;
85 esac
86} 78}
87# 79#
88# Override the default sysroot staging copy since this won't look like a target system 80# Override the default sysroot staging copy since this won't look like a target system
@@ -99,3 +91,5 @@ do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}/
99do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR}-components/${PACKAGE_ARCH}/${PN}" 91do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR}-components/${PACKAGE_ARCH}/${PN}"
100 92
101inherit nopackages 93inherit nopackages
94
95COMPILERINITIAL = "-initial"
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index c4f7084ba0..f3ae4fe6b1 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -185,21 +185,28 @@ do_install () {
185 # We use libiberty from binutils 185 # We use libiberty from binutils
186 find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f 186 find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f
187 find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f 187 find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f
188
189 # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
190 case ${PN} in
191 *gcc-cross-${TARGET_ARCH}|*gcc-crosssdk-${SDK_SYS})
192 dest=${D}/${includedir}/gcc-build-internal-${TARGET_SYS}
193 hardlinkdir . $dest
194 ;;
195 esac
196} 188}
197# This is reflected in the recipe name and target gcc shouldn't depend
198# on SDK settings either
199do_install[vardepsexclude] += "SDK_SYS"
200 189
201do_package[noexec] = "1" 190do_package[noexec] = "1"
202do_packagedata[noexec] = "1" 191do_packagedata[noexec] = "1"
203do_package_write_ipk[noexec] = "1" 192do_package_write_ipk[noexec] = "1"
204do_package_write_rpm[noexec] = "1" 193do_package_write_rpm[noexec] = "1"
205do_package_write_deb[noexec] = "1" 194do_package_write_deb[noexec] = "1"
195
196BUILDDIRSTASH = "${WORKDIR}/stashed-builddir"
197do_gcc_stash_builddir[dirs] = "${B}"
198do_gcc_stash_builddir[cleandirs] = "${BUILDDIRSTASH}"
199do_gcc_stash_builddir () {
200 dest=${BUILDDIRSTASH}
201 hardlinkdir . $dest
202}
203addtask do_gcc_stash_builddir after do_compile
204SSTATETASKS += "do_gcc_stash_builddir"
205do_gcc_stash_builddir[sstate-inputdirs] = "${BUILDDIRSTASH}"
206do_gcc_stash_builddir[sstate-outputdirs] = "${STAGING_DIR}-components/${BUILD_ARCH}/gcc-stashed-builddir${COMPILERINITIAL}-${TARGET_SYS}"
207do_gcc_stash_builddir[sstate-fixmedir] = "${STAGING_DIR}-components/${BUILD_ARCH}/gcc-stashed-builddir${COMPILERINITIAL}-${TARGET_SYS}"
208
209python do_gcc_stash_builddir_setscene () {
210 sstate_setscene(d)
211}
212addtask do_gcc_stash_builddir_setscene
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index d56f82ac8d..00856ad8bc 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -32,9 +32,8 @@ RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \
32 32
33do_configure () { 33do_configure () {
34 export CXX="${CXX} -nostdinc++ -nostdlib++" 34 export CXX="${CXX} -nostdinc++ -nostdlib++"
35 mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 35 target=${TARGET_SYS}
36 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 36
37 hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
38 for d in libgcc ${RUNTIMETARGET}; do 37 for d in libgcc ${RUNTIMETARGET}; do
39 echo "Configuring $d" 38 echo "Configuring $d"
40 rm -rf ${B}/$target/$d/ 39 rm -rf ${B}/$target/$d/
@@ -45,6 +44,8 @@ do_configure () {
45 $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} 44 $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
46 done 45 done
47} 46}
47EXTRACONFFUNCS += "extract_stashed_builddir"
48do_configure[depends] += "${COMPILERDEP}"
48 49
49do_compile () { 50do_compile () {
50 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 51 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index df4e297a48..ae3afe00b3 100644
--- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -12,11 +12,7 @@ EXTRA_OECONF_PATHS = "\
12" 12"
13 13
14do_configure () { 14do_configure () {
15 mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
16 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 15 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
17 if [ -d ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ]; then
18 hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
19 fi
20 16
21 echo "Configuring libsanitizer" 17 echo "Configuring libsanitizer"
22 rm -rf ${B}/$target/libsanitizer/ 18 rm -rf ${B}/$target/libsanitizer/
@@ -31,6 +27,8 @@ do_configure () {
31 # Link to the sysroot's libstdc++ instead of one gcc thinks it just built 27 # Link to the sysroot's libstdc++ instead of one gcc thinks it just built
32 sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/$target/libsanitizer/*/Makefile 28 sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/$target/libsanitizer/*/Makefile
33} 29}
30EXTRACONFFUNCS += "extract_stashed_builddir"
31do_configure[depends] += "${COMPILERDEP}"
34 32
35do_compile () { 33do_compile () {
36 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 34 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
index 7a3b4106a8..c0efc29437 100644
--- a/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -7,7 +7,6 @@ INHIBIT_DEFAULT_DEPS = "1"
7do_configure () { 7do_configure () {
8 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 8 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
9 install -d ${D}${base_libdir} ${D}${libdir} 9 install -d ${D}${base_libdir} ${D}${libdir}
10 hardlinkdir ${STAGING_INCDIR_NATIVE}/${LIBGCCBUILDTREENAME}$target/ ${B}
11 mkdir -p ${B}/${BPN} 10 mkdir -p ${B}/${BPN}
12 mkdir -p ${B}/$target/${BPN}/ 11 mkdir -p ${B}/$target/${BPN}/
13 cd ${B}/${BPN} 12 cd ${B}/${BPN}
@@ -15,6 +14,8 @@ do_configure () {
15 relpath=${@os.path.relpath("${S}/${BPN}", "${B}/${BPN}")} 14 relpath=${@os.path.relpath("${S}/${BPN}", "${B}/${BPN}")}
16 $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} 15 $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
17} 16}
17EXTRACONFFUNCS += "extract_stashed_builddir"
18do_configure[depends] += "${COMPILERDEP}"
18 19
19do_compile () { 20do_compile () {
20 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 21 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
diff --git a/meta/recipes-devtools/gcc/libgcc-initial.inc b/meta/recipes-devtools/gcc/libgcc-initial.inc
index aa32185ec0..5b4bc3b5a9 100644
--- a/meta/recipes-devtools/gcc/libgcc-initial.inc
+++ b/meta/recipes-devtools/gcc/libgcc-initial.inc
@@ -12,6 +12,6 @@ PACKAGES = ""
12 12
13EXTRA_OECONF += "--disable-shared" 13EXTRA_OECONF += "--disable-shared"
14 14
15LIBGCCBUILDTREENAME = "gcc-build-internal-initial-" 15COMPILERINITIAL = "-initial"
16 16
17inherit nopackages 17inherit nopackages
diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
index 4770394c42..38d1643a9c 100644
--- a/meta/recipes-devtools/gcc/libgcc.inc
+++ b/meta/recipes-devtools/gcc/libgcc.inc
@@ -33,8 +33,6 @@ FILES_${PN}-dev = "\
33 ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \ 33 ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
34" 34"
35 35
36LIBGCCBUILDTREENAME = "gcc-build-internal-"
37
38do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata" 36do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
39do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata" 37do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
40do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata" 38do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
diff --git a/meta/recipes-devtools/gcc/libgfortran.inc b/meta/recipes-devtools/gcc/libgfortran.inc
index 194363543e..d3e2b411c8 100644
--- a/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/meta/recipes-devtools/gcc/libgfortran.inc
@@ -6,9 +6,7 @@ EXTRA_OECONF_PATHS = "\
6" 6"
7 7
8do_configure () { 8do_configure () {
9 mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
10 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 9 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
11 hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
12 10
13 echo "Configuring libgfortran" 11 echo "Configuring libgfortran"
14 rm -rf ${B}/$target/libgfortran/ 12 rm -rf ${B}/$target/libgfortran/
@@ -21,6 +19,8 @@ do_configure () {
21 # broken libtool here 19 # broken libtool here
22 sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libgfortran/libtool 20 sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libgfortran/libtool
23} 21}
22EXTRACONFFUNCS += "extract_stashed_builddir"
23do_configure[depends] += "${COMPILERDEP}"
24 24
25do_compile () { 25do_compile () {
26 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 26 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`