Different CFLAGS for clang vs gcc with poudriere?

Hi all,

Is it possible to specify different CFLAGS for clang and gcc when building ports with poudriere? Some linuxulator ports insist on using gcc, and it doesn't support a clang flag I'd like to use for all ports.

So can CFLAGS be conditionalized by compiler?

Thanks,

Sean
 
I would use a frontend script for clang.
Thanks for your reply. But I'm not sure what you mean, could you elaborate?

My `/usr/local/etc/poudriere.d/make.conf` file currently has:

```
.if empty(.CURDIR:M*/audio/linux-c7-alsa-plugins-oss)
CFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
CXXFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
.endif
```

And that works for that one port, but I'm hoping to generalize it to all ports that use gcc.
 
in Mk/Uses/compiler.mk, there is:
Code:
# Variable to test after <bsd.port.pre.mk>
#
# COMPILER_TYPE:        can be gcc or clang
It may help you.
 
Back
Top