[RFC] external compiler support
Simon J. Gerraty
sjg at juniper.net
Thu Feb 28 01:39:42 UTC 2013
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
More information about the freebsd-arch
mailing list