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

Dmitry Safonov dsafonov at virtuozzo.com
Sat Feb 20 04:34:54 PST 2016


On 02/20/2016 03:31 PM, Cyrill Gorcunov wrote:
> On Sat, Feb 20, 2016 at 03:25:34PM +0300, Dmitry Safonov wrote:
>> I thought maybe rename CFLAGS_$@ and ASFLAGS_$@ to
>> $@-cflags-y $@-asflags-y. But if you want, we leave it as is.
> To be fair, I like your approach more. So letme think.
As no one use them (yet - do not delete them, please!),
we will not need some convert-everything patch, just
something like (but I'm all ok, if you leave it as-is, to
be more like it's in Linux kenel):

diff --git a/scripts/nmk/scripts/rules.mk b/scripts/nmk/scripts/rules.mk
index e589e44..2c08fc1 100644
--- a/scripts/nmk/scripts/rules.mk
+++ b/scripts/nmk/scripts/rules.mk
@@ -3,11 +3,11 @@ ifndef ____nmk_defined__rules
  #
  # Accumulate common flags.
  define nmk-ccflags
-        $(CFLAGS) $(ccflags-y) $(CFLAGS_$@)
+        $(CFLAGS) $(ccflags-y) $($@-ccflags-y)
  endef

  define nmk-asflags
-        $(CFLAGS) $(ASFLAGS) $(asflags-y) $(ASFLAGS_$@)
+        $(CFLAGS) $(ASFLAGS) $(asflags-y) $($@-asflags-y)
  endef

-- 
Regards,
Dmitry Safonov



More information about the CRIU mailing list