On Thu, Jul 06, 2006 at 02:21:43PM +0200, Diego 'Flameeyes' Pettenò wrote:
> On Thursday 06 July 2006 13:58, Donnie Berkholz wrote:
> > Well, there are enough in the tree
> There are ebuilds for non-gcc compilers. There's no support in using them for 
> anything like building stuff. Let's think to all the append-flags there are 
> in the tree.

`append-flags $(test-flags ...)` can be used instead, if the options are
gcc-specific, and I have done that myself in a case where every
supported GCC version supported the specific option. (-fpermissive was
the one.)

> This is not going to make the support any less working. There's 
> no project maintaining support for icc and the like.

When the answer is "make icc not suck" even when it is capable of
compiling mostly any package if the portage tree would not assume gcc,
that's not going to happen. First, alternative compilers must be
accepted (even when not supported) by package maintainers, and only then
might they ever become supported.

> > that you should at least make sure 
> > they don't completely break and error out when passing them invalid
> > flags, 
> Uhm, If you look at the function itself you can see that I drop the stderr 
> output and I just care about the other part. The flags used are the ones set 
> by the user with the exclusion of -E -dM that are, afaik, standard unix 
> compiler options like -c and -o..

-E is a standard unix compiler option. -dM isn't. What you could do
instead is `$(tc-getCC) ${CFLAGS} -E - >/dev/null 2>&1 <<EOF
#if !($macro)
#error
#endif
EOF` and check $CC's return value. If $macro is not defined, or is
defined to something like 0, preprocessing won't succeed, and $CC will
return nonzero.

> if the compiler does not support those, 
> it's unlikely it can actually do anything useful in Gentoo.
> And anyway it cannot "break", it will just report that no extensions are 
> available.

That's sane behaviour regardless. :)
-- 
gentoo-dev@gentoo.org mailing list

Reply via email to