diff options
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-common.inc | 4 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-target.inc | 31 |
4 files changed, 8 insertions, 31 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc index 7f5cc109e6..01de93cc3c 100644 --- a/meta/recipes-devtools/gcc/gcc-common.inc +++ b/meta/recipes-devtools/gcc/gcc-common.inc | |||
@@ -138,3 +138,7 @@ remove_sysroot_paths_from_checksum_options () { | |||
138 | sed -i "s@${DEBUG_PREFIX_MAP}@@g" ${B}/gcc/checksum-options | 138 | sed -i "s@${DEBUG_PREFIX_MAP}@@g" ${B}/gcc/checksum-options |
139 | sed -i "s@$stagingdir@$replacement@g" ${B}/gcc/checksum-options | 139 | sed -i "s@$stagingdir@$replacement@g" ${B}/gcc/checksum-options |
140 | } | 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 | } | ||
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc index 1b183d6fc1..bbe91ad0f9 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc | |||
@@ -175,6 +175,8 @@ do_install () { | |||
175 | done | 175 | done |
176 | done | 176 | done |
177 | done | 177 | done |
178 | |||
179 | cleanup_installed_include_fixed | ||
178 | } | 180 | } |
179 | 181 | ||
180 | ELFUTILS = "nativesdk-elfutils" | 182 | ELFUTILS = "nativesdk-elfutils" |
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index 68e33c7358..f85ccd5c23 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc | |||
@@ -110,7 +110,7 @@ do_install () { | |||
110 | cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | 110 | cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ |
111 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | 111 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ |
112 | 112 | ||
113 | 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 | 113 | cleanup_installed_include_fixed |
114 | 114 | ||
115 | # install LTO linker plugins where binutils tools can find it | 115 | # install LTO linker plugins where binutils tools can find it |
116 | install -d ${D}${libdir}/bfd-plugins | 116 | install -d ${D}${libdir}/bfd-plugins |
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc index c847838ec7..6b47c10413 100644 --- a/meta/recipes-devtools/gcc/gcc-target.inc +++ b/meta/recipes-devtools/gcc/gcc-target.inc | |||
@@ -193,37 +193,8 @@ do_install () { | |||
193 | install -d ${D}${libdir}/bfd-plugins | 193 | install -d ${D}${libdir}/bfd-plugins |
194 | 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 |
195 | chown -R root:root ${D} | 195 | chown -R root:root ${D} |
196 | } | ||
197 | 196 | ||
198 | do_install:append () { | 197 | cleanup_installed_include_fixed |
199 | # | ||
200 | # Thefixinc.sh script, run on the gcc's compile phase, looks into sysroot header | ||
201 | # files and places the modified files into | ||
202 | # {D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed folder. This makes the | ||
203 | # build not deterministic. The following code prunes all those headers | ||
204 | # except those under include-fixed/linux, *limits.h and README, yielding | ||
205 | # the same include-fixed folders no matter what sysroot | ||
206 | |||
207 | include_fixed="${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed" | ||
208 | for f in $(find ${include_fixed} -type f); do | ||
209 | case $f in | ||
210 | */include-fixed/linux/*) | ||
211 | continue | ||
212 | ;; | ||
213 | */include-fixed/*limits.h) | ||
214 | continue | ||
215 | ;; | ||
216 | */include-fixed/README) | ||
217 | continue | ||
218 | ;; | ||
219 | *) | ||
220 | # remove file and directory if empty | ||
221 | bbdebug 2 "Pruning $f" | ||
222 | rm $f | ||
223 | find $(dirname $f) -maxdepth 0 -empty -exec rmdir {} \; | ||
224 | ;; | ||
225 | esac | ||
226 | done | ||
227 | } | 198 | } |
228 | 199 | ||
229 | # 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 |