1

I know that recently FreeBSD 10 dumped gcc in favour of clang due to licensing reasons (Ref).

I wanted to understand if this restriction to use clang is limited only to kernel compilation.

Can I use gcc compiled Python on FreeBSD 10?

(I read some of the articles related to clang, gcc and FreeBSD 10. But could not conclude on above question.)

1 Answers1

4

From the article you are refering to (at the very bottom):

nothing prevents a user from installing and using a modern GCC on their FreeBSD box themselves.

So it is perfectly valid (legally speaking), for a specific user, to install a modern gcc on a FreeBSD 10.x then use it to compile and install Python.

First install a modern gcc from the "ports" (ie: /usr/ports/lang/gcc48).

Then, to force the use of gcc with the "ports", edit your /etc/make.conf and add:

.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc48)
CC=gcc48
CXX=g++48
CPP=cpp48
.endif

A bit more here (doma's blog) - though, the libmap.conf part might not be required for a simple Python compiling.

Ouki
  • 5,962