This avoids duplicating the contents of SYSTEM_LD from kern.pre.mk just to add the -N flag to it. If the basic linker command ever needs to be changed, this will be one less place that has to be found and fixed.
- Group Reviewers
- rS356077: For riscv kernel builds, add -N to LDFLAGS instead of replacing the
Not tested at all, could a riscv person please test this?
Just an update to note that the commit for this was reverted in r356078 due to CI build failures. I'm unable to install a working riscv toolchain for building and testing myself, apparently at least in part because I'm still running 12.0-stable (and if I try to upgrade from that my video card turns into a pumpkin).
Adding -Bdynamic to LDFLAGS fixes the compile issue with the GCC toolchain.
If you are able, can you send me the error you get while trying to build using 12.0-stable? You should be able to build riscv using any supported FreeBSD version.