mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +00:00
compel: no -r for ARM ldflags
Commit d9486bd720
("arm/pie/build: do not produce relocatable parasite
object") removed -r from LDFLAGS used to compile criu pie. This
functionality somehow never made it to criu-dev, and was also lost
in master then compel was ported to it.
Make it work with compel.
Unfortunately it was not as simple as I initially thought, as -r flag
to ld was built into nmk. This patch removes it, and adds it to all
places that need intermediate linking.
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
8b99809a4e
commit
f62818d9ad
@@ -11,6 +11,7 @@ ccflags-y += -iquote compel/arch/$(ARCH)/src/lib/include
|
||||
ccflags-y += -iquote compel/include
|
||||
ccflags-y += -fno-strict-aliasing
|
||||
ccflags-y += -fPIC
|
||||
ldflags-y += -r
|
||||
|
||||
#
|
||||
# UAPI inclusion, referred as <compel/...>
|
||||
|
@@ -26,7 +26,11 @@
|
||||
#define COMPEL_CFLAGS_PIE CFLAGS_DEFAULT_SET "-fpie"
|
||||
#define COMPEL_CFLAGS_NOPIC CFLAGS_DEFAULT_SET "-fno-pic"
|
||||
|
||||
#ifdef NO_RELOCS
|
||||
#define COMPEL_LDFLAGS_COMMON "-z noexecstack -T "
|
||||
#else
|
||||
#define COMPEL_LDFLAGS_COMMON "-r -z noexecstack -T "
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
const char *arch; // dir name under arch/
|
||||
|
@@ -1,6 +1,7 @@
|
||||
ccflags-y += -iquote criu/$(ARCH)
|
||||
ccflags-y += $(COMPEL_UAPI_INCLUDES)
|
||||
CFLAGS_REMOVE_clone-noasan.o += $(CFLAGS-ASAN)
|
||||
ldflags-y += -r
|
||||
|
||||
obj-y += action-scripts.o
|
||||
obj-y += external.o
|
||||
|
@@ -4,6 +4,7 @@ ccflags-y += -iquote $(obj)/include -iquote criu/include
|
||||
ccflags-y += -iquote include
|
||||
ccflags-y += $(COMPEL_UAPI_INCLUDES)
|
||||
asflags-y += -D__ASSEMBLY__
|
||||
ldflags-y += -r
|
||||
|
||||
obj-y += cpu.o
|
||||
obj-y += crtools.o
|
||||
|
@@ -5,6 +5,7 @@ ccflags-y += -iquote criu/include -iquote include
|
||||
ccflags-y += $(COMPEL_UAPI_INCLUDES)
|
||||
|
||||
asflags-y += -D__ASSEMBLY__
|
||||
ldflags-y += -r
|
||||
|
||||
obj-y += cpu.o
|
||||
obj-y += crtools.o
|
||||
|
@@ -3,6 +3,7 @@ builtin-name := crtools.built-in.o
|
||||
ccflags-y += -iquote $(obj)/include
|
||||
ccflags-y += -iquote criu/include -iquote include
|
||||
ccflags-y += $(COMPEL_UAPI_INCLUDES)
|
||||
ldflags-y += -r
|
||||
|
||||
obj-y += cpu.o
|
||||
obj-y += crtools.o
|
||||
|
@@ -7,7 +7,7 @@ ccflags-y += $(COMPEL_UAPI_INCLUDES)
|
||||
asflags-y += -Wstrict-prototypes
|
||||
asflags-y += -D__ASSEMBLY__ -nostdlib -fomit-frame-pointer
|
||||
asflags-y += -iquote $(obj)/include
|
||||
ldflags-y += -z noexecstack
|
||||
ldflags-y += -r -z noexecstack
|
||||
|
||||
obj-y += cpu.o
|
||||
obj-y += crtools.o
|
||||
|
@@ -5,4 +5,4 @@ ccflags-y += -iquote criu/$(ARCH_DIR)/include
|
||||
ccflags-y += -iquote criu/include
|
||||
ccflags-y += -iquote images
|
||||
ccflags-y += -fPIC -fno-stack-protector
|
||||
ldflags-y += -z noexecstack
|
||||
ldflags-y += -r -z noexecstack
|
||||
|
@@ -142,7 +142,7 @@ endif
|
||||
define gen-ld-target-rule
|
||||
$(1): $(3)
|
||||
$$(call msg-link, $$@)
|
||||
$$(Q) $$(LD) $(2) -r -o $$@ $(4)
|
||||
$$(Q) $$(LD) $(2) -o $$@ $(4)
|
||||
endef
|
||||
|
||||
define gen-ar-target-rule
|
||||
|
Reference in New Issue
Block a user