https://bugzilla.redhat.com/show_bug.cgi?id=2154514
--- Comment #6 from Maxwell G maxwell@gtmx.me --- I should be able to help review whichever package we want to go forward with.
Mike, note that the current config.mk is incorrect. The <ARCH>_AS, <ARCH>_CC, and <ARCH>_LD are used for cross compilation (hare has builtin support for cross compilation similar to go) and should be set to the appropriate binaries from cross-binutils and cross-gcc. See https://harelang.org/blog/2022-09-06-cross-builds-with-hare/.
``` AARCH64_AS = aarch64-linux-gnu-as AARCH64_CC = aarch64-linux-gnu-gcc AARCH64_LD = aarch64-linux-gnu-ld
RISCV64_AS = riscv64-linux-gnu-as RISCV64_CC = riscv64-linux-gnu-gcc RISCV64_LD = riscv64-linux-gnu-ld
<NATIVE_ARCH>_AS = as <NATIVE_ARCH>_CC = cc <NATIVE_ARCH>_LD = ld ```
You can look at Alpine's packaging for an example [1]. There is a separate config.${arch}.mk file for each architecture. `${arch}_<TOOL>` is always set to `<TOOL>` in `config.${arch}.mk` and then `<OTHER_ARCH>-<TOOL>` are set to the binaries from cross-binutils / cross-gcc.
I would add best-effort support for riscv64 to the package as well for the sake of the Fedora RISCV project.
You don't need the `%global elbuild` thing. Just run `%set_build_flags` unconditionally.
[1]: https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/hare