Running tests on NixOS #832
Replies: 3 comments 4 replies
-
Sounds like some good progress :) If you'd like me to take a look, would you like to add |
Beta Was this translation helpful? Give feedback.
-
I've got a proposed fix for the segfault - #843 I looked also at the failure of libc_integration, which was failing for the config
Wild converted the TLS access to local exec, wheas GNU ld only converted to initial exec. This is interesting, because on my laptop, which has a substantially older version of GNU ld, it performs the same optimisation as we do (local exec). One thing that I sometimes do in cases like this is to enable linking with lld in the test. liker-diff will then accept what wild does, so long as it matches either GNU ld or lld. I made that change in #844 |
Beta Was this translation helpful? Give feedback.
-
I wired up Wild so you can use it like any other linker with Nix. I'll make a draft nixpkgs PR that is blocked on 0.6.0 (and 1.87 in nixpkgs) for here in a moment. Has tests that build GNU Hello with Clang & GCC. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
NixOS is not known for being friendly to linkers. In has tons of hacks and gcc and ld wrappers to make it work. As such, tests don't execute easily.
I've been trying to get wild tests to run successfully on NixOS.
I'll collect findings here.
So far I have, after a lot of experimentation, written up this
shell.nix
:With #831 applied, all tests except two pass:
For
tlsdesc.c
, the binary segfaults with wild (but not with BFD). I haven't investiated that failure.libc-integration.c
fails to link the binary withld
andclang-static
, which indicates missing glibc static binaries.Adding
buildInputs = [ pkgs.glibc.out pkgs.glibc.static ];
to the shell causes new failures though (some assembly relocation diff).Beta Was this translation helpful? Give feedback.
All reactions