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.)


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)

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.