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

Cyrill Gorcunov gorcunov at gmail.com
Thu Apr 23 00:24:40 PDT 2015


On Wed, Apr 22, 2015 at 05:46:39PM -0400, Christopher Covington wrote:
...
> >  
> >  $(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 $@ $<
> 
> ldflags-y

With typo fix attached
-------------- next part --------------
>From 2c13ce45f87ccd8c82743701c863d150345a792d Mon Sep 17 00:00:00 2001
From: Cyrill Gorcunov <gorcunov at openvz.org>
Date: Wed, 22 Apr 2015 13:23:45 +0300
Subject: [PATCH] make: Introduce ldflags-y variable

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..c0e8f62cee23 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) $(ldflags-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