Commit Graph

333 Commits

Author SHA1 Message Date
a-n-n-a-l-e-e
ce789e7e35
llvmPackages_{12,13,14,15,16,17,git}.{libcxx,libcxxabi}: merge libcxxabi into libcxx (#292043)
- merge libcxxabi into libcxx for LLVM 12, 13, 14, 15, 16, 17, and git.
- remove the link time workaround `-lc++ -lc++abi` from 58 packages as it is no longer required.
- fixes https://github.com/NixOS/nixpkgs/issues/166205
- provides alternative fixes for. https://github.com/NixOS/nixpkgs/issues/269548 https://github.com/NixOS/nix/issues/9640
- pkgsCross.x86_64-freebsd builds work again

This change can be represented in 3 stages
1. merge libcxxabi into libcxx -- files: pkgs/development/compilers/llvm/[12, git]/{libcxx, libcxxabi}
2. update stdenv to account for merge -- files: stdenv.{adapters, cc.wrapper, darwin}
3. remove all references to libcxxabi outside of llvm (about 58 packages modified)

### merging libcxxabi into libcxx
- take the union of the libcxxabi and libcxx cmake flags
- eliminate the libcxx-headers-only package - it was only needed to break libcxx <-> libcxxabi circular dependency
- libcxx.cxxabi is removed. external cxxabi (freebsd) will symlink headers / libs into libcxx.
- darwin will re-export the libcxxabi symbols into libcxx so linking `-lc++` is sufficient.
- linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient.
- libcxx/default.nix [12, 17] are identical except for patches and `LIBCXX_ADDITIONAL_LIBRARIES` (only used in 16+)
- git/libcxx/defaul.nix  does not link with -nostdlib when useLLVM is true so flag is removed. this is not much different than before as libcxxabi used -nostdlib where libcxx did not, so libc was linked in anyway.

### stdenv changes
- darwin bootstrap, remove references to libcxxabi and cxxabi
- cc-wrapper: remove c++ link workaround when libcxx.cxxabi doesn't exist (still exists for LLVM pre 12)
- adapter: update overrideLibcxx to account for a pkgs.stdenv that only has libcxx

### 58 package updates
- remove `NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}` as no longer needed
- swift, nodejs_v8 remove libcxxabi references in the clang override

https://github.com/NixOS/nixpkgs/pull/292043
2024-03-11 03:53:37 -07:00
Weijia Wang
39951cddc7 darwin.libiconv: set mainProgram 2023-11-18 16:57:39 +01:00
Randy Eckenrode
55bf8aa8c1
Revert "configd: fix build with clang 16"
This reverts commit 550137e330.
2023-11-12 10:45:22 -05:00
Randy Eckenrode
a678c55faf
darwin.mDNSResponder: patch header to match SDK
The upstream source release for 765.50.9 defines `_DNS_SD_LIBDISPATCH`
to `0` in `dns_sd.h`, but the SDK version of that header actually
defines it to `1`. Having it defined to `0` causes packages that expect
to use libdispatch-based symbols such as `DNSServiceSetDispatchQueue` to
fail to build. Define it to match the SDK to fix those packages.
2023-11-12 10:45:22 -05:00
Randy Eckenrode
940180423a
Merge pull request #265102 from reckenrode/darwin-corefoundation
darwin.stdenv: use CoreFoundation instead of CF
2023-11-11 12:10:10 -05:00
Randy Eckenrode
daa4cd2c2a
darwin.text_cmds: fix build with clang 16 2023-11-07 09:17:04 -05:00
Randy Eckenrode
080f7cc41e
darwin.configd: fix build with CoreFoundation 2023-11-02 17:45:59 -04:00
Randy Eckenrode
b810da025f
darwin.diskdev_cmds: fix build with clang 16
Fix an implicit `int` on argc, which is an error with newer clangs.
2023-10-27 08:40:47 -04:00
Randy Eckenrode
1974a25301
darwin.Libm: add missing function declarations
The patch in this commit is based on the SDK header, which has an ASPL
license header even though the updated header is not part of the source
distribution of Libm. Adding the missing declarations allows packages
such as jq, Ruby, and Guile to build without requiring an SDK that is
not built from the source releases.
2023-10-21 12:05:09 -04:00
Artturi
f42617f5b2
Merge pull request #243540 from reckenrode/adv_cmds-clang2 2023-08-01 07:29:25 +03:00
Artturin
afaab4f120 darwin.xnu: Fix stripDirs
`stripDirs: Ranlib command is empty`

Exposed by f46c8c1bcd
2023-07-23 14:50:40 +03:00
Randy Eckenrode
732e4469cb
darwin.adv_cmds: fix build with clang 16
darwin.Libc conflicts with libc++ 16. adv_cmds only needs `msgcat.h`, so
provide only that in `buildInputs` instead of all of Libc.
2023-07-14 17:27:16 -06:00
Randy Eckenrode
550137e330
configd: fix build with clang 16
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.
2023-06-30 08:54:26 -04:00
toonn
62f759132d
Merge pull request #237348 from reckenrode/darwin-libc-cleanup
darwin.Libsystem: fix existing file error during build
2023-06-20 17:20:45 +02:00
Randy Eckenrode
23cb6c155b
darwin.Libc: stop vendoring headers from other packages
A number of headers in Libc are being vendored from other packages.
Instead of copying them from an earlier Libc, Libsystem now sources them
from their respective packages (see below). This allows Libc_old to be
dropped and avoids any potential clashes when building Libsystem.

libmalloc:
* malloc/malloc.h

libplatform:
* setjmp.h
* ucontext.h
* libkern/OSAtomic.h
* libkern/OSCacheControl.h

libpthread:
* pthread*.h
* sched.h
* spawn.h

syslog (vendored because only one file is needed):
* asl.h

xnu:
* spawn.h (a different one from libpthread)
* libproc.h
2023-06-12 17:11:54 -04:00
Randy Eckenrode
a255182f56
darwin.Libsystem: get pthread headers from darwin.libpthread
Some of the headers are symlinked to the root `include` in upstream
Libsystem, so also symlink them there from `include/pthread`.
2023-06-12 09:15:29 -04:00
Randy Eckenrode
d2b670291f
darwin.Libsystem: get asl.h from upstream syslog sources 2023-06-12 09:15:29 -04:00
Randy Eckenrode
489ed84733
darwin.Libsystem: get malloc.h from darwin.libmalloc 2023-06-12 09:06:21 -04:00
Randy Eckenrode
81324e2ec3
darwin.libmalloc: add at 317.40.8 for the 11.0 SDK 2023-06-12 09:06:21 -04:00
Randy Eckenrode
a48c2d3e92
darwin.libmalloc: add at 116.50.8 2023-06-12 09:06:21 -04:00
Randy Eckenrode
2c149715fe
darwin.xnu: provide additional headers needed by Libsystem 2023-06-12 08:59:49 -04:00
toonn
b7ed52e26f
Merge pull request #235487 from reckenrode/system_cmds-clang-fix
darwin.system_cmds: fix build with clang 16
2023-06-11 20:14:59 +02:00
Randy Eckenrode
cd4ab1d9fd
darwin.system_cmds: fix build with clang 16
Clang 16 makes implicit declarations an error by default. The headers
are available, so include them.

`getline` was renamed to `get_line` to avoid a name clash. `util.h`
includes `stdio.h`, which defines `getline`.
2023-06-10 17:15:08 -04:00
toonn
501dcc2d3e
Merge pull request #234857 from reckenrode/configd-fix
configd: fix build with newer LLVM and bootstrap
2023-06-05 19:26:06 +02:00
Bernardo Meurer
1c31f7e109
Merge pull request #235052 from reckenrode/xnu-fix-mk2 2023-05-30 20:05:32 -04:00
Randy Eckenrode
1aa68d1d21
xnu: fix build with newer clang
Newer clangs require also including `-lc++abi` to build kextsymboltool.
2023-05-30 16:13:11 -04:00
Randy Eckenrode
56480a72c9
darwin.adv_cmds: fix implicit int, which is an error in clang 16 2023-05-29 16:27:13 -04:00
Randy Eckenrode
15da7dce6a
configd: fix build with newer LLVM and bootstrap
Clang 15 does not like the fake xpc headers. Use the real ones instead.
Doing this no longer causes an infinite recursion because xnu now
depends on python3Minimal, which does not include configd support.
2023-05-29 15:30:39 -04:00
Weijia Wang
12b91012e5 darwin.darling: drop 2023-04-25 22:45:59 +03:00
Weijia Wang
a02917d9da darwin.dtrace: get rid of darling 2023-04-25 22:30:55 +03:00
Weijia Wang
93cfea6d37
Merge pull request #225672 from reckenrode/adv_cmds-aarch64-darwin
adv_cmds: fix build on aarch64-darwin
2023-04-11 09:25:38 +03:00
Randy Eckenrode
85f94a09a8
adv_cmds: fix build on aarch64-darwin 2023-04-10 23:20:13 -04:00
Randy Eckenrode
3753dfe6a9
network_cmds: unconditionally exclude Unbound
This fixes build failures caused by LibreSSL 3.4 being marked insecure
and allows it to be dropped from nixpkgs. Unbound is already not built
on aarch64-darwin, and it is not bundled with newer source releases.

Packages that require Unbound should depend on `unbound` from nixpkgs
instead of getting it indirectly from `darwin.network_cmds`.
2023-04-02 20:59:49 -04:00
Vladimír Čunát
6f4400f8fd
darwin.Csu: disable parallel installing
https://hydra.nixos.org/log/s3ndn08vzhfr0zfylbwjqz8fijna4pjl-Csu-85.drv
2023-03-26 10:28:26 +02:00
Alyssa Ross
52c286ee5b
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/libraries/pmdk/default.nix
2023-02-23 13:51:34 +00:00
Artturin
6b2a05e190 treewide: manual fixups for
treewide: use toString on list NIX_CFLAGS_COMPILE
treewide: move NIX_CFLAGS_COMPILE to the env attrset
2023-02-22 21:23:04 +02:00
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
Artturin
6f6cc4a22d treewide: use toString on list NIX_CFLAGS_COMPILE
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
2023-02-22 21:23:04 +02:00
Winter
66f6a84904 darwin.apple_sdk.frameworks.IOKit: fix on x86_64-darwin
7abd144913 switched the source releases to
pull from GitHub. This resulted in the IOUSBFamily installation failing,
as the extracted directory's name changed from `IOUSBFamily-630.4.5` to
`IOUSBFamily-IOUSBFamily-630.4.5`. This didn't occur for any other frameworks
because we used wildcards for copying them already.
2023-02-12 19:30:40 -05:00
Weijia Wang
7abd144913 treewide: update darwin sdk hashes 2023-02-01 12:36:48 +01:00
Martin Weinelt
52029b8e00 Merge remote-tracking branch 'origin/master' into staging-next 2023-01-27 23:50:36 +01:00
Boey Maun Suang
fbaface6ff darwin.dtrace: Fix failing build
What dtrace needs from the CoreSymbolication private framework on Darwin
is provided in Nixpkgs by two different packages, but both of their full
attribute paths end in CoreSymbolication.

This commit therefore does two things:
- adds the second CoreSymbolication package to dtrace's dependencies;
  and
- adds an alias for the second CoreSymbolication package to avoid
  having to explicitly name or rename it when calling the dtrace
  package in the existing contexts.
2023-01-27 12:47:22 +11:00
github-actions[bot]
05972e9778
Merge staging-next into staging 2023-01-09 18:01:58 +00:00
Weijia Wang
9957ee5fd6 darwin: add usage to generate-sdk-packages.sh 2023-01-09 13:08:37 +01:00
Weijia Wang
2bd3048ea4 darwin: fix generate-sdk-packages.sh 2023-01-09 13:08:09 +01:00
Felix Bühler
1302f3bd27
apple-source-release: deprecate phases (#161535) 2023-01-07 17:20:01 -05:00
Artturin
7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00
Jiajie Chen
20447fd0dc darwin.network_cmds: fix build on aarch64-darwin
- Use network_cmds from macOS 11.0 packages
- Fix TARGET_OS_IPHONE error
- Disable unbound on aarch64-darwin
2022-07-24 09:53:59 +08:00
github-actions[bot]
4bff9bab6b
Merge staging-next into staging 2022-07-10 12:02:29 +00:00
Chen
8073a6fb09
darwin.xnu: fix build on aarch64-darwin (#179921)
- Use xnu from macOS 11.0 packages
- Patch iig related usage
- Add a new list of headers for arm64
2022-07-09 10:39:31 -04:00