fixing linking issue on qemu build (#990)
* fixing linking issue * insteading of linking lib we dont use. just disable them * fixing the keyutils problem Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
This commit is contained in:
parent
17cb317429
commit
3345727c94
@ -9,7 +9,13 @@ readme = "./README.md"
|
|||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
keywords = ["fuzzing", "qemu", "instrumentation"]
|
keywords = ["fuzzing", "qemu", "instrumentation"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
categories = [
|
||||||
|
"development-tools::testing",
|
||||||
|
"emulators",
|
||||||
|
"embedded",
|
||||||
|
"os",
|
||||||
|
"no-std",
|
||||||
|
]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
slirp = [] # build qemu with host libslirp (for user networking)
|
slirp = [] # build qemu with host libslirp (for user networking)
|
||||||
@ -22,3 +28,4 @@ cc = "1.0"
|
|||||||
which = "4.2"
|
which = "4.2"
|
||||||
json = "0.12"
|
json = "0.12"
|
||||||
shell-words = "1.1"
|
shell-words = "1.1"
|
||||||
|
pkg-config = "0.3.26"
|
||||||
|
@ -266,7 +266,9 @@ pub fn build(
|
|||||||
.arg("--disable-xen")
|
.arg("--disable-xen")
|
||||||
.arg("--disable-xen-pci-passthrough")
|
.arg("--disable-xen-pci-passthrough")
|
||||||
.arg("--disable-xkbcommon")
|
.arg("--disable-xkbcommon")
|
||||||
.arg("--disable-zstd");
|
.arg("--disable-zstd")
|
||||||
|
.arg("--disable-capstone")
|
||||||
|
.arg("--disable-sndio");
|
||||||
if cfg!(feature = "debug_assertions") {
|
if cfg!(feature = "debug_assertions") {
|
||||||
cmd.arg("--enable-debug");
|
cmd.arg("--enable-debug");
|
||||||
}
|
}
|
||||||
@ -400,6 +402,9 @@ pub fn build(
|
|||||||
println!("cargo:rustc-link-lib=glib-2.0");
|
println!("cargo:rustc-link-lib=glib-2.0");
|
||||||
println!("cargo:rustc-link-lib=stdc++");
|
println!("cargo:rustc-link-lib=stdc++");
|
||||||
println!("cargo:rustc-link-lib=z");
|
println!("cargo:rustc-link-lib=z");
|
||||||
|
// if keyutils is available, qemu meson script will compile code with keyutils.
|
||||||
|
// therefore, we need to link with keyutils if our system have libkeyutils.
|
||||||
|
let _ = pkg_config::Config::new().probe("libkeyutils");
|
||||||
|
|
||||||
if !is_usermode {
|
if !is_usermode {
|
||||||
println!("cargo:rustc-link-lib=pixman-1");
|
println!("cargo:rustc-link-lib=pixman-1");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user