From 6125d4d6aa561794d9fc6585c99abe68fe495701 Mon Sep 17 00:00:00 2001 From: edef Date: Tue, 23 Dec 2014 06:38:45 +0100 Subject: [PATCH] build library code as PIC --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 2c495a8..ae19fd3 100644 --- a/build.rs +++ b/build.rs @@ -18,7 +18,7 @@ fn main() { if let Some(basename) = eat_extension(filename, ".c") { outpath = format!("{}/{}.o", out_dir, basename); - Command::new("cc").args(&[filepath.as_slice(), "-c", "-o"]) + Command::new("cc").args(&[filepath.as_slice(), "-c", "-fPIC", "-o"]) .arg(outpath.clone()) .status().unwrap(); }