diff options
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-target.inc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc index c362a0f6b9..6e160c0d1c 100644 --- a/meta/recipes-devtools/gcc/gcc-target.inc +++ b/meta/recipes-devtools/gcc/gcc-target.inc | |||
| @@ -173,6 +173,37 @@ do_install () { | |||
| 173 | chown -R root:root ${D} | 173 | chown -R root:root ${D} |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | do_install_append () { | ||
| 177 | # | ||
| 178 | # Thefixinc.sh script, run on the gcc's compile phase, looks into sysroot header | ||
| 179 | # files and places the modified files into | ||
| 180 | # {D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed folder. This makes the | ||
| 181 | # build not deterministic. The following code prunes all those headers | ||
| 182 | # except those under include-fixed/linux, *limits.h and README, yielding | ||
| 183 | # the same include-fixed folders no matter what sysroot | ||
| 184 | |||
| 185 | include_fixed="${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed" | ||
| 186 | for f in $(find ${include_fixed} -type f); do | ||
| 187 | case $f in | ||
| 188 | */include-fixed/linux/*) | ||
| 189 | continue | ||
| 190 | ;; | ||
| 191 | */include-fixed/*limits.h) | ||
| 192 | continue | ||
| 193 | ;; | ||
| 194 | */include-fixed/README) | ||
| 195 | continue | ||
| 196 | ;; | ||
| 197 | *) | ||
| 198 | # remove file and directory if empty | ||
| 199 | bbdebug 2 "Pruning $f" | ||
| 200 | rm $f | ||
| 201 | find $(dirname $f) -maxdepth 0 -empty -exec rmdir {} \; | ||
| 202 | ;; | ||
| 203 | esac | ||
| 204 | done | ||
| 205 | } | ||
| 206 | |||
| 176 | # Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross | 207 | # Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross |
| 177 | # and one from here. These can confuse gcc cross where includes use #include_next | 208 | # and one from here. These can confuse gcc cross where includes use #include_next |
| 178 | # and builds track file dependencies (e.g. perl and its makedepends code). | 209 | # and builds track file dependencies (e.g. perl and its makedepends code). |
