-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support iOS 13 in cross #93596
Support iOS 13 in cross #93596
Conversation
Needed for iOS 13 support
new apps need iOS 13, so we should try to use that here
511f5d3
to
7f4d3f4
Compare
'' + stdenv.lib.optionalString (sdk.platform == "iPhoneOS") '' | ||
echo "-miphoneos-version-min=${minSdkVersion}" >> $out/nix-support/cc-cflags | ||
echo "-Wl,-platform_version,ios,${targetPlatform.minSdkVersion or "9.0"},${sdk.version}" >> $out/nix-support/cc-cflags | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should move these to the binutils override above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - that avoids the warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the c compiler should know about minSdkVersion, so I readded miphoneos-version-min.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird it knows about it, but can't also send it to the linker, ugh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sends the min sdk version to the linker, but not the sdk version. It looks like this might fix that:
dac26f5
to
3c830bc
Compare
…ersion-min The App Store looks at LC_VERSION_MIN_IPHONEOS to verify you have a new enough SDK version. This is not just the minimum version, but also the sdk version used. When the linker can’t figure it out, it tries to infer it from the sdk path[1]. When no sdk version is found, it defaults to just using the -miphoneos-version-min value[2]. So, to make sure we don’t rely on inference (which doesn’t work in the current directory structure), we have to specify -platform_version. [1]: https://github.com/tpoechtrager/cctools-port/blob/43f32a4c61b5ba7fde011e816136c550b1b3146f/cctools/ld64/src/ld/Options.cpp#L5355-L5376 [2]: https://github.com/tpoechtrager/cctools-port/blob/43f32a4c61b5ba7fde011e816136c550b1b3146f/cctools/ld64/src/ld/ld.hpp#L58
The cctools bump seems to have added a warning on linking:
This warning seems harmless enough, but ruby's configure script treats this as a problem with
As pointed out in the thread above, clang adds version args when calling the linker, which duplicates the flags set in Just as a test, reverting 3c6bd61 is sufficient to build ruby. |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)