On Dec 27, 2013, at 07:56, Landon Fuller wrote:
>> This will unnecessarily make users of Xcode < 5 install the llvm-gcc42 port,
>> when they have a perfectly good version of llvm-gcc42 provided by Xcode.
>> Rather than this, you should use compiler.blacklist. For example, if no
>> clang compiler will work, blacklist all of them with:
>>
>> compiler.blacklist *clang*
>
> I think I'd need 'compiler.whitelist macports-llvm-gcc-4.2 llvm-gcc-4.2' to
> make sure I always get a consistent compiler? There's an extensive test suite
> I ran with a JVM built against llvm-gcc4.2, and I hesitate to throw any
> variables into the mix.
If you have reason to believe that *only* llvm-gcc — not clang, not gcc — will
work, then ok, whitelist only llvm-gcc. That would be unusual, but maybe
openjdk is unusual in its compiler needs; I don’t know.
>> MacPorts will pick the next-best compiler, which will be llvm-gcc42, either
>> the version provided by Xcode or the one provided by MacPorts, depending on
>> what’s available. You can then use the variables ${configure.cc},
>> ${configure.cxx}, etc. where you need them.
>
> Will this actually work with llvm-gcc?
Yes, it will work with all compiler names that MacPorts recognizes. See
portconfigure.tcl.
> Apple is still shipping 'gcc' and 'llvm-gcc' binaries/symlinks, but they're
> pointed at clang; won't find_developer_tool still pick them up?
>
> landonf@lambda:~> llvm-gcc -v
> Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
>
> landonf@lambda:~> llvm-gcc --help
> OVERVIEW: clang LLVM compiler
> [snip]
>
> landonf@lambda:~> gcc -v
> Configured with:
> --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
>
> landonf@lambda:~> gcc --help
> OVERVIEW: clang LLVM compiler
> [snip]
>
> Shipping an incompatible compiler as 'gcc' and 'llvm-gcc' was an absolutely
> ridiculous decision on the part of Apple's developer tools team, but they
> didn't ask me.
I am not Apple, but clang *is* more or less compatible with most of what gcc
does. And since Apple decided to no longer ship gcc or llvm-gcc but only clang,
the two choices were: make “gcc" a symlink to clang, or provide no "gcc" at
all. They chose the former, and I think it was an ok choice; had they chosen
the latter, I can imagine a *lot* of software not being able to build out of
the box, since a lot of software assumes the compiler is “gcc”.
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev