On 27 March 2018 at 08:31, Ryan Schmidt wrote:
>
> > On Mar 26, 2018, at 01:25, Mojca Miklavec wrote:
> >> On 26 March 2018 at 02:49, Ryan Schmidt wrote:
> >>> On Mar 25, 2018, at 14:37, David B. Evans wrote:
> >>>
> >>>> +# blacklist compilers that do not support C11 (redefinition of typedef
> >>>> ‘GtkSourceTag’ at gtksourceview/gtksourcetag.h:35)
> >>>> +compiler.blacklist *gcc* {clang < 300}
> >>>
> >>> Please be more specific here, such as "*gcc-3.* *gcc-4.*". Newer versions
> >>> of gcc do support C11, and a change was already committed to MacPorts
> >>> base which will let PowerPC systems fall back to gcc6 instead of clang
> >>> (since clang doesn't work on PowerPC). Other ports may need more-specific
> >>> blacklists too.
> >>
> >> Is there any chance to implement something like
> >> compiler.blacklist {gcc < 4.7} {macports-clang < 3.7}
> >> ?
>
> There is no code currently written that would allow that to work. If we were
> to add code to the compilers_blacklist_versions for that, how should it work?
I don't know how the current implementation works, but from the
functional point of view ...
> Currently, the above line would mean "blacklist versions of the compiler
> named 'gcc' that are earlier than 4.7" and "blacklist versions of the
> compiler named 'macports-clang' that are earlier than 3.7". There are no
> compilers in MacPorts named "gcc" or "macports-clang" so these statements
> would currently have no effect. Are you proposing that the names "gcc" and
> "macports-clang" be special-cased in the portgroup, and taken to mean "the
> set of ports whose names start with 'gcc'" (or maybe even "...whose names
> contain 'gcc'"?) and "the set of ports whose names start with
> 'macports-clang'"? That's a plausible solution, I'm just pointing out that it
> would be special-case code.
Yes, that's the meaning that I would like to convey through that syntax.
The list for {gcc < 4.7} should cover (using
https://trac.macports.org/wiki/UsingTheRightCompiler as reference):
- apple-gcc-4.[02]
- gcc-3.3
- gcc-4.[02]
- llvm-gcc-4.2
- macports-gcc-4.[3456]
- macports-llvm-gcc-4.2
- macports-dragonegg-3.[45]-gcc-4.[56]
List of problematic compilers which should probably always be blacklisted :)
- cc
- gcc (/usr/bin/gcc)
- macports-gcc
For macports-clang I would have suggested using {clang < 3.7}, but
that one has already been taken :)
Mojca