# WITH_GCC vs. BUILDFLAGS_GCC in bsdadminscripts, distcc, ccache



## kdemidofff (May 27, 2010)

Im trying to make sysutils/bsdadminscripts work but have some troubles

i want use lang/gcc44 or lang/gcc45 for compilation of compatible ports and some userland
but have trouble with setting it up

i installed bsdadminscripts, gcc44, ccache, distcc but have broken builds requiring "gcc4444"

1. can i use global WITH_GCC? what value shall i set it to? shall i set before

```
BUILDFLAGS=/usr/local/share/bsdadminscripts/buildflags.mk
.if exists(${BUILDFLAGS})
.include "${BUILDFLAGS}"
.endif
```
2. can i also use in make.conf


```
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc44)
CC=gcc44
CXX=g++44
CPP=cpp44
.endif
```
 for quick and dirty hack compiler without bells, whistles, blackjack and and/or wores 
or shall i use just 

```
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc44)
WITH_GCC?=44
.endif
```

i know about options in buildflags.conf

```
BUILDFLAGS_GCC=44
```

but im confused when use which options, i need global compiler as gcc44 with exception of buildworld and some ports

what also about setup order of gcc44 ccache distcc? is it right? (i know libtool needs reinstalled on new compiler)

if i add gcc45 i need to reinstall all also?

Also: how can i check that i build port with gcc44 not base one?


----------



## DutchDaemon (May 27, 2010)

Read this? http://www.freebsd.org/doc/en/articles/custom-gcc/article.html


----------



## kdemidofff (May 27, 2010)

it doesn't worked with bsdadminscripts, distcc, ccache

Seems was a specific port problem


----------

