# Can I specify compiler per port when using poudriere?



## mix_room (Oct 13, 2013)

I am using ports-mgmt/poudriere-devel to build packages for my machines. 

I have set the compiler to use clang as in http://forums.freebsd.org/showthread.php?t=38859. Most ports build ok, but there are some that are not built correctly. These problems seem to have been identified already, and there are workarounds for the clang-problem, which work when I build the port directly. 

One such example is graphics/opencv-core

My make.conf for the poudriere builds is 

```
CC=clang
CXX=clang++
CPP=clang-cpp                
DEFAULT_VERSIONS=       perl5=5.16
```

Has anyone seen anything similar? Is there a way to specify that certain ports should be built with an alternative compiler, everything builds fine when using gcc.


----------



## DutchDaemon (Oct 13, 2013)

Simple example:


```
.if ${.CURDIR:M*/www/chromium*}
USE_GCC?=4.2+
.endif
```


----------



## mix_room (Oct 13, 2013)

The makefile for graphics/opencv-core already contains something similar, but it doesn't seem to be getting applied in poudriere.


----------



## DutchDaemon (Oct 13, 2013)

What I posted should be in /usr/local/etc/poudriere.d/${buildjail}-make.conf though.


----------



## mix_room (Oct 14, 2013)

I'll give it a try and report back.


----------



## mix_room (Oct 16, 2013)

The solution posten by @DutchDaemon worked. Thanks.


----------

