[CRIU] [PATCH 05/20] pie.lib: drop second compat lib

Dmitry Safonov dsafonov at virtuozzo.com
Fri Dec 2 11:53:29 PST 2016


No need in two libraries if we have only one parasite blob.
With left hand I write code - with right I erase it.

Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 criu/pie/Makefile.library | 47 ++++++++++++++---------------------------------
 1 file changed, 14 insertions(+), 33 deletions(-)

diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
index 43da82929076..a675a63fc42f 100644
--- a/criu/pie/Makefile.library
+++ b/criu/pie/Makefile.library
@@ -1,54 +1,35 @@
-target			:= pie
+lib-name		:= pie.lib.a
 
-CFLAGS			:= $(filter-out -DCONFIG_X86_64,$(CFLAGS))
-CFLAGS			+= -fno-stack-protector -DCR_NOGLIBC
+CFLAGS			+= -fno-stack-protector -DCR_NOGLIBC -fpie
 LDFLAGS			+= -z noexecstack
 
-CFLAGS_pie		+= -fpie
-
-ifeq ($(ARCH),x86)
-        ifeq ($(CONFIG_COMPAT),y)
-                target	+= compat
-                pie-lib-y	+= util-vdso-elf32.o
-        endif
-        CFLAGS_pie	+= -DCONFIG_X86_64
-        CFLAGS_compat	+= -fno-pic -m32 -DCONFIG_X86_32
-        CFLAGS_util-vdso-elf32.o	+= -DCONFIG_VDSO_32
-        OBJS		+= ./$(ARCH_DIR)/memcpy.o
-endif
-
-OBJS			+= util-fd.o util.o
+lib-y			+= util-fd.o util.o
 
 ifeq ($(VDSO),y)
-        OBJS		+= util-vdso.o parasite-vdso.o ./$(ARCH_DIR)/vdso-pie.o
+        lib-y		+= util-vdso.o parasite-vdso.o ./$(ARCH_DIR)/vdso-pie.o
 
         ifeq ($(SRCARCH),aarch64)
-                OBJS	+= ./$(ARCH_DIR)/intraprocedure.o
+                lib-y	+= ./$(ARCH_DIR)/intraprocedure.o
         endif
 
         ifeq ($(SRCARCH),ppc64)
-                OBJS	+= ./$(ARCH_DIR)/vdso-trampoline.o
+                lib-y	+= ./$(ARCH_DIR)/vdso-trampoline.o
         endif
 endif
 
 ifeq ($(SRCARCH),ppc64)
-        OBJS		+= ./$(ARCH_DIR)/memcpy_power7.o		\
+        lib-y		+= ./$(ARCH_DIR)/memcpy_power7.o		\
 			   ./$(ARCH_DIR)/memcmp_64.o ./$(ARCH_DIR)/misc.o
 endif
 
-define gen-pie-objs
-pie-lib-y		+= $(1)
-CFLAGS_$(1)		:= $(CFLAGS_pie)
-endef
-
-compat-obj		= $(basename $(notdir $(1)))-compat.o
-define gen-compat-objs
-compat-lib-y		+= $(dir ./$(call objectify,$(1)))compat/$(compat-obj)
-CFLAGS_$(compat-obj)	:= $(CFLAGS_compat)
-endef
+ifeq ($(SRCARCH),x86)
+        ifeq ($(CONFIG_COMPAT),y)
+                lib-y	+= util-vdso-elf32.o
+        endif
+        CFLAGS_util-vdso-elf32.o	+= -DCONFIG_VDSO_32
 
-$(eval $(call map,gen-pie-objs,$(OBJS)))
-$(eval $(call map,gen-compat-objs,$(OBJS)))
+        lib-y		+= ./$(ARCH_DIR)/memcpy.o
+endif
 
 #
 # We can't provide proper mount implementation
-- 
2.10.2



More information about the CRIU mailing list