gcc and g++ version setting in buildflags.conf

Beeblebrox zaphod at berentweb.com
Tue Dec 18 10:53:49 UTC 2012


Hi Jakub,

I forgot to mention I have ccache enabled for port builds. No matter, I
could place this in make.conf:
CC:=${CC:C,^gcc46,/usr/local/libexec/ccache/world/gcc46,1}
And it would work. What I don't understand is that when I was building
security/gnupg1 the port kept calling "cc" (clang compiler in world) instead
of gcc46. As I stated, only when I did "# setenv cc gcc46 " is when build
started using gcc46. Output from the build process shows:
/usr/local/bin/ccache cc -DHAVE_CONFIG_H  ..... (etc)
cc: warning: argument unused during compilation: '-I .'
cc: warning: argument unused during compilation: '-I ..'

clang is not hard-coded in tyhe Makefile as:
CFLAGS:=        ${CFLAGS:S/-pipe//g}
.if ${CC} == "clang"
CFLAGS:=        ${CFLAGS:S/$/ -std=c89/}
.endif

I use buildflags.conf because I find it is easier to maintain per-port
preferences.
These don't work either, BTW so I think I might advise the port maintainer
for bsdadminscripts.
BUILDFLAGS_GCC_CC=      /usr/local/libexec/ccache/world/gcc46
BUILDFLAGS_GCC_CXX=     /usr/local/libexec/ccache/world/g++46
BUILDFLAGS_GCC_CPP=     /usr/local/libexec/ccache/world/cpp46
BUILDFLAGS_GCC_CC=      4.6+
BUILDFLAGS_GCC_CXX=     4.6+



--
View this message in context: http://freebsd.1045724.n5.nabble.com/gcc-and-g-version-setting-in-buildflags-conf-tp5769675p5770358.html
Sent from the freebsd-ports mailing list archive at Nabble.com.


More information about the freebsd-ports mailing list