pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Installing clang alongside GCC on NetBSD 9
On 2020-03-08 07:02, Terminator Override wrote:
Dear Group
I am new to NetBSD.
Is it possible to have both GCC and Clang configured to work at the
same time, and also for the pkgsrc system to be configured to use
either of them at will?
Thanks
Certainly. You can also install multiple GCC versions simultaneously.
Individual packages can be easily modified to select any compiler, but
you have to be careful about which tool chains you mix due to ABI
differences, especially with C++.
The "base" compiler used to bootstrap pkgsrc is pretty much cast in
stone for that tree. You would have to go through some contortions to
change it and then likely rebuild all your packages to avoid ABI
incompatibilities.
However, you can install multiple pkgsrc trees under different
directories, each using a different compiler.
See auto-pkgsrc-setup for an easy way to do this: http://netbsd.org/~bacon/
If you want to learn the details of the process, study the script
instead of running it. There are a lot of pitfalls and the script has
evolved to address most of them over the years.
JB
Home |
Main Index |
Thread Index |
Old Index