Skip to content

Backport Big Sur support to awake-20.03 #7

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

Merged
merged 23 commits into from
May 6, 2021

Conversation

Gabriella439
Copy link

I arrived at these commits by:

@Gabriella439 Gabriella439 requested a review from lambdadog May 3, 2021 15:51
@Gabriella439
Copy link
Author

I'm still verifying that this builds since each successive backport takes basically a day to build, but I'm putting this up for review ahead of time

thefloweringash and others added 23 commits May 3, 2021 09:17
installTarget looks like a typo for installTargets. This causes a lot
of llvm and clang to be built and installed.

Clang is not intended to be an external dependency. The source bundle
includes llvm and clang. Adding include paths and building clangBasic
first is sufficient to use the internal clang components.
This new version has tapi support, which is needed to build the new
stubs based libSystem, etc. and Big Sur support.

You can verify the provenance of these yourself by checking Hydra here:
https://hydra.nixos.org/build/128192471
Adapted from main expression for clang 7.
Build the llvm support libraries (libcxx, libcxxabi) from scratch
without using the existing llvm libraries. This is the same spirit and
similar implementation as the "useLLVM" bootstrap in llvm package
sets. Critically it avoids having libcxxabi provided by the cc-wrapper
when building libcxx, which otherwise results in two libcxxabi
instances.

$ otool -L /nix/store/vd4vvgs9xngqbjzpg3qc41wl6jh42s9i-libc++-7.1.0/lib/libc++.dylib
/nix/store/vd4vvgs9xngqbjzpg3qc41wl6jh42s9i-libc++-7.1.0/lib/libc++.dylib:
        /nix/store/vd4vvgs9xngqbjzpg3qc41wl6jh42s9i-libc++-7.1.0/lib/libc++.1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        /nix/store/gmpwk5fyp3iasppqrrdpswxvid6kcp8r-libc++abi-7.1.0/lib/libc++abi.dylib (compatibility version 1.0.0, current version 1.0.0)
        /nix/store/3hn7azynqgp2pm5gpdg45gpq0ia72skg-libc++abi-7.1.0/lib/libc++abi.dylib (compatibility version 1.0.0, current version 1.0.0)
        /nix/store/1nq94scbxs6bk7pimqhvz76q6cfmbv97-Libsystem-osx-10.12.6/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

Additionally move some utilities (clang, binutils, coreutils, gnugrep)
to the stage layers so they can be replaced before the final
stdenv. This should cause most of stage4 to be built from the
toolchain assembled as of stage3 instead of the bootstrap toolchain.
Exposed by the tbd stubs which contains fat libraries. The previously
used proxy libraries were x86_64 only.
Used during bootstrap to check that re-exported libraries are not
dangling.
Fixes bootstrapping on macOS Big Sur.
We can’t set this for cross-compiling since we use the GNU linker.
Instead, set these flags only when targetPlatform is macOS.

Fixes NixOS#80754

Fixes NixOS#83141
This is a manual cherry-pick of:

NixOS@764b227

… only because I was unable to fetch the original commit using `git`
@Gabriella439 Gabriella439 force-pushed the gabriel/backport_big_sur_awake-20.03 branch from a05a8cb to 4d3fb1c Compare May 3, 2021 16:20
@Gabriella439
Copy link
Author

I'm merging now as I've gotten as far as building GHC and several Haskell packages in end-to-end, so at this point it's pretty likely that everything will build

@Gabriella439 Gabriella439 merged commit b10ebf0 into awake-20.03 May 6, 2021
@Gabriella439 Gabriella439 deleted the gabriel/backport_big_sur_awake-20.03 branch May 6, 2021 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants