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 adcaef2b0f..69ca18bf6e 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc | |||
| @@ -174,6 +174,8 @@ do_install () { | |||
| 174 | done | 174 | done |
| 175 | done | 175 | done |
| 176 | done | 176 | done |
| 177 | |||
| 178 | cleanup_installed_include_fixed | ||
| 177 | } | 179 | } |
| 178 | 180 | ||
| 179 | ELFUTILS = "nativesdk-elfutils" | 181 | ELFUTILS = "nativesdk-elfutils" |
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index 1dbb6dc42b..9c8cc94c3a 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc | |||
| @@ -108,7 +108,7 @@ do_install () { | |||
| 108 | cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | 108 | cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ |
| 109 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | 109 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ |
| 110 | 110 | ||
| 111 | 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 | 111 | cleanup_installed_include_fixed |
| 112 | 112 | ||
| 113 | # install LTO linker plugins where binutils tools can find it | 113 | # install LTO linker plugins where binutils tools can find it |
| 114 | install -d ${D}${libdir}/bfd-plugins | 114 | 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 f51d94cd65..08141f32e6 100644 --- a/meta/recipes-devtools/gcc/gcc-target.inc +++ b/meta/recipes-devtools/gcc/gcc-target.inc | |||
| @@ -206,37 +206,8 @@ do_install () { | |||
| 206 | install -d ${D}${libdir}/bfd-plugins | 206 | install -d ${D}${libdir}/bfd-plugins |
| 207 | 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 |
| 208 | chown -R root:root ${D} | 208 | chown -R root:root ${D} |
| 209 | } | ||
| 210 | 209 | ||
| 211 | do_install:append () { | 210 | cleanup_installed_include_fixed |
| 212 | # | ||
| 213 | # Thefixinc.sh script, run on the gcc's compile phase, looks into sysroot header | ||
| 214 | # files and places the modified files into | ||
| 215 | # {D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed folder. This makes the | ||
| 216 | # build not deterministic. The following code prunes all those headers | ||
| 217 | # except those under include-fixed/linux, *limits.h and README, yielding | ||
| 218 | # the same include-fixed folders no matter what sysroot | ||
| 219 | |||
| 220 | include_fixed="${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed" | ||
| 221 | for f in $(find ${include_fixed} -type f); do | ||
| 222 | case $f in | ||
| 223 | */include-fixed/linux/*) | ||
| 224 | continue | ||
| 225 | ;; | ||
| 226 | */include-fixed/*limits.h) | ||
| 227 | continue | ||
| 228 | ;; | ||
| 229 | */include-fixed/README) | ||
| 230 | continue | ||
| 231 | ;; | ||
| 232 | *) | ||
| 233 | # remove file and directory if empty | ||
| 234 | bbdebug 2 "Pruning $f" | ||
| 235 | rm $f | ||
| 236 | find $(dirname $f) -maxdepth 0 -empty -exec rmdir {} \; | ||
| 237 | ;; | ||
| 238 | esac | ||
| 239 | done | ||
| 240 | } | 211 | } |
| 241 | 212 | ||
| 242 | # 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 |
