Commit 3c85c535 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

make/x86: get cflags for ia32 from compel tool

  I think, we could transpher also `-m elf_i386' and `-m32' to
compel output - but only in case if we will not support
native x86_32 in compel (as they are wrong for native build).
Or introduce something like compat_ia32 in compel option, not sure.
Left in makefile for a while.
  Also it would be good to remove $(LD_R) in makefile and use
compel output for ldflags, but that will be valid only when compel
will support arm arch.

Fixes (with the following patches):
  GEN      criu/pie/parasite-compat-blob.h
parasite_compat_blob: Error (compel/handle-elf-32.c:322): Unexpected undefined symbol: `__stack_chk_fail'. External symbol in PIE?

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent ec58dcab
......@@ -58,11 +58,14 @@ CFLAGS += -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0
ccflags-y += -DCR_NOGLIBC
ifneq ($(filter-out clean mrproper,$(MAKECMDGOALS)),)
NATIVE_CFLAGS := $(shell $(SRC_DIR)/compel/compel --arch=$(ARCH) cflags)
ifeq ($(ARCH),x86)
COMPAT_CFLAGS := $(shell $(SRC_DIR)/compel/compel --arch=ia32 cflags)
endif
endif
ifeq ($(ARCH),x86)
NATIVE_CFLAGS += -DCONFIG_X86_64
COMPAT_CFLAGS += -fno-pic -m32 -DCONFIG_X86_32
COMPAT_CFLAGS += -m32 -DCONFIG_X86_32
COMPAT_LDFLAGS += -m elf_i386
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