Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-41100: add runtime checks for MACOSX_DEPLOYMENT_TARGET=10.10#21577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@lawrence-danna-apple
Copy link
Contributor

@lawrence-danna-applelawrence-danna-apple commentedJul 21, 2020
edited
Loading

In order to support a universal2 build, supporitng Mac OS 11 on arm64 and Mac OS on
x86_64 going back to 10.10, we need to add in runtime checks for functions that will
be detected as present by autoconf, because they are in the SDK, but which did not
exist in Mac OS 10.10. This fixes all the instances of -WWunguarded-availability-new
when building with MACOSX_DEPLOYMENT_TARGET=10.10

https://bugs.python.org/issue41100

lazka and sumanthratna reacted with hooray emoji
In order to support a universal2 build, supporitng Mac OS 11 on arm64 and Mac OS onx86_64 going back to 10.10, we need to add in runtime checks for functions that willbe detected as present by autoconf, because they are in the SDK, but which did notexist  in Mac OS 10.10.    This fixes all the instances of -WWunguarded-availability-newwhen building with MACOSX_DEPLOYMENT_TARGET=10.10
@ned-deily
Copy link
Member

Thanks for the PR.@ronaldoussoren is working on a similar one at the moment. He can review and resolve differences.

@ronaldoussoren
Copy link
Contributor

I have a similar patch in#21583, but that one is targeting macOS 10.9 instead of 10.10 and is incomplete and as of yet untested ("it compiles therefore it is correct").

I like your approach with HAVE_..._RUNTIME macro's, that reduces the amount of cruft compared with my approach.

Copy link
Contributor

@ronaldoussorenronaldoussoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Just some comments at this time. The basic approach looks sane, but I haven't look at the changes in detail yet.

configure.ac Outdated
AC_MSG_RESULT(yes)
])

AC_MSG_CHECKING([to see if the compiler supports __builtin_available])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It is not necessary to test for this in a configure script, the following should work in a header file:

#ifdef __has_builtin#if __has_builtin(__builtin_available)#define HAVE_BUILTIN_AVAILABLE 1#endif#endif

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

ok

intasync_err=0;
structiovec*iov;
Py_buffer*buf;
if (HAVE_PWRITEV_RUNTIME) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

same as in os_preadv.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

ok

intasync_err=0;
structiovec*iov;
Py_buffer*buf;
if (HAVE_PREADV_RUNTIME) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'd just ignore the compiler warning here, as this function will be removed from the module when HAVE_PREADV_RUNTIME is false.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

ok

#defineHAVE_FUTIMENS_RUNTIME __builtin_available(macos 10.13, ios 11, tvos 11, watchos 4, *)
#defineHAVE_PREADV_RUNTIME __builtin_available(macos 10.16, ios 14, tvos 14, watchos 7, *)
#defineHAVE_PWRITEV_RUNTIME __builtin_available(macos 10.16, ios 14, tvos 14, watchos 7, *)
#defineHAVE_POSIX_SPAWN_SETSID_RUNTIME __builtin_available(macos 10.15, ios 13, tvos 13, watchos 6, *)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is this (the introduction of POSIX_SPAWN_SETSID) documented somewhere?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It is 10.15. I know because I asked for it (cf. FB5361314 aka rdar://43247036).

These complications were needed on a previous build of Xcode but as ofXCode 12 beta 3 it works without them.
@ned-deily
Copy link
Member

Thanks for the PR. The changes in the PR have been used as the basis for changes inGH-22855.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ronaldoussorenronaldoussorenronaldoussoren left review comments

@abalkinabalkinAwaiting requested review from abalkin

@pgansslepganssleAwaiting requested review from pganssle

@tirantiranAwaiting requested review from tiran

+1 more reviewer

@cdavis5ecdavis5ecdavis5e left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@lawrence-danna-apple@ned-deily@ronaldoussoren@cdavis5e@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp