Build pie objects separately

This patch change the build chain to not use pie objects in the crtools
executable.

This done by building the shared source files twice:
 1. for parasite/restorer as '<file>-pie-build.o'
 2. for crtools as '<file>.o'

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Laurent Dufour 2015-10-12 17:17:00 +03:00 committed by Pavel Emelyanov
parent 61859d1176
commit 2f481f02fc
5 changed files with 26 additions and 11 deletions

View file

@ -225,8 +225,6 @@ $(piegen): pie/piegen/built-in.o
.PHONY: pie/piegen
endif
pie/%:: $(ARCH_DIR) $(piegen)
$(Q) $(MAKE) $(build)=pie $@
pie: $(ARCH_DIR) $(piegen)
$(Q) $(MAKE) $(build)=pie all
@ -240,12 +238,6 @@ lib/%:: $(VERSION_HEADER) config built-in.o
lib: $(VERSION_HEADER) config built-in.o
$(Q) $(MAKE) $(build)=lib all
ifeq ($(VDSO),y)
PROGRAM-BUILTINS += pie/util-vdso.o
endif
PROGRAM-BUILTINS += pie/util-fd.o
PROGRAM-BUILTINS += pie/util.o
PROGRAM-BUILTINS += protobuf/built-in.o
PROGRAM-BUILTINS += built-in.o