-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
WIP: GCC with separated runtime libraries #132343
base: master
Are you sure you want to change the base?
Conversation
Taking a bunch of stuff from 11 packages
* `builtins.attrNames gccNgPackages_11` now evaluates * Added missing inputs * Removed a bunch of clang-related things - clang-only packages: compiler-rt, libcxx, libcxxabi, openmp - useLLVM logic - stdenvs / cc-wrappers which are not applicable anymore * Removed LLVM-specific relics like the default callPackage bindings, clean up default callPackage scopes for libraries and tools * Add runtime libraries (may forgot some) to libraries set
Oh no, I forgot to push my stuff! I'll merge. Actually comments won't be too bad. |
Create patch so that thread model can be specified explicitly rather than being inferred from GCC.
There is a still a build failure, but I am going to just use Musl and ignore this for now.
Unfortunately, libstdcxx doesn't link, evidentally because inconsistent `-fPIC`.
mkdir -p "$out/lib" "$dev/include" | ||
ln -s "$out/lib/gcc/${stdenv.hostPlatform.config}/${version}"/* "$out/lib" | ||
ln -s "$dev/lib/gcc/${stdenv.hostPlatform.config}/${version}/include"/* "$dev/include/" | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meta is missing.
I marked this as stale due to inactivity. → More info |
Unmark stale |
Hi, It is a bummer that this sort of fell by the wayside. I just wanted to mention that enabling the goals of this PR is one of the major benefits sought by #209870. Specifically, if that PR merges, my next project will be to start moving the libraries that are bundled with gcc into separate packages -- like this PR, but one at a time, and incrementally rather than in a big rewrite. I would like to reuse as much of the work here as possible. |
https://github.com/Ericson2314/nixpkgs/tree/gcc-ng-12 This was me trying to update this to a new GCC. |
@amjoseph-nixpkgs #132343 (comment) it is a bummer, and I would love to pair with you on this to get it over the hill at some point. there was just some things I was banging my head against the wall debugging that I need another pair of eyes on. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-10-31-nixpkgs-architecture-team-meeting-45/34846/1 |
Motivation for this change
Opening bare bones PR to collaborate on #132340
cc @Ericson2314 @sternenseemann
Things done
All cross compilation from
x86_64-unknown-linux-{gnu,musl}
. Plug in the config in--crossSystem "{ config = \"$config\"; useGccNg = true; }"
buildPackages.gccNgPackages.gcc-unwrapped
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
gccNgPackages.libgcc
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
libcCross
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
gccNgPackages.libatomic
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
gccNgPackages.libstdcxx
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
-fPIC
and-fno-PIC
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)Upstream patches
Prefixed binaries in
-B
dirsThread model specified per lib