how to crosscompile openssl for riscv64

953 views
Skip to first unread message

nandeesh v

unread,
Jan 14, 2018, 11:49:16 PM1/14/18
to RISC-V SW Dev
I am trying to to run openssl benchmarks using riscv-llvm compiler. I don't know how to cross-compile for riscv-64 llvm. The installation manual says as below:


1a. Configure OpenSSL for your operation system automatically:

       $ ./config [options]

     This guesses at your operating system (and compiler, if necessary) and
     configures OpenSSL based on this guess. Run ./config -t to see
     if it guessed correctly. If you want to use a different compiler, you
     are cross-compiling for another platform, or the ./config guess was
     wrong for other reasons, go to step 1b. Otherwise go to step 2.

     On some systems, you can include debugging information as follows:

       $ ./config -d [options]

 1b. Configure OpenSSL for your operating system manually

     OpenSSL knows about a range of different operating system, hardware and
     compiler combinations. To see the ones it knows about, run

       $ ./Configure

     Pick a suitable name from the list that matches your system. For most
     operating systems there is a choice between using "cc" or "gcc".  When
     you have identified your system (and if necessary compiler) use this name
     as the argument to ./Configure. For example, a "linux-elf" user would
     run:

       $ ./Configure linux-elf [options]

     If your system is not available, you will have to edit the Configure
     program and add the correct configuration for your system. The
     generic configurations "cc" or "gcc" should usually work on 32 bit
     systems.

     Configure creates the file Makefile.ssl from Makefile.org and
     defines various macros in crypto/opensslconf.h (generated from
     crypto/opensslconf.h.in).


But the Configure file is huge and I don't know where and how to include the compilation command of riscv-llvm "riscv64-unknown-elf-gcc". Please help me to generate libcrypto.a for riscv.

Sadullah Canakci

unread,
Jan 14, 2018, 11:55:41 PM1/14/18
to nandeesh v, RISC-V SW Dev
 I don't know where and how to include the compilation command of riscv-llvm "riscv64-unknown-elf-gcc"

To include compilation command, you can try this:

CC=riscv64-unknown-elf-gcc ./configure

Please help me to generate libcrypto.a for riscv.

I have libcrypto.a for riscv, I do not know whether it will work for you but I am happy to share if you want to try.

Sadullah



--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/0eed0773-b7b2-4d91-a9a1-8e2450eb2910%40groups.riscv.org.

Reply all
Reply to author
Forward
0 new messages