They are not doing anything right now. This is in preparation for their
complete removal from the tree.
Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.
Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
`gcc-14.3.0` will likely release around the end of April
(https://gcc.gnu.org/develop.html) which is a bit late for
nixos-25.05 release.
We can update to `gcc-14.3.0` after a branch-off, but let's
make the delca smaller by picking the current snapshot.
While at it:
- fix `flex` dependency propagation and use it for snapshots
- fix `version` to always contain the base version as
cc-wrapper constructs paths to libraries based in `version`
attribute
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
In libgcc.nix, `targetPlatformSlash` is set by checking if hostPlatform == targetPlatform.
In default.nix, `targetConfig` (which is also going to be part of the path) is also set by checking if hostPlatform == targetPlatform.
However, in common.nix, the recently added `isCross` is set by checking if hostPlatform.config == targetPlatform.config.
This means that for platforms like '-nolibc' the paths in common.nix are not set up correctly for libgcc.nix to find and move libgcc_s.so .
Changing isCross to also check hostPlatform == targetPlatform fixes this issue.
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev 78e9caf153
result/bin/apply-formatting $NIXPKGS_PATH
I think this was a rebase mishap and causes a ton of rebuilds.
Not sure if we actually need the Darwin condition any more (or to be
using the older `isl` version?), but `master` isn’t the place to
find out :)
Fixes: 90474914ee
When `gcc` is cross-built (`build` != `target` && `host` == `target`)
`gcc` assumes that it has a compatible cross-compiler in the environment
that can build target libraries. Version of a cross-compiler has to
match the compiler being cross-built as libraries frequently use fresh
compiler features, like `-std=c++26` or target-specific types like
`_Bfloat16`.
Version mismatch causes build failures like:
https://github.com/NixOS/nixpkgs/issues/351905
Similar problems (but on a smaller scale) happen when a `gcc`
cross-compiler is built (`build` == `host` && `host` != `target`) built
by a mismatching version of a native compiler (`build` == `host` &&
`host` == `target`). That was worked around by forcing `gcc9Stdenv` for
older compiler versions.
Let's fix both problems by requiring the same compiler version for
cross-case.
Closes: https://github.com/NixOS/nixpkgs/issues/351905
Those would be problematic with __structuredAttrs turned on, because
they'd turn those nice bash arrays back into strings - and potentially
lose some of the values on the way.
Release branch from 6½ years ago, no update in 3½ years, unsupported
upstream, and unused in tree.
This finally resolves the tangled conditionals in `all.nix`, albeit in
a way I assume amjoseph wouldn’t have been too fond of. `default.nix`
still has some gnarly stuff in there. So it goes…
The stable release has too many AArch64 issues, but they seem to
have been fixed upstream; Arch is shipping a Git snapshot. The next
stable release should be out by the time 25.05 is finishing up,
so this should be okay as a temporary solution.
This is the GCC 14-20241116 snapshot. We use that identifier as our
package version, diverging from our usual unstable version convention,
because it identifies itself as “gcc (GCC) 14.2.1 20241116” and
comes in `gcc-14-20241116.tar.xz`; 20241116 is therefore a useful
version identifier to use verbatim, and 14.2.0-unstable-2024-11-16
would potentially be confusing for a version that calls itself
14.2.1. The next stable release from the GCC 14 branch will be 14.3.0,
so there should be no ambiguity here.
Getting this version is a little complicated; we need the precompiled
`flex(1)` output that these Git snapshots don’t include. Thankfully,
the source file hasn’t changed since 14.2.0, so we can simply
download 14.2.0 too and extract the precompiled file. A little
merging finesse is required for the `aarch64-darwin` patch, which we
also upgrade.
The GCC bootstrap builds each stage with an unwrapped GCC, which needs
to correctly handle looking for libraries and headers in sysroot.
Setting the native header folder to `/usr/include` will actually cause
GCC to search `<sysroot>/usr/include`, which is the SDKROOT in nixpkgs.
The original logic was prepending to the array, but this one prepends
the array to itself, which breaks the x86_64-linux stdenv bootstrap. The
correct thing to do is build up the arguments in a temporary array and
prepend it like the original code was doing.
https://github.com/NixOS/nixpkgs/pull/328380 updated `gcc11` from
`11.4.0` to `11.5.0` but the darwin patch was not ready then. Let's
update it in hopes that it fixed `darwin` build.