| 23 Jan 2024 |
rdg | it boots fine and reaches userspace, but there is a problem in libgcc_s.so, which causes a SIGILL | 11:25:32 |
rdg | I'm not sure if this method works for libgcc_s as it may end up being built by the new compiler, ignoring my -march hack | 11:27:04 |
rdg | any ideas? | 11:27:33 |
Alex | In reply to @rdg:matrix.org any ideas? Have you tried setting gcc.arch in the targetSystem option for nixpkgs?
I'd share some specific code, but I can't find it. I think it might only be on my RISC-V system. | 13:07:12 |
Alex | In reply to @rdg:matrix.org any ideas? If you're compiling natively (YMMV for cross-compilation), the following should work, since it seems to be used by all gcc compilers, including when compiling gcc itself from the bootstrap gcc.
nixpkgs.config.gcc.arch = "rv64g";
| 13:20:24 |
Alex | * If you're compiling natively (YMMV for cross-compilation), the following should work, since it seems to be used by all gcc compilers, including when compiling gcc itself from the bootstrap gcc.
nixpkgs.localSystem.gcc.arch = "rv64g";
| 13:20:53 |
rdg | Alex: I'm cross compiling, so I tried adding it in the nixpkgs.crossSystem.gcc.arch but I don't see it with NIX_DEBUG=1 being added anywhere | 13:27:30 |
rdg | for native compilation we had successfully used nixpkgs.localSystem.gcc.arch in other tests | 13:28:13 |
rdg | https://github.com/NixOS/nixpkgs/blob/15ff1758e7816331033baa14eebbea68626128f3/pkgs/build-support/cc-wrapper/default.nix#L601 | 15:33:44 |