Clang 11 performs an optimization on x86_64 that is sensitive to the
presence of debug information. This results in GCC’s bootstrap failing
because it builds stage 2 with debug information and stage 3 without,
and the resulting objects do not match.
This patch uses the cctools assembler on LLVM 11 and x86_64-darwin while
using the integrated assembler on newer versions, which matches the
platform tools (Apple has uses the integrated assembler since Xcode 12).
@emilazy found a bug in #234861. Specifically, the hook is not actually
applied. e2fsprogs links against darwin.CF, but since it cannot find the
framework by rpath, it crashes.
Since the hook should always be used, it is copied directly to
`nix-support/setup-hook` instead of providing it as an attribute. This
preserves dropping the hook in the cross-compilation case while
providing it for everything else that needs it.
To avoid further churn and due to the complexity of building the stdenv
with the hook active, this change required the stdenv rework.
swift-corelibs uses libcurl to implement `NSURLSession` in Foundation
via the symbols exported by CF. Foundation is not build on Darwin, and
these symbols are not exported by the system CoreFoundation.
By not linking against libcurl, this breaks a cycle between CF and
libcurl. That should allow libcurl to drop the patch disabling
linking against the SystemConfiguration and restore NAT64 support.
Unfortunately, the Darwin stdenv bootstrap still needs to build
dependencies that use `fetchFromGitHub`. While it can drop curl from the
final stdenv, it still needs to use it during the stdenv bootstrap.
Upstream swift-corelibs links against icu on Linux, so it is not
necessarily tied to the version of ICU provided by Apple for Darwin.
swift-corelibs and qtwebkit are the only two packages that link against
darwin.ICU. Switching to the nixpkgs icu will allow the Darwin-specific
package to be deprecated and removed eventually.
Switching the build system to cmake makes it easier to make changes to
the build (particularly which dependencies to link). It also removes a
lot of manual build steps and fixes the issue identified by @emilazy in
NixOS#238791.
Fixes NixOS#238791.
This is an additional fix for clang 16, which fails due to an undeclared
symbol. Adding `_DNS_SD_LIBDISPATCH` makes the symbol visible in
`dns_sd.h`, allowing the build to complete successfully.