[CRIU] [PATCH 08/11] make: Introduce ldflags-y variable

Cyrill Gorcunov gorcunov at openvz.org
Wed Apr 22 10:20:03 PDT 2015


We need a custom flags to build 32bit varian of criu
on 64bit host system, lets pass @ldflags-y here for
that.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 pie/Makefile           | 2 +-
 protobuf/Makefile      | 2 +-
 scripts/Makefile.build | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pie/Makefile b/pie/Makefile
index 3e0b3a7a25cd..98779a75f9d8 100644
--- a/pie/Makefile
+++ b/pie/Makefile
@@ -48,7 +48,7 @@ $(obj)/$(PIELDS): $(obj)/$(PIELDS).in
 
 $(obj)/%.built-in.bin.o: $(obj)/%.built-in.o $(obj)/$(PIELDS)
 	$(E) "  GEN     " $@
-	$(Q) $(LD) -T $(obj)/$(PIELDS) -o $@ $<
+	$(Q) $(LD) $(ldfalgs-y) -T $(obj)/$(PIELDS) -o $@ $<
 
 $(obj)/%.built-in.bin: $(obj)/%.built-in.bin.o
 	$(E) "  GEN     " $@
diff --git a/protobuf/Makefile b/protobuf/Makefile
index fdfe65bf06be..d4e177462d11 100644
--- a/protobuf/Makefile
+++ b/protobuf/Makefile
@@ -95,7 +95,7 @@ $(obj)/%.o: $(obj)/%.pb-c.c $(obj)/%.pb-c.h
 
 $(obj)/built-in.o: $(addprefix $(obj)/,$(proto-obj-y))
 	$(E) "  LINK    " $@
-	$(Q) $(LD) -r -o $@ $^
+	$(Q) $(LD) $(ldflags-y) -r -o $@ $^
 
 _all += $(obj)/built-in.o
 
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index ad0b24587de1..177d09669f7f 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -172,7 +172,7 @@ $(1)-all-objs += $(all-objs)
 
 $$(obj)/$(1).built-in.o: $$($(1)-all-objs) $$($(1)-libs-e) $(libs-e)
 	$$(E) "  LINK    " $$@
-	$$(Q) $$(LD) -r -o $$@ $$^
+	$$(Q) $$(LD) $$(ldflags-y) -r -o $$@ $$^
 
 _all += $$(obj)/$(1).built-in.o
 cleanup-y += $$(obj)/$(1).built-in.o
@@ -193,7 +193,7 @@ ifeq ($(targets),)
 ifneq ($(all-objs),)
 $(obj)/built-in.o: $(all-objs) $(libs-e)
 	$(E) "  LINK    " $@
-	$(Q) $(LD) -r -o $@ $^
+	$(Q) $(LD) $(ldflags-y) -r -o $@ $^
 
 _all += $(obj)/built-in.o
 cleanup-y += $(obj)/built-in.o
-- 
2.1.0



More information about the CRIU mailing list