Skip to content

Commit aff068a

Browse files
committed
Auto merge of #1519 - alfiedotwtf:master, r=alexcrichton
Currently getting: note: /usr/bin/ld: /home/alfie/tmp/test/target/debug/build/test-39af07f97c17512a/out/libhello.a(hello.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
2 parents ce18780 + 662df8e commit aff068a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/build-script.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ fn main() {
312312
313313
// note that there are a number of downsides to this approach, the comments
314314
// below detail how to improve the portability of these commands.
315-
Command::new("gcc").args(&["src/hello.c", "-c", "-o"])
315+
Command::new("gcc").args(&["src/hello.c", "-c", "-fPIC", "-o"])
316316
.arg(&format!("{}/hello.o", out_dir))
317317
.status().unwrap();
318318
Command::new("ar").args(&["crus", "libhello.a", "hello.o"])

0 commit comments

Comments
 (0)