How to reliable detect a MacPorts-ported compiler?
noloader at gmail.com
Tue Sep 8 17:57:43 PDT 2015
>> What strings or bits is MacPorts providing?
> If you want to know if gcc is FSF GCC compiled by MacPOrts, you could inspect the version string:
> $ gcc-mp-6 --version
> gcc-mp-6 (MacPorts gcc6 6-20150830_0+universal) 6.0.0 20150830 (experimental)
> Copyright (C) 2015 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> Note that this inclues the string "MacPorts".
> However, I reiterate what Rainer said: the issue being discussed here is not (we believe) specific to MacPorts, but rather would occur anytime you compile FSF GCC on OS X.
Thanks again Ryan.
Is there a #define so we can detect it in the source code?
If we can't detect it in the source, the we have to detect it in the
make file and pass it as a defined with -DXXX. That pollutes the
More information about the macports-users