Date: Sat, 5 Oct 2013 15:38:41 +0200 From: Andras Horvath <mail@log69.com> To: Baptiste Daroussin <bapt@FreeBSD.org> Cc: freebsd-ports@freebsd.org Subject: Re: ports / Makefile / check if default compiler is GCC and version is 4.2+ Message-ID: <20131005153841.60838fea@notebook.dell> In-Reply-To: <20131005131803.GB77704@ithaqua.etoilebsd.net> References: <20131005144427.5e3aeb92@notebook.dell> <20131005131803.GB77704@ithaqua.etoilebsd.net>
next in thread | previous in thread | raw e-mail | index | archive | help
There is something similar here: http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2013-August/259882.html I put that like the following. Does this seem ok? I tested it on 8 stable and 10 current and seems to work just fine: CCISCLANG!= ${CC} --version .if empty(CCISCLANG:M*clang*) ... .endif On Sat, 5 Oct 2013 15:18:03 +0200 Baptiste Daroussin <bapt@FreeBSD.org> wrote: > On Sat, Oct 05, 2013 at 02:44:27PM +0200, Andras Horvath wrote: > > Dear Members, > > > > I'd like to ask your help. I'm a developer and maintainer of a port and I intend to give different compile options for different compilers when building my software. I'm using the OpenMP feature of GCC that is available from GCC version 4.2 and above. > > > > I would like to know how I could determine in my Makefile whether the default compiler is GCC and it's version is >= 4.2 ? > > > > I'd like to go with the preffered standard way. > > > > Does it make any sense to try to support GCC version lower than 4.2? If not, I reckon it would be enough for me to check against GCC only without its version. If so, then would this be enough? : > > > > .if ${CC} == "gcc" > > > > > It doesn't make sense, $[CC} == "gcc" is not enough at all for that, if you > Some patches allowing to better play with different compilers is coming. > > regards, > Bapt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131005153841.60838fea>