Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 715908 - dev-libs/openssl: support RISC-V
Summary: dev-libs/openssl: support RISC-V
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-02 14:37 UTC by David Michael
Modified: 2020-04-02 14:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2020-04-02 14:37:20 UTC
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";;
Comment 1 Mike Gilbert gentoo-dev 2020-04-02 14:47:18 UTC
It looks like we should also add "-DL_ENDIAN" to that since RISC-V is little-endian.
Comment 2 Larry the Git Cow gentoo-dev 2020-04-02 14:56:34 UTC
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(+)