[PATCH] arm64: Set -fno-PIC along with -mcmodel=large

David Michael david.michael at coreos.com
Sun Jan 7 08:26:57 PST 2018


As seen in GCC's gcc/config/aarch64/aarch64.c, -fPIC with large
code model is unsupported.  This fixes the "sorry, unimplemented"
errors when building with compilers defaulting to -fPIC.
---

Hi,

I'm hitting this error with 2.0.16 on Gentoo:

purgatory/arch/arm64/entry.S:1:0: sorry, unimplemented: code model 'large' with -fPIC

This change fixes it.  Can something like this be applied?

Thanks.

David


 purgatory/arch/arm64/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/purgatory/arch/arm64/Makefile b/purgatory/arch/arm64/Makefile
index 636abea..80068ca 100644
--- a/purgatory/arch/arm64/Makefile
+++ b/purgatory/arch/arm64/Makefile
@@ -1,6 +1,7 @@
 
 arm64_PURGATORY_EXTRA_CFLAGS = \
 	-mcmodel=large \
+	-fno-PIC \
 	-fno-stack-protector \
 	-fno-asynchronous-unwind-tables \
 	-Wundef \
-- 
2.14.3




More information about the kexec mailing list