bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _GL_EXTERN_INLINE not defined correctly in config.h for macOS


From: Jeffrey Walton
Subject: Re: _GL_EXTERN_INLINE not defined correctly in config.h for macOS
Date: Thu, 20 Jan 2022 10:39:52 -0500

On Thu, Jan 20, 2022 at 8:24 AM Ryan Schmidt <gnulib@ryandesign.com> wrote:
>
> > On Jan 18, 2022, at 15:18, Reuben Thomas <rrt@sc3d.org> wrote:
> >
> > On Tue, 18 Jan 2022 at 20:56, Jeffrey Walton <noloader@gmail.com> wrote:
> >>
> >> If you are OS X 10.8 and above, then you will likely be using Apple
> >> Clang (or LLVM Clang), and you likely won't have troubles.
>
> You will likely be using clang on 10.7 and later. clang uses gnu99 inline 
> semantics.
>
> >> OS X 10.6 switched to llvm-gcc. It should not have a problem with
> >> inline. https://releases.llvm.org/2.8/docs/CommandGuide/html/llvmgcc.html
>
> llvm-gcc is available on 10.6 but in Xcode 3.2.6, the last free version of 
> Xcode for 10.6, the default compiler is Apple gcc 4.2.1. Apple gcc 4.2.1 uses 
> gnu89 inline semantics. An ancient version of clang is available on 10.6 but 
> I don't recommend trying to use it.
>
> >> OS X 10.5 and earlier use GCC 4.2, and the compiler has Apple
> >> extensions, like the ability to parse Objective C and generate native
> >> code for it. It had the static/inline/external problems Paul
> >> discussed.
>
> Xcode 3.1.2 is the newest for Mac OS X 10.5 and it has Apple gcc 4.2.1 but 
> defaults to Apple gcc 4.0.1. In MacPorts, we decided this was too old and use 
> Apple gcc 4.2.1 by default on 10.5.
>
> Xcode 2.5 is the newest for Mac OS X 10.4 and the newest compiler it has is 
> Apple gcc 4.0.1. In MacPorts, we decided this was too old and use a copy of 
> Apple gcc 4.2.1 installed by MacPorts for everything except compiling that 
> Apple gcc 4.2.1, which of course has to be compiled with Xcode's Apple gcc 
> 4.0.1.
>
> > Sounds fine: if someone wants to compile the code I'm working on on OS
> > X 10.5 or earlier, they can install a newer compiler with MacPorts.
>
> If gnulib starts requiring a compiler newer than Apple gcc 4.2.1, that will 
> be problem for MacPorts on 10.6 and earlier. We might be able to bootstrap 
> our way to a newer compiler, but that wouldn't be possible if the newer 
> compiler or any of its dependencies start using the newer gnulib.

One problem with bootstrapping on the old PowerMacs is C++. I believe
exceptions are still broken due to libunwind, so we can't use a newer
version of Clang on those platforms. Has that changed?

I find it is still easier to build software that works with the older
compilers rather than trying to build a newer compiler that lacks C++
due to exception unwinding. Consider, MacPorts cannot build CMake
because of C++ requirements. (And MacPorts cannot pin to an older
package).

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]