[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PATCH] OS X / macOS and Test Suite
- From: Jay Carlson <nop@...>
- Date: Tue, 5 Dec 2017 08:19:20 -0500
Disclaimer: I'm not an OS X expert. Corrections gladly accepted.
On 2017-12-05 Tue, at 05:46, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
>> Do you perhaps
>> still have MACOSX_DEPLOYMENT_TARGET set as an environment variable?
>
> No. It's been *ages* since I've used MACOSX_DEPLOYMENT_TARGET.
As Paige says, the default is the current OS; you shouldn't see problems on the machine you're on, and maybe not for the previous release or two.
ANSI C programs have the fewest problems. When you start building or linking frameworks beyond this, it matters more, I think.
If you're using C++ anywhere below 10.9, you'll definitely need to set the deployment target consistently, or add more flags. As of 10.9, the C++ standard library switched to libc++. I had some vendor binary libraries that use libc++, so I need to do this to work in builds for OS X 10.7 and 10.8:
MACOSX_DEPLOYMENT_TARGET = 10.7
LFLAGS += -stdlib=libc++
CXXFLAGS += -stdlib=libc++
In this case the problem was clear at build-time, in particular at link-time. It was also morally questionable, since the upstream binary libraries should be built this way too.
If you only support 10.9 forward, this particular bug won't bite you. But I don't know how many more problems there are without this; the 10.11->10.12 transition seemed to have a bunch of homebrew bugs filed.
Jay