#4641: ICA: gcc compilers (c++, gcc, cc1, cc1plus, ...) differ between first and
second build
--------------------+-----------------------
Reporter: bdubbs | Owner: lfs-book
Type: task | Status: new
Priority: normal | Milestone: 9.2
Component: Book | Version: SVN
Severity: normal | Resolution:
Keywords: |
--------------------+-----------------------
Comment (by bdubbs):
From pierre.labastie:
The problem is the following: the header files which are included, are not
the same in each case.
The reason is that the search directory order is not the same, because for
/tools/bin/g++, /usr/include is first, while for g++, it comes after
/usr/include/c++/9.3.0. And somehow, with this different order, one file
is included in the second case, which is not included in the first,
containing a lot of use instructions. I guess this is the reason why the
generated code is not the same (some different types used).
'''Solution''' Use -idirafter instead of -isystem in the specs file. That
puts /usr/include at the end of the search. This solves the above problem,
and headers for programs which are only in chapter 6 can be found in
/usr/include. For those which are in chapter 5 too, /tools/include will be
used instead. But this is not a problem, since those headers are the same.
--
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/4641#comment:4>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
--
http://lists.linuxfromscratch.org/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page