From 738baca8657cd6d69beb4783ff922dfa9a64b9ce Mon Sep 17 00:00:00 2001 From: Siva Chandra Reddy Date: Tue, 2 Apr 2019 10:18:01 -0700 Subject: [PATCH] Enable relaxed relocations when building certain object files for x86_64. --- sysdeps/x86_64/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index 049f8914fe..18b82e2428 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -6,6 +6,9 @@ ifeq ($(with-clang),yes) # allowed. (-mavx512 is the preferred option but does not work in 5.0) ASFLAGS-.o += -march=knl ASFLAGS-.os += -march=knl +# We want clang to generate relaxed relocations so that they can work with +# static-pie as well. +ASFLAGS-.o += -Wa,-mrelax-relocations=yes endif ifeq ($(subdir),csu)