build library code as PIC

master
edef 2014-12-23 06:38:45 +01:00
parent e9d6146b5b
commit 6125d4d6aa
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}