Current best practice to select GCC compiler in Portfile

Artur Szostak aszostak at partner.eso.org
Thu Feb 26 05:22:13 PST 2015


Let me rephrase:
Assuming I have to use gcc rather than clang. What is the standard/best way to do that in a Portfile?

I have a numerical code that gives inferior results with clang compared to gcc. Thus, I need to make sure the port uses GCC. Also, the code is C99, so that should mitigate any ABI issues.

________________________________________
From: Christopher Jones [jonesc at hep.phy.cam.ac.uk]
Sent: 26 February 2015 14:06
To: Artur Szostak
Cc: macports-dev at lists.macosforge.org
Subject: Re: Current best practice to select GCC compiler in Portfile

The best practise is not to do it, unless it is for non C++ code (C, fortran, ..), as using gcc for C++ will lead to C++ runtime issues if the binaries you produce are used with others that where produced using clang, which like it or not is now the default OS X compiler.

> On 26 Feb 2015, at 1:56pm, Artur Szostak <aszostak at partner.eso.org> wrote:
>
> Hi,
>
> I couldnt really find this information and I see lots of different approaches in the Portfiles.
> What is the current best practice to select the GCC compiler over the XCode clang one used by default?
> I dont care much about the exact version of the GCC compiler used, but it must be gcc rather than clang.
>
> Kind regards.
>
> Artur
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev



More information about the macports-dev mailing list