Compiler Selection

Mark Brethen mark.brethen at gmail.com
Sun Jul 3 18:39:44 UTC 2022


According to the wiki:

> The compiler is chosen with the following precedence:
> 
> If configure.compiler is set in the Portfile, then that is the compiler that is used.
> If the user sets default_compilers, the compiler is chosen from that list unless the compiler is blacklisted.
> If the Portfile sets compiler.whitelist, the compiler is chosen from that list unless the compiler is blacklisted. 
> If the Portfile sets compiler.fallback, the compiler is chosen from that list unless the compiler is blacklisted. 
> A compiler is chosen (Xcode compilers if possible) that
> is not blacklisted,
> is known to work on the particular version of the OS, and
> satisfies the requirements set in the Portfile.
CalculiX requires gcc + fortran. I used ‘configure.compiler macports-gcc-11’ (it will not build with clang). But this seems too rigid. My initial goal was to set the latest version as default with the option of trying earlier versions of macports-gcc. I tried using compilers PortGroup but could not get that to work—I haven’t figured out the proper setup. Is it possible? I read that variants are no longer recommended for this.

Thanks,
Mark



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220703/29b952f9/attachment.htm>


More information about the macports-dev mailing list