Commit 254094d6 authored by Michael Holzheu's avatar Michael Holzheu Committed by Pavel Emelyanov

s390: Prevent GOT relocations

Use the "-fno-optimize-sibling-calls" gcc option to prevent GOT relocations
caused by gcc versions without the commit "S/390: Fix 64 bit sibcall":

 * https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=233169

Otherwise we get compile errors like:

 GEN      criu/pie/parasite-blob.h
 Error (compel/src/lib/handle-elf-host.c:572):
 Unsupported relocation of type 26

Those can be caused by the following relocation types:

 * R_390_GOTENT (e.g. RHEL7 based systems)
 * R_390_GOTPCDBL (e.g. Debian Jessie)
 * R_390_GOT12 (e.g. Debian Jessie)
Signed-off-by: 's avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 6603b419
...@@ -71,10 +71,12 @@ compel-install-targets += compel/$(LIBCOMPEL_SO) ...@@ -71,10 +71,12 @@ compel-install-targets += compel/$(LIBCOMPEL_SO)
compel-install-targets += compel/compel compel-install-targets += compel/compel
compel-install-targets += $(compel-plugins) compel-install-targets += $(compel-plugins)
# We assume that compel code does not change floating point registers. #
# On s390 gcc uses fprs to cache gprs. Therefore disable floating point # Also ensure with -fno-optimize-sibling-calls that we don't create GOT
# with -msoft-float. # (Global Offset Table) relocations with gcc compilers that don't have
# commit "S/390: Fix 64 bit sibcall".
#
ifeq ($(ARCH),s390) ifeq ($(ARCH),s390)
CFLAGS += -msoft-float CFLAGS += -msoft-float -fno-optimize-sibling-calls
HOSTCFLAGS += -msoft-float HOSTCFLAGS += -msoft-float -fno-optimize-sibling-calls
endif endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment