Subject: Re: test for gcc3 ?
To: Manuel Bouyer <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 03/19/2004 22:28:39
On Fri, Mar 19, 2004 at 09:49:11PM +0100, Manuel Bouyer wrote:
> what is the appropriate test to know if we are using gcc3 or some other kind
> of compiler ?
> I need to do this for emacs:
> .if ${OPSYS} == "SunOS"
> CFLAGS+=        -fno-zero-initialized-in-bss
> .endif
> but only if using gcc3 (this doesn't exists in gcc2).

I would do:

.include "../../mk/"
.if (${OPSYS} == "SunOS") && !empty(CC_VERSION:gcc-3.*)
CFLAGS+=	-fno-zero-initialized-in-bss

Eventually, I'll clean this up so that you include instead,
but for now, the above should work.


	-- Johnny Lam <>