How to compile qemu with openssl
I need to use the SHA functions in migration/ram.c, and I have included the head file
#include <openssl/sha.h>
Furthermore, I need to use flags "-lssl" and "-lcrypto" when compile qemu, could anyone please tell me where to add these two flags?
Thanks,
Chunguang
--
Quoted 6 lines · Chunguang Li
I need to use the SHA functions in
migration/ram.c, and I have included the head file
#include <openssl/sha.h>
Furthermore, I need to use flags "-lssl" and "-lcrypto" when compile qemu, could anyone please tell me where to add these two flags?
There are "--extra-ldflags" and "--extra-cflags" options in ./configure, where you can add "-lssl" and "-lcrypto" to the compiling command lines.
If you are adding a feature to QEMU instead of experimenting, you should modify ./configure to add a new pair of "--enable-XXXX" and "--disable-XXXX" options. For example, refer to how the "--enable-libiscsi" pair is handled in configure script. Particularly, features are automatically enabled if neither --enable-XXX nor --disable-XXX is specified but the library package dependencies are actually satisfied.
Fam
Quoted 10 lines
Thanks,
Chunguang--
Quoted 6 lines · Fam Zheng
If you are adding a feature to QEMU instead of experimenting, you should modify ./configure to add a new pair of "--enable-XXXX" and "--disable-XXXX" options. For example, refer to how the "--enable-libiscsi" pair is handled in configure script. Particularly, features are automatically enabled if neither --enable-XXX nor --disable-XXX is specified but the library package dependencies are actually satisfied.
We probably don't really want to add a feature that links against OpenSSL anyway -- their FAQ suggests it is GPL-incompatible:
https://www.openssl.org/docs/faq.html#LEGAL2
(disclaimer: based on a vague recollection of there being an issue and 30 seconds googling)
thanks
-- PMM