[CRIU] [PATCH] build/nmk: add per-target LDFLAGS

Dmitry Safonov dsafonov at virtuozzo.com
Sat Feb 20 03:49:31 PST 2016


Let there be LDFLAGS_$@ similar to CFLAGS_$@, ASFLAGS_$@.
I need them for passing -m elf_i386 to build 32-bit syscalls/pie on
64-bit machine.

Cc: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 scripts/nmk/scripts/build.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/nmk/scripts/build.mk b/scripts/nmk/scripts/build.mk
index d976390..f7daf52 100644
--- a/scripts/nmk/scripts/build.mk
+++ b/scripts/nmk/scripts/build.mk
@@ -43,7 +43,9 @@ builtin-name	:= $(strip $(builtin-name))
 
 #
 # Link flags.
-ld_flags	:= $(strip $(LDFLAGS) $(ldflags-y))
+define ld_flags
+$(strip $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$@))
+endef
 
 #
 # Prepare targets.
-- 
2.7.1



More information about the CRIU mailing list