[PATCH] rust: Allow reusing locally installed gpio library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The rust crates builds fine when built with the 'make' command, as
static linking works fine. But when referenced from a remote rust crate,
it gives following error:

error: could not find native static library `gpiod`, perhaps an -L flag is missing?

This happens since we only support 'static' LIB-KIND currently. Remove
the same to allow others to work too.

Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
---
 bindings/rust/libgpiod-sys/build.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bindings/rust/libgpiod-sys/build.rs b/bindings/rust/libgpiod-sys/build.rs
index 274069eb9e9d..e3ed04afa141 100644
--- a/bindings/rust/libgpiod-sys/build.rs
+++ b/bindings/rust/libgpiod-sys/build.rs
@@ -37,5 +37,5 @@ fn main() {
     generate_bindings();
 
     println!("cargo:rustc-link-search=./../../lib/.libs/");
-    println!("cargo:rustc-link-lib=static=gpiod");
+    println!("cargo:rustc-link-lib=gpiod");
 }
-- 
2.31.1.272.g89b43f80a514




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux