diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-common.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-common.inc | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc index 5ac82b1b57..8d95698743 100644 --- a/meta/recipes-devtools/gcc/gcc-common.inc +++ b/meta/recipes-devtools/gcc/gcc-common.inc | |||
@@ -11,7 +11,8 @@ CVE_PRODUCT = "gcc" | |||
11 | inherit autotools gettext texinfo | 11 | inherit autotools gettext texinfo |
12 | 12 | ||
13 | BPN = "gcc" | 13 | BPN = "gcc" |
14 | COMPILERDEP = "virtual/${TARGET_PREFIX}gcc:do_gcc_stash_builddir" | 14 | COMPILERDEP = "${MLPREFIX}gcc-cross-${TARGET_ARCH}:do_gcc_stash_builddir" |
15 | COMPILERDEP:class-nativesdk = "gcc-crosssdk-${SDK_SYS}:do_gcc_stash_builddir" | ||
15 | 16 | ||
16 | python extract_stashed_builddir () { | 17 | python extract_stashed_builddir () { |
17 | src = d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}") | 18 | src = d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}") |
@@ -103,7 +104,8 @@ MIRRORS =+ "\ | |||
103 | gcclibdir = "${libdir}/gcc" | 104 | gcclibdir = "${libdir}/gcc" |
104 | BINV = "${PV}" | 105 | BINV = "${PV}" |
105 | #S = "${WORKDIR}/gcc-${PV}" | 106 | #S = "${WORKDIR}/gcc-${PV}" |
106 | S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" | 107 | UNPACKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/sources" |
108 | S = "${UNPACKDIR}/gcc-${PV}" | ||
107 | 109 | ||
108 | B ?= "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" | 110 | B ?= "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" |
109 | 111 | ||
@@ -116,3 +118,29 @@ target_prefix ?= "${prefix}" | |||
116 | # The real WORKDIR location isn't a dependency for the shared workdir. | 118 | # The real WORKDIR location isn't a dependency for the shared workdir. |
117 | src_patches[vardepsexclude] = "WORKDIR" | 119 | src_patches[vardepsexclude] = "WORKDIR" |
118 | should_apply[vardepsexclude] += "PN" | 120 | should_apply[vardepsexclude] += "PN" |
121 | |||
122 | remove_sysroot_paths_from_configargs () { | ||
123 | replacement=${1} | ||
124 | # Prevent sysroot path from being used in configargs.h header, as it will | ||
125 | # be rewritten when used by other sysroots preventing support for gcc | ||
126 | # plugins. Additionally the path is embeddeded into the output binary, this | ||
127 | # prevents building a reproducible binary. | ||
128 | oe_runmake configure-gcc | ||
129 | sed -i "s@${STAGING_DIR_TARGET}@$replacement@g" ${B}/gcc/configargs.h | ||
130 | sed -i "s@${STAGING_DIR_HOST}@/$replacement@g" ${B}/gcc/configargs.h | ||
131 | } | ||
132 | |||
133 | remove_sysroot_paths_from_checksum_options () { | ||
134 | stagingdir=${1} | ||
135 | replacement=${2} | ||
136 | # Prevent sysroot/workdir paths from being used in checksum-options. | ||
137 | # checksum-options is used to generate a checksum which is embedded into | ||
138 | # the output binary. | ||
139 | oe_runmake TARGET-gcc=checksum-options all-gcc | ||
140 | sed -i "s@${DEBUG_PREFIX_MAP}@@g" ${B}/gcc/checksum-options | ||
141 | sed -i "s@$stagingdir@$replacement@g" ${B}/gcc/checksum-options | ||
142 | } | ||
143 | |||
144 | cleanup_installed_include_fixed () { | ||
145 | find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f | ||
146 | } | ||