[Patch] Proposal: USE_GNU89 switch

Gabor Kovesdan gabor at FreeBSD.org
Sat May 30 14:29:58 UTC 2009


Ed Schouten escribió:
> * Gabor Kovesdan <gabor at FreeBSD.org> wrote:
>   
>> I don't think it's a good idea. This knob is completely superfluous and  
>> thus should be avoided. One can just add -std to CFLAGS from a port  
>> Makefile. Forced build are also possible without this stuff, you can set  
>> this in /etc/make.conf.
>>     
>
> So how can we be sure all C compilers implement this switch? In
> bsd.port.mk I see some traces of ICC support. Using this approach it
> would also be possible to remap certain C standards to different
> compilers.
>   
If ICC were supported I would agree with you that a general solution 
would be the best, but unfortunately ICC isn't actually supported. It's 
not a trivial task to work on ICC support because you need a license to 
do so because it is considered a derived work. I wanted to work on ICC 
support before but this was the barrier that stopped me. Probably 
netchild@ can tell you more, he has a license and he used to work on ICC 
support. As for LLVM, probably it won't work out for the whole ports 
tree. I don't know what's the portmgr opinion on this, if we start to 
use LLVM in Ports Collection, we should reconsider the knob, though.
> Really, I really don't care how it's done, whether it's a flag or added
> to the compiler flags directly. I'm just saying adding it to CFLAGS
> directly sounds like a very bad idea. Adding it to /etc/make.conf sounds
> even worse, because it probably only confuses (autoconf) scripts that
> try to figure out a way to make the compiler speak C99.
>   
I didn't say one should add it permanently to make.conf, it was just an 
example how a forced C99 build can be done without introducing new knobs.

Cheers,

-- 
Gabor Kovesdan
FreeBSD Volunteer

EMAIL: gabor at FreeBSD.org .:|:. gabor at kovesdan.org
WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org



More information about the freebsd-ports mailing list