I'm trying to compile on Linux using the xPack gcc toolchain. However, I get a bunch of errors at the end of linking. I tried adding -fPIC to the cc flags and recompiling but that doesn't help.
[LD] vmx
/usr/bin/ld: ./vmm_trap.o: relocation R_X86_64_32S against symbol `offset_of_vmm_stack' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translation.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_arithmetic_immediate.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_branch.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_fence.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_memory_load.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_privileged_instr.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_arithmetic.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_multiplication_and_division.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_memory_store.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./csr_representation.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_amo.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_unconditional_jump_intrs.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
I'm trying to compile on Linux using the xPack gcc toolchain. However, I get a bunch of errors at the end of linking. I tried adding -fPIC to the cc flags and recompiling but that doesn't help.