From nobody@FreeBSD.org  Sat Apr 27 20:04:10 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 37F6DB71
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Apr 2013 20:04:10 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 29A701760
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Apr 2013 20:04:10 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r3RK49p6091508
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Apr 2013 20:04:09 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r3RK49FA091507;
	Sat, 27 Apr 2013 20:04:09 GMT
	(envelope-from nobody)
Message-Id: <201304272004.r3RK49FA091507@red.freebsd.org>
Date: Sat, 27 Apr 2013 20:04:09 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: clang not properly sourcing headers in buildworld when WITH_CLANG_IS_CC is set
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         178203
>Category:       bin
>Synopsis:       clang not properly sourcing headers in buildworld when WITH_CLANG_IS_CC is set
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 27 20:10:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sat Apr 27 20:30:00 UTC 2013
>Originator:     Garrett Cooper
>Release:        10-CURRENT
>Organization:
EMC Isilon
>Environment:
FreeBSD fuji-current.local 10.0-CURRENT FreeBSD 10.0-CURRENT #1 r+eabe039: Wed Apr 24 09:56:41 PDT 2013     root@fuji-current.local:/usr/obj/usr/src/sys/FUJI  i386
>Description:
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
>Fix:


>Release-Note:
>Audit-Trail:

From: Dimitry Andric <dim@FreeBSD.org>
To: bug-followup@FreeBSD.org,
 yaneurabeya@gmail.com
Cc:  
Subject: Re: bin/178203: clang not properly sourcing headers in buildworld when WITH_CLANG_IS_CC is set
Date: Sat, 27 Apr 2013 22:22:29 +0200

 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.
 
>Unformatted:
