Building ports not explicitely enabling USE_GCC=4.6+ are considered
using the system's LLVM/CLANG, which is clang 3.2 in our installation
(FreeBSD 10.0-CURRENT #0 r240164), but since some ports require the
special ports devel/llvm and lang/clang, LLVM 3.1 and clang 3.1 get
installed and 3.1 is used instead the system's 3.2 whenever "clang",
"clang++" is invoked.

Following the WIKI at http://wiki.freebsd.org/BuildingFreeBSDWithClang
introduces the usage of

CC=clang instead of CC=/usr/bin/clang
CXX=clang++ instead of CXX=/usr/bin/clang++
CPP=clang-ccp instead of CPP=/usr/bin/clang-ccp

Is this intended?

Since I can not simply change the search patch - I need to have
/usr/local/bin before /usr/bin, is there a way to avoid this confusion?

Building software with makefiles or self-created ports always refer to
the port's LLVM/CLANG, which is LLVM/CLANG 3.1 due to some reuqirements
of several ports.

I'm really confused. Am I missing some special knob here and fell into
this pit by not-having-the-knowledge? Or is it really this messy?

Well, I'd like to stay with the core's LLVM/CLANG, which is 3.2 whenever
I simply issue "clang" or "clang++" (a pity that LLVM isn't completely
installed).

My /etc/make.conf portion looks this:



##
##      CLANG
##
.if !defined(NO_CLANG)
.if !defined(CC) || ${CC} == "cc"
CC=                             /usr/bin/clang
.endif
.if !defined(CXX) || ${CXX} == "c++"
CXX=                            /usr/bin/clang++
.endif
.if !defined(CPP) || ${CPP} == "cpp"
CPP=                            /usr/bin/clang-cpp
.endif
## Don't die on warnings
#NO_WERROR=
#WERROR=
## Don't forget this when using Jails!
#NO_FSCHG=
CFLAGS=                         -O3 -pipe # -fno-strict-aliasing
COPTFLAGS=                      -O3 -pipe
#
#CXXFLAGS+=                     -stdlib=libc++
.endif

My /etc/src.conf is attached.

If there is a clean way to distinguish, please help me.

Regards,

Oliver
#.if !defined(NO_CLANG)
#CC=                    /usr/bin/clang
#CXX=                   /usr/bin/clang++
#CPP=                   /usr/bin/clang-cpp
##
#CFLAGS+=               -O3 -pipe # -fno-strict-aliasing
#COPTFLAGS+=            -O3 -pipe
#CXXFLAGS+=             -stdlib=libc++
#
## Don't die on warnings
#NO_WERROR=
#WERROR=
#
## Don't forget this when using Jails!
#NO_FSCHG=
# need clang++ to be built
#WITH_LIBCPLUSPLUS=     YES
#
#WITH_CLANG_IS_CC=      YES
#.endif
#
WITH_CLANG=             YES
WITH_CLANG_EXTRAS=      YES
#
WITH_LIBCPLUSPLUS=      YES
#
WITH_BIND_LARGE_FILE=   YES
WITH_BIND_SIGCHASE=     YES
WITH_BIND_LIBS=         YES
#
WITH_IDEA=              YES
WITH_HESIOD=            YES
#
#WITH_ICONV=            YES
#WITH_BSD_GREP=         YES
WITH_BSD_SORT=          YES
#
WITH_BSDCONFIG=         YES
#
#WITH_OFED=             YES
#
MALLOC_PRODUCTION=      YES
#
PORTS_MODULES=          emulators/virtualbox-ose-kmod x11/nvidia-driver

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to