summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2015-07-01 12:57:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-04 16:23:51 +0100
commit1efd172dd89d13e10269c13d9ed8bb1c7f7ea2f0 (patch)
tree9d181656b49844e0d854d92152a4aeed6db27532 /meta/recipes-devtools
parent2b6218d4492d34a2c570172f1c8ea0310a8fa958 (diff)
downloadpoky-1efd172dd89d13e10269c13d9ed8bb1c7f7ea2f0.tar.gz
gcc-target.inc: Remove non-related gcc headers from include_fixed folder
Without this patch, the D's include_fixed folder may change after building it (due to the gcc's fixinc.sh script, executed on the do_compile task) and changes depend on the current sysroot headers, making the gcc's builds non-deterministic. [YOCTO #7882] (From OE-Core rev: e0af4b2c8f8e29ac6f8eccef401c7c004355359d) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc-target.inc31
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
176do_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).