Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2013 17:39:15 -0800
From:      "Simon J. Gerraty" <sjg@juniper.net>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: [RFC] external compiler support
Message-ID:  <20130228013915.DF81E58096@chaos.jnpr.net>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130228013915.DF81E58096>