diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-common.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-common.inc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc index 5ac82b1b57..01de93cc3c 100644 --- a/meta/recipes-devtools/gcc/gcc-common.inc +++ b/meta/recipes-devtools/gcc/gcc-common.inc | |||
@@ -116,3 +116,29 @@ target_prefix ?= "${prefix}" | |||
116 | # The real WORKDIR location isn't a dependency for the shared workdir. | 116 | # The real WORKDIR location isn't a dependency for the shared workdir. |
117 | src_patches[vardepsexclude] = "WORKDIR" | 117 | src_patches[vardepsexclude] = "WORKDIR" |
118 | should_apply[vardepsexclude] += "PN" | 118 | should_apply[vardepsexclude] += "PN" |
119 | |||
120 | remove_sysroot_paths_from_configargs () { | ||
121 | replacement=${1} | ||
122 | # Prevent sysroot path from being used in configargs.h header, as it will | ||
123 | # be rewritten when used by other sysroots preventing support for gcc | ||
124 | # plugins. Additionally the path is embeddeded into the output binary, this | ||
125 | # prevents building a reproducible binary. | ||
126 | oe_runmake configure-gcc | ||
127 | sed -i "s@${STAGING_DIR_TARGET}@$replacement@g" ${B}/gcc/configargs.h | ||
128 | sed -i "s@${STAGING_DIR_HOST}@/$replacement@g" ${B}/gcc/configargs.h | ||
129 | } | ||
130 | |||
131 | remove_sysroot_paths_from_checksum_options () { | ||
132 | stagingdir=${1} | ||
133 | replacement=${2} | ||
134 | # Prevent sysroot/workdir paths from being used in checksum-options. | ||
135 | # checksum-options is used to generate a checksum which is embedded into | ||
136 | # the output binary. | ||
137 | oe_runmake TARGET-gcc=checksum-options all-gcc | ||
138 | sed -i "s@${DEBUG_PREFIX_MAP}@@g" ${B}/gcc/checksum-options | ||
139 | sed -i "s@$stagingdir@$replacement@g" ${B}/gcc/checksum-options | ||
140 | } | ||
141 | |||
142 | cleanup_installed_include_fixed () { | ||
143 | 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 | ||
144 | } | ||