| 11 Jan 2024 |
| Digital Pirate removed their display name Digital Pirate. | 17:31:44 |
| Digital Pirate left the room. | 17:31:48 |
| 16 Jan 2024 |
| lexea joined the room. | 03:28:03 |
| 17 Jan 2024 |
| felschr left the room. | 17:48:59 |
| 21 Jan 2024 |
fgaz | In reply to @fgaz:matrix.org Now, how do I generate a bootstrap tarball and who do I ping to get it uploaded to tarballs.nixos.org? This doesn't seem to be documented anywhere Merged 🎉 https://github.com/NixOS/nixpkgs/pull/282517 | 19:34:52 |
Alex | In reply to @fgaz:matrix.org Merged 🎉 https://github.com/NixOS/nixpkgs/pull/282517 Nice, now I no longer need an ugly hack to build everything with RV64GC_Zba_Zbb (old bootstrap's GCC was too old). | 19:40:47 |
| 23 Jan 2024 |
rdg | hi, I'm building a RISC-V NixOS system for qemu without compressed instructions using this overlay http://sprunge.us/SzNRff that injects -march=rv64g via NIX_CFLAGS_COMPILE_riscv64_unknown_linux_gnu | 11:24:36 |
rdg | to ensure there are no compressed instructions I enabled a trap in QEMU that aborts if a compressed instruction is used | 11:25:04 |
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 |
rdg | it is injected before not after the original flags | 15:34:03 |
Alex | In reply to @rdg:matrix.org https://github.com/NixOS/nixpkgs/blob/15ff1758e7816331033baa14eebbea68626128f3/pkgs/build-support/cc-wrapper/default.nix#L601 I think it's because isGccArchSupported "rv64g" is false and you have to patch nixpkgs so that it doesn't think the arch isn't supported.
That whole function is a nightmare for RISC-V's highly customisable ISA... | 15:55:39 |
rdg | the flag arrives to cc-cflags-before | 15:57:33 |
rdg | the problem is that some packages inject their own -march, overriding it | 15:57:55 |
rdg | that's why I used NIX_CFLAGS_COMPILE_riscv64_unknown_linux_gnu, as it gets added after | 15:58:20 |
rdg | but it doesn't work for musl (required for the security wrappers) or rust | 15:58:48 |
Alex | In reply to @rdg:matrix.org the problem is that some packages inject their own -march, overriding it Oh, I think I might have encountered one of those.
But I didn't really need it, so I replaced it with a package that worked (or patched it? I can't remember). | 15:59:10 |
rdg | I'm testing with gcc.arch again, and I will see if I can instead patch the broken packages | 15:59:39 |
rdg | as it seems to be a better solution | 15:59:56 |
| Guilhem left the room. | 16:00:23 |
Alex | Don't forget to look at the wiki page linked in the room description and update it if you find anything new. ^.^ | 16:00:58 |
| 26 Jan 2024 |
rdg | Using gcc.arch = "rv64g" works mostly okay, except for security wrappers that are compiled with pkgsStatic and the flag is not propagated there | 13:48:56 |
rdg | I had to also modify the kernel configuration to disable EFI | 13:49:21 |