Bug 178203 - clang not properly sourcing headers in buildworld when WITH_CLANG_IS_CC is set
Summary: clang not properly sourcing headers in buildworld when WITH_CLANG_IS_CC is set
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-27 21:10 UTC by Enji Cooper
Modified: 2014-06-03 20:38 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2013-04-27 21:10:00 UTC
Recently decided to build a system with WITH_ICONV= support on in src.conf and it failed because it wasn't trying to pick up iconv.h from ${MAKEOBJDIRPREFIX}, but instead from the build host when building libc, which is wrong for multiple reasons.

clang needs to be fixed to pick up headers from ${MAKEOBJDIRPREFIX}.

How-To-Repeat: make buildworld -DWITH_CLANG -DWITH_CLANG_IS_CC -DWITH_ICONV
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2013-04-27 21:22:29 UTC
Which stage(s) of buildworld do you mean?  If you mean stages 1 through =
3, then this is working as designed: the initial stages use headers and =
libraries from the host system.  Stages 4 and 5 use headers from =
${WORLDTMP} (usually /usr/obj/usr/src/tmp).

To investigate your issue, can you please post a (compressed) copy of a =
log of such a buildworld session?  And try to point out where any errors =
and/or problematic compilation commands occur.

Also, exact copies of of your make.conf and src.conf are required, plus =
all command line flags and environment variables you are using for your =
buildworld session.

P.S.: WITH_CLANG has always been enabled, and WITH_CLANG_IS_CC is =
default since a few months, so there is no need to specify these =
settings explicitly anymore.
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2014-06-03 20:38:50 UTC
As pointed out in comment 1, during the first stages (1 through 3) of the build, any headers included are from the host system, as intended.  If you can provide a log that shows this not to be the case for stages after 4, please re-open this bug.