[PATCH 0/2] Disable unavailable features on older macOS

Joelle van Dyne posted 2 patches 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20241223040945.82871-1-j@getutm.app
Maintainers: Jason Wang <jasowang@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Alexander Graf <agraf@csgraf.de>, Peter Maydell <peter.maydell@linaro.org>
net/vmnet-host.c     | 48 ++++++++++++++++++++++++++------------
net/vmnet-shared.c   | 23 ++++++++++++++----
target/arm/hvf/hvf.c | 55 ++++++++++++++++++++++++++++----------------
net/vmnet-bridged.m  | 18 ++++++++++++---
4 files changed, 101 insertions(+), 43 deletions(-)
[PATCH 0/2] Disable unavailable features on older macOS
Posted by Joelle van Dyne 1 year, 1 month ago
Some features require APIs introduced in a recent version of macOS. Currently,
this is not checked anywhere and so either the build will fail (if building with
an older version of Xcode) or will throw a warning and then crash if run on an
older machine. The correct way to handle this is with availabilty checks. The
checks are a clang extension that only works on Apple platforms but these files
are only built for Apple platforms already and link with Apple frameworks.

Joelle van Dyne (2):
  vmnet: disable unavailable features on older macOS
  hvf: arm: disable unavailable features on older macOS

 net/vmnet-host.c     | 48 ++++++++++++++++++++++++++------------
 net/vmnet-shared.c   | 23 ++++++++++++++----
 target/arm/hvf/hvf.c | 55 ++++++++++++++++++++++++++++----------------
 net/vmnet-bridged.m  | 18 ++++++++++++---
 4 files changed, 101 insertions(+), 43 deletions(-)

-- 
2.41.0
Re: [PATCH 0/2] Disable unavailable features on older macOS
Posted by Peter Maydell 1 year, 1 month ago
On Mon, 23 Dec 2024 at 04:10, Joelle van Dyne <j@getutm.app> wrote:
> Some features require APIs introduced in a recent version of macOS. Currently,
> this is not checked anywhere and so either the build will fail (if building with
> an older version of Xcode) or will throw a warning and then crash if run on an
> older machine. The correct way to handle this is with availabilty checks. The
> checks are a clang extension that only works on Apple platforms but these files
> are only built for Apple platforms already and link with Apple frameworks.

We deliberately only support macos 12 or later and don't want
to carry code workarounds to build on earlier versions
(see eg commit 3bf445fbb1 which removes old ifdeffery needed by 11).
This is part of our "supported build platforms" policy
documented in docs/about/build-platforms.rst.

thanks
-- PMM
Re: [PATCH 0/2] Disable unavailable features on older macOS
Posted by Joelle van Dyne 1 year, 1 month ago
If the policy is macOS 12 or later then you still need patch 2-3 because
currently it is broken on macOS 12.

On Monday, January 6, 2025, Peter Maydell <peter.maydell@linaro.org> wrote:

> On Mon, 23 Dec 2024 at 04:10, Joelle van Dyne <j@getutm.app> wrote:
> > Some features require APIs introduced in a recent version of macOS.
> Currently,
> > this is not checked anywhere and so either the build will fail (if
> building with
> > an older version of Xcode) or will throw a warning and then crash if run
> on an
> > older machine. The correct way to handle this is with availabilty
> checks. The
> > checks are a clang extension that only works on Apple platforms but
> these files
> > are only built for Apple platforms already and link with Apple
> frameworks.
>
> We deliberately only support macos 12 or later and don't want
> to carry code workarounds to build on earlier versions
> (see eg commit 3bf445fbb1 which removes old ifdeffery needed by 11).
> This is part of our "supported build platforms" policy
> documented in docs/about/build-platforms.rst.
>
> thanks
> -- PMM
>
Re: [PATCH 0/2] Disable unavailable features on older macOS
Posted by Daniel P. Berrangé 1 year, 1 month ago
On Mon, Jan 06, 2025 at 07:26:20AM -0800, Joelle van Dyne wrote:
> If the policy is macOS 12 or later then you still need patch 2-3 because
> currently it is broken on macOS 12.

Actually our min baseline for macOS is currently macOS 14.

Per the doc Peter mentions, we officially target the most recent release
(macOS 15), plus the previous release (macOS 14) for a further 2 years.

Anything older may or may not work at any given time, depending on
whether we've done any cleanups that drop stuff only required by the
older versions.
 
> 
> On Monday, January 6, 2025, Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> > On Mon, 23 Dec 2024 at 04:10, Joelle van Dyne <j@getutm.app> wrote:
> > > Some features require APIs introduced in a recent version of macOS.
> > Currently,
> > > this is not checked anywhere and so either the build will fail (if
> > building with
> > > an older version of Xcode) or will throw a warning and then crash if run
> > on an
> > > older machine. The correct way to handle this is with availabilty
> > checks. The
> > > checks are a clang extension that only works on Apple platforms but
> > these files
> > > are only built for Apple platforms already and link with Apple
> > frameworks.
> >
> > We deliberately only support macos 12 or later and don't want
> > to carry code workarounds to build on earlier versions
> > (see eg commit 3bf445fbb1 which removes old ifdeffery needed by 11).
> > This is part of our "supported build platforms" policy
> > documented in docs/about/build-platforms.rst.
> >
> > thanks
> > -- PMM
> >

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|