diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-target.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-target.inc | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc index 7dac3ef422..08141f32e6 100644 --- a/meta/recipes-devtools/gcc/gcc-target.inc +++ b/meta/recipes-devtools/gcc/gcc-target.inc | |||
@@ -140,20 +140,8 @@ FILES:${PN}-doc = "\ | |||
140 | " | 140 | " |
141 | 141 | ||
142 | do_compile () { | 142 | do_compile () { |
143 | # Prevent full target sysroot path from being used in configargs.h header, | 143 | remove_sysroot_paths_from_configargs '/' |
144 | # as it will be rewritten when used by other sysroots preventing support | 144 | remove_sysroot_paths_from_checksum_options '${STAGING_DIR_TARGET}' '/' |
145 | # for gcc plugins. Additionally the path is embeddeded into the output | ||
146 | # binary, this prevents building a reproducible binary. | ||
147 | oe_runmake configure-gcc | ||
148 | sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h | ||
149 | sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h | ||
150 | |||
151 | # Prevent sysroot/workdir paths from being used in checksum-options. | ||
152 | # checksum-options is used to generate a checksum which is embedded into | ||
153 | # the output binary. | ||
154 | oe_runmake TARGET-gcc=checksum-options all-gcc | ||
155 | sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options | ||
156 | sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options | ||
157 | 145 | ||
158 | oe_runmake all-host | 146 | oe_runmake all-host |
159 | } | 147 | } |
@@ -218,37 +206,8 @@ do_install () { | |||
218 | install -d ${D}${libdir}/bfd-plugins | 206 | install -d ${D}${libdir}/bfd-plugins |
219 | ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so | 207 | ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so |
220 | chown -R root:root ${D} | 208 | chown -R root:root ${D} |
221 | } | ||
222 | 209 | ||
223 | do_install:append () { | 210 | cleanup_installed_include_fixed |
224 | # | ||
225 | # Thefixinc.sh script, run on the gcc's compile phase, looks into sysroot header | ||
226 | # files and places the modified files into | ||
227 | # {D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed folder. This makes the | ||
228 | # build not deterministic. The following code prunes all those headers | ||
229 | # except those under include-fixed/linux, *limits.h and README, yielding | ||
230 | # the same include-fixed folders no matter what sysroot | ||
231 | |||
232 | include_fixed="${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed" | ||
233 | for f in $(find ${include_fixed} -type f); do | ||
234 | case $f in | ||
235 | */include-fixed/linux/*) | ||
236 | continue | ||
237 | ;; | ||
238 | */include-fixed/*limits.h) | ||
239 | continue | ||
240 | ;; | ||
241 | */include-fixed/README) | ||
242 | continue | ||
243 | ;; | ||
244 | *) | ||
245 | # remove file and directory if empty | ||
246 | bbdebug 2 "Pruning $f" | ||
247 | rm $f | ||
248 | find $(dirname $f) -maxdepth 0 -empty -exec rmdir {} \; | ||
249 | ;; | ||
250 | esac | ||
251 | done | ||
252 | } | 211 | } |
253 | 212 | ||
254 | # Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross | 213 | # Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross |