Closed akien-mga closed 3 years ago
You must install compiler-rt to get rid of the linker error. Run build_compiler_rt.sh
.
But that's not a big deal compared to the main linking issue reported above. And I'm not sure Apple Clang's behavior even makes sense since it lets me run a binary on Big Sur compiled with mmacosx-version-min=12.0...
I'd prefer to keep the SDK version check...
You must install compiler-rt to get rid of the linker error. Run
build_compiler_rt.sh
.
Thanks! I'll try that and report back.
I'd prefer to keep the SDK version check...
Agreed, I just mentioned it for completeness as I was compare the behavior of both implementations, but Apple Clang's behavior doesn't make much sense to me.
You must install compiler-rt to get rid of the linker error. Run
build_compiler_rt.sh
.Thanks! I'll try that and report back.
As a side note, could there be an option to have build_compiler_rt.sh
perform these steps automatically?
https://github.com/tpoechtrager/osxcross/blob/8a716a43a72dab1db9630d7824ee0af3730cb8f9/build_compiler_rt.sh#L188-L193
I'm building osxcross in a container so I'd have to hardcode paths or replicate this in my script to work on base system upgrades: https://github.com/tpoechtrager/osxcross/blob/8a716a43a72dab1db9630d7824ee0af3730cb8f9/build_compiler_rt.sh#L28-L33
I confirm that building and installing compiler-rt fixes the issue :+1:
Should this be called out in the README to close this, or is it good as is?
Host: Fedora 34 OSXCross: 8a716a43a72dab1db9630d7824ee0af3730cb8f9 SDK: Xcode 12.4, MacOSX 11.1
This is a follow-up to https://github.com/FNA-XNA/FNA/issues/318, both FNA and Godot are building Mono with osxcross for x86_64 and arm64, and we run into issues when using a
macosx-version-min
lower than 11.0 while linking to Mono which uses a__builtin_available(macOS 11, *)
version check here: https://github.com/mono/mono/blob/a01309d1041ff8ae15b1f8b717420ec139e1cdb8/mono/utils/mono-codeman.c#L670 (note this is a recent addition to Mono's2020-02
branch, which is the current Preview release).Here's an example of the error from building Godot with osxcross 8a716a43 and
mono-6.12.0.144
:Here's a more minimal example:
With osxcross:
With Apple Clang on a Mac running Big Sur:
Side note on checking against future SDKs
As a side note, Apple Clang also seems to allow checking for theoretical future SDK versions: ```c #include