dgilmore changed the topic of #fedora-riscv to: Fedora on RISC-V https://fedoraproject.org/wiki/Architectures/RISC-V || Logs: https://libera.irclog.whitequark.org/fedora-riscv || Alt Arch discussions are welcome in #fedora-alt-arches
count42 has quit [Remote host closed the connection]
<Entei[m]> davidlt: GCC rebuilding was successful, but inspecting the gcc binary with objdump, I still see compressed instructions....
<davidlt[m]> That's probably fine.
<Entei[m]> The runtime object files such as crti.o tell a different story though, they are properly tagged with imafd only
<davidlt[m]> This is a tool chain without bootstrap built using system compiler with incl. C.
<davidlt[m]> But the current compiler defaults to non C and runtime bits don't incl. C.
<Entei[m]> davidlt[m]: So, say I replace the system gcc with this rebuilt gcc, I should get non-C binaries?
<davidlt[m]> Try compiling a tiny package like zlib with a new compiler.
<davidlt[m]> Inspect it.
<davidlt[m]> Pick small things from the core group of packages that don't have a lot (or at all) dependencies and inspect them.
<Entei[m]> How should I go about replacing the compiler? Just force install with rpm, or remove the current gcc first?
<davidlt[m]> You will still need to do a full bootstrap tookchain, but this was the quick way to check things before committing even more time.
<davidlt[m]> I would copy out RPMs and test it on a clean VM.
<davidlt[m]> To avoid breaking existing VM and somehow losing your work.
jcajka has joined #fedora-riscv
<rwmjones> morning
<rwmjones> gonna set up my super-qemu VM today
<rwmjones> running on 7950X
<Entei[m]> Upgraded gcc with my rebuilt gcc rpms.... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/8259e905aa3663821f0baaf56378d0d7cd0c1a87>)
<davidlt[m]> Oh, you probably also need to change default in binutils.
<Entei[m]> So what should be my next rebuild target? zlib or glibc ?
<davidlt[m]> Hm... Actually I don't know.
<davidlt[m]> In general you should not trust Tag_RISCV_arch
<Entei[m]> davidlt[m]: Oh. I'll do an objdump then
<davidlt[m]> I don't recall the details, but it's broken so much that it got disabled in kernel on the binutils
<Entei[m]> objdump also shows quite a few compressed instructions in the simple code's binary
<davidlt[m]> In the object file?
<davidlt[m]> Or the final binary?
<Entei[m]> davidlt[m]: final elf.
<davidlt[m]> Recompile binutils too.
<davidlt[m]> Use --with=-arch=ISA to change the default.
<Entei[m]> davidlt[m]: With my rebuilt gcc or the defaults Rawhide ships with? Both should work if I am not wrong, but mine is probably considered testing
<davidlt[m]> With rebuild GCC. And disable %check for now in binutils spec. We just need to test and verify everything.
<davidlt[m]> We just need to make sure that things seem to be OK, and you aren't wasting too much time on something that might not work.
<davidlt[m]> You will still need to do a bootstrap GCC, etc. which will take quite some time.
<davidlt[m]> You might be able to speed up things without emulating full system under QEMU, running it in the user mode IIRC. I haven't used this setup in a long time.
<Entei[m]> davidlt[m]: So if I am able to get working binutils and other core packages like zlib working properly with the rebuilt gcc, I should be good to do a bootstrap GCC, right?
<davidlt[m]> Yes
<davidlt[m]> Just be cautious on every step, validate, etc. before going full speed.
<Entei[m]> davidlt[m]: Damn so no more RISCV_Tag from kernel 6.4 onwards huh?
<davidlt[m]> At least no in the kernel build.
<Entei[m]> Is binutils as big a package? Should 8 cores be enough? Remaining 16 cores are being utilised by others on the server right now
<davidlt[m]> It's pretty fast.
<davidlt[m]> Last build took almost 4 hours on a physical board (incl. tests).
<Entei[m]> Ok so a pretty small package. Thanks
<davidlt[m]> I am preparing to rebuild the whole R ecosystem this morning.
<Entei[m]> <davidlt[m]> "I am preparing to rebuild the..." <- Wishing you luck and fast builds
<Entei[m]> Is there any need to modify the spec file for binutils package? I only see CARGS as possible modifiable parameter, and I don;t think I need to add -march=ISA to it, since it's a native build. It should pick up from gcc?
<davidlt[m]> No
<davidlt[m]> Check binutils documentation.
<davidlt[m]> --with-arch=ISA is what you want.
<davidlt[m]> Probably GCC would pass that over, and you could check how linker and assembler are invoked at least on CLI level.
<davidlt[m]> But changing the default (which we already did on GCC side) just makes life easier.
<Entei[m]> <davidlt[m]> "Probably GCC would pass that..." <- I understand how `as` and `ld` work. Didn't know they were part of binutils package.
fuwei has joined #fedora-riscv
zsun has joined #fedora-riscv
zsun has quit [Quit: Leaving.]
jcajka has quit [Quit: Leaving]
ahs3 has quit [Ping timeout: 268 seconds]
ahs3 has joined #fedora-riscv
fuwei has quit [Remote host closed the connection]