Re: Plan of action for getting macppc apps to compile with Clang?

Matthew Hull <[email protected]> Fri, 6 Dec 2019 14:32:02 -0600
Newsgroups gmane.os.openbsd.ppc
Message-ID <[email protected]>
On 11/4/19 1:02 PM, Christian Weisgerber wrote:
> Ahmed Khanzada:
>
>> My guess is that the next step is ensuring that most macppc ports can
>> be compiled using clang instead of gcc.
> I would think the next step would be to compile the base system and
> xenocara with clang.  Somebody needs to try, take note of the
> problems they encounter, and start fixing them.
>
> Also, there are two components involved:
> (1) switching cc from gcc to clang
> (2) switching ld from bfd to lld
>
> These are really separate efforts, but they tend to be lumped
> together.
>
> That doesn't mean that there is no value in working on using clang
> to build ports on powerpc.  Somebody needs to start.  Run a bulk
> build, or any build of a large number of ports, and see what happens.
>
>> 1. Is there a current plan of action that I should be aware of?
> There appears to be no plan of action.  The obvious course ahead
> is this: Try switching to clang, take note of the problems, fix
> what you can, beg and cajole others into fixing what you can't.
> Keep pushing.
>
> Somebody needs to step up and JUST DO IT.  For powerpc, that won't
> be me.
>
>> 2. Are there any notes on common problems when switching over
>> compilation of an app from GCC to Clang that an OpenBSD developer
>> should know of?
> Well, aarch64/amd64/i386 build everything with clang.  So generally
> speaking, the ports tree is just fine with clang.  Whatever problems
> you are going to encounter are likely to be architecture-specific.
>
If the base system is built with gcc, does it create problems building 
other ports with clang (overriding CC from gcc to clang)?