Upstream doesn't explicitly define riscv64 support, but it builds with the generic64 configuration. This mapping needs to be defined in the gentoo.config file. (Maybe this is only a problem with cross-compiling to RISC-V since the configure script defaults to the native architecture settings which breaks the build.) Reproducible: Always Steps to Reproduce: 1. emerge-riscv64-gentoo-linux-gnu openssl Actual Results: A lot of these failures: riscv64-gentoo-linux-gnu-gcc: error: unrecognized command line option '-m64' Expected Results: It should build and install. It works after adding this line. --- dev-libs/openssl/files/gentoo.config-1.0.2 +++ dev-libs/openssl/files/gentoo.config-1.0.2 @@ -104,6 +104,7 @@ powerpc64*) machine=ppc64;; powerpc*le*) machine="generic32 -DL_ENDIAN";; powerpc*) machine=ppc;; + riscv64*) machine=generic64;; # sh64*) machine=elf;; sh*b*) machine="generic32 -DB_ENDIAN";; sh*) machine="generic32 -DL_ENDIAN";;
It looks like we should also add "-DL_ENDIAN" to that since RISC-V is little-endian.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bbd887ff1dde5c69e81d6985e4d02c1eddb793b commit 3bbd887ff1dde5c69e81d6985e4d02c1eddb793b Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2020-04-02 14:55:31 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-04-02 14:55:31 +0000 dev-libs/openssl: handle riscv64 Closes: https://bugs.gentoo.org/715908 Signed-off-by: Mike Gilbert <floppym@gentoo.org> dev-libs/openssl/files/gentoo.config-1.0.2 | 1 + 1 file changed, 1 insertion(+)