From owner-freebsd-arch@FreeBSD.ORG Thu Feb 28 01:39:41 2013 Return-Path: Delivered-To: freebsd-arch@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 EDBD3CD5; Thu, 28 Feb 2013 01:39:41 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og118.obsmtp.com (exprod7og118.obsmtp.com [64.18.2.8]) by mx1.freebsd.org (Postfix) with ESMTP id 8533580; Thu, 28 Feb 2013 01:39:41 +0000 (UTC) Received: from P-EMHUB02-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob118.postini.com ([64.18.6.12]) with SMTP ID DSNKUS61V+jIljENLcAEIqK5NJCzPU/xzgqP@postini.com; Wed, 27 Feb 2013 17:39:41 PST Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB02-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Wed, 27 Feb 2013 17:39:17 -0800 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id r1S1dG323309; Wed, 27 Feb 2013 17:39:16 -0800 (PST) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id DF81E58096; Wed, 27 Feb 2013 17:39:15 -0800 (PST) To: Brooks Davis Subject: Re: [RFC] external compiler support In-Reply-To: <20130227235952.GE19594@lor.one-eyed-alien.net> References: <20130227003517.GB7348@lor.one-eyed-alien.net> <28404C12-67F3-44F0-AB28-02B749472873@bsdimp.com> <51BB3E17-128A-4989-B272-D8B40D4B854B@bsdimp.com> <20130227175006.A604A58096@chaos.jnpr.net> <20130227195807.GA19255@lor.one-eyed-alien.net> <20130227202822.8F53B58096@chaos.jnpr.net> <20130227220520.GB19594@lor.one-eyed-alien.net> <20130227232632.74C2F58096@chaos.jnpr.net> <20130227235952.GE19594@lor.one-eyed-alien.net> Comments: In-reply-to: Brooks Davis message dated "Wed, 27 Feb 2013 17:59:52 -0600." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Wed, 27 Feb 2013 17:39:15 -0800 Message-ID: <20130228013915.DF81E58096@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 01:39:42 -0000 On Wed, 27 Feb 2013 17:59:52 -0600, Brooks Davis writes: >I'm not arguing against the proposed indirection at all. The long term >benefits are quite clear, it just doesn't do me much good in the current >world order. Ah - understood. >> CFLAGS_LAST.clang +=3D -isystem ${STAGE_OBJTOP}/usr/include/clang/3.2 >> CXXFLAGS_LAST +=3D ${CFLAGS_LAST.${COMPILER_TYPE}} > >Hmm, I've not had to do that, but it seems likely that similar things >could be required. I was even more suprised to find that clang needed -isystem ${STAGE_OBJTOP}/usr/include/c++/${GCCVER:U4.2} .meta files are great for finding out what the compiler is really doing ;-) Of course all these -isystem's are needed because I use -nostdinc to avoid accidentally pulling headers from /usr/include. With sysroot support that wouldn't be necessary. >I think remember the issue now. The problem was that I was setting a >variable (SYSROOT) that would cause additions to CFLAGS. Because the >crunch environment is set by crunchgen I wasn't able to figure out a good looks like crunchgen uses 'env MAKEOBJDIRPREFIX=$(MAKEOBJDIRPREFIX) $(MAKE)' not env -i, so if you export SYSROOT it should be seen. >An example of a problem boot related Makefile is >sys/boot/i386/gptboot/Makefile. Yep, and this is where CFLAGS_LAST comes in handy with CFLAGS+= ${CFLAGS_LAST} in bsd.init.mk or bsd.sys.mk