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 e9187fc444..6b47c10413 100644 --- a/meta/recipes-devtools/gcc/gcc-target.inc +++ b/meta/recipes-devtools/gcc/gcc-target.inc | |||
@@ -132,20 +132,8 @@ FILES:${PN}-doc = "\ | |||
132 | " | 132 | " |
133 | 133 | ||
134 | do_compile () { | 134 | do_compile () { |
135 | # Prevent full target sysroot path from being used in configargs.h header, | 135 | remove_sysroot_paths_from_configargs '/' |
136 | # as it will be rewritten when used by other sysroots preventing support | 136 | remove_sysroot_paths_from_checksum_options '${STAGING_DIR_TARGET}' '/' |
137 | # for gcc plugins. Additionally the path is embeddeded into the output | ||
138 | # binary, this prevents building a reproducible binary. | ||
139 | oe_runmake configure-gcc | ||
140 | sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h | ||
141 | sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h | ||
142 | |||
143 | # Prevent sysroot/workdir paths from being used in checksum-options. | ||
144 | # checksum-options is used to generate a checksum which is embedded into | ||
145 | # the output binary. | ||
146 | oe_runmake TARGET-gcc=checksum-options all-gcc | ||
147 | sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options | ||
148 | sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options | ||
149 | 137 | ||
150 | oe_runmake all-host | 138 | oe_runmake all-host |
151 | } | 139 | } |
@@ -205,37 +193,8 @@ do_install () { | |||
205 | install -d ${D}${libdir}/bfd-plugins | 193 | install -d ${D}${libdir}/bfd-plugins |
206 | ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so | 194 | ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so |
207 | chown -R root:root ${D} | 195 | chown -R root:root ${D} |
208 | } | ||
209 | 196 | ||
210 | do_install:append () { | 197 | cleanup_installed_include_fixed |
211 | # | ||
212 | # Thefixinc.sh script, run on the gcc's compile phase, looks into sysroot header | ||
213 | # files and places the modified files into | ||
214 | # {D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed folder. This makes the | ||
215 | # build not deterministic. The following code prunes all those headers | ||
216 | # except those under include-fixed/linux, *limits.h and README, yielding | ||
217 | # the same include-fixed folders no matter what sysroot | ||
218 | |||
219 | include_fixed="${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed" | ||
220 | for f in $(find ${include_fixed} -type f); do | ||
221 | case $f in | ||
222 | */include-fixed/linux/*) | ||
223 | continue | ||
224 | ;; | ||
225 | */include-fixed/*limits.h) | ||
226 | continue | ||
227 | ;; | ||
228 | */include-fixed/README) | ||
229 | continue | ||
230 | ;; | ||
231 | *) | ||
232 | # remove file and directory if empty | ||
233 | bbdebug 2 "Pruning $f" | ||
234 | rm $f | ||
235 | find $(dirname $f) -maxdepth 0 -empty -exec rmdir {} \; | ||
236 | ;; | ||
237 | esac | ||
238 | done | ||
239 | } | 198 | } |
240 | 199 | ||
241 | # Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross | 200 | # Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross |