Re: Proposal: USE_GNU89 switch

2009-06-04 Thread Gerald Pfeifer
Hi Ed et al, On Fri, 29 May 2009, Ed Schouten wrote: > I've been looking through /usr/ports/Mk. I suspect such a switch should > be added to bsd.gcc.mk? I'm sending this message to gerald@ as well, > because I've been told he is the maintainer of various GCC related bits. I noticed a patch for

Re: [Patch] Proposal: USE_GNU89 switch

2009-05-30 Thread Mark Linimon
On Sat, May 30, 2009 at 11:01:38AM -0400, Diane Bruce wrote: > By the time FreeBSD-9 is released clang support will be solid and all > ports will compile with clang as well as gcc. ooh, can I have unicorns, too? :-) Seriously, I'd like to see the potential to throw the switch, with the caveat tha

Re: [Patch] Proposal: USE_GNU89 switch

2009-05-30 Thread Ed Schouten
* Mel Flynn wrote: > Are there any edge cases of (antiquated) ports that (indirectly) use > bsd.sys.mk and as such get hit by: > 11 # the default is gnu99 for now > 12 CSTD?= gnu99 > > In other words should one clean CFLAGS of -std before applying the > forced one, similar

Re: [Patch] Proposal: USE_GNU89 switch

2009-05-30 Thread Mel Flynn
On Saturday 30 May 2009 16:21:52 Ed Schouten wrote: > 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 pr

Re: [Patch] Proposal: USE_GNU89 switch

2009-05-30 Thread Diane Bruce
Hi, On Sat, May 30, 2009 at 04:34:43PM +0200, Ed Schouten wrote: > * Gabor Kovesdan wrote: > > 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, tho

Re: [Patch] Proposal: USE_GNU89 switch

2009-05-30 Thread Ed Schouten
* Gabor Kovesdan wrote: > 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. LLVM/Clang support is trivial. Erwin Lansing fired up an experim

Re: [Patch] Proposal: USE_GNU89 switch

2009-05-30 Thread Gabor Kovesdan
Ed Schouten escribió: Hi, I'm proposing the following patch: --- bsd.port.mk +++ bsd.port.mk @@ -2180,6 +2180,10 @@ .endif .endif +.if defined(USE_CSTD) +CFLAGS+= -std=${USE_CSTD} +.endif + # Multiple make jobs support .if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) _M

Re: [Patch] Proposal: USE_GNU89 switch

2009-05-30 Thread Gabor Kovesdan
Ed Schouten escribió: * Gabor Kovesdan 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.

Re: [Patch] Proposal: USE_GNU89 switch

2009-05-30 Thread Ed Schouten
* Gabor Kovesdan 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

[Patch] Proposal: USE_GNU89 switch

2009-05-30 Thread Ed Schouten
Hi, I'm proposing the following patch: --- bsd.port.mk +++ bsd.port.mk @@ -2180,6 +2180,10 @@ .endif .endif +.if defined(USE_CSTD) +CFLAGS+= -std=${USE_CSTD} +.endif + # Multiple make jobs support .if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) _MAKE_JOBS=# I

Re: Proposal: USE_GNU89 switch

2009-05-29 Thread Ed Schouten
* Pav Lucistnik wrote: > Placing CFLAGS+= -std=gnu89 would not work? > > Would the flag do anything else except adding to CFLAGS? Well, it could work, but maybe it would be nice to make it compiler agnostic. -- Ed Schouten WWW: http://80386.nl/ pgpoaGOme1njw.pgp Description: PGP signature

Re: Proposal: USE_GNU89 switch

2009-05-29 Thread Pav Lucistnik
Ed Schouten píše v pá 29. 05. 2009 v 14:36 +0200: > This is why I'm proposing a USE_GNU89 switch, to > force the ports framework to add -std=gnu89 to the CFLAGS. Placing CFLAGS+= -std=gnu89 would not work? Would the flag do anything else except adding to CFLAGS? -- Pav Lucistnik

Proposal: USE_GNU89 switch

2009-05-29 Thread Ed Schouten
Hi folks, As some of you may have heard, Erwin Lansing (droso) has been helping us folks from the FreeBSD-Clang project [1] to build an entire ports tree with Clang. Even though we're hitting some compiler bugs (crashes, miscompilations, etc), things have been going very good. We noticed there is