[CRIU] failing to build in launchpad upload environment

Cyrill Gorcunov gorcunov at gmail.com
Thu Jun 30 08:08:20 PDT 2016


On Thu, Jun 30, 2016 at 08:08:55AM -0600, Tycho Andersen wrote:
> 
> Well, we'd like to avoid any build-script specific hacks to keep in
> line with debian.
> 
> The build system passes its own LDFLAGS, but it passes them with the
> gcc wrappers "-Wl". The problem is that CRIU's makefiles use ld
> directly, and don't invoke it through gcc, and ld doesn't recognize
> the -Wl bits.
> 
> I'm not sure how/why this works in the debian builds, because
> presumably they're passing the same flags. Perhaps Salvatore can
> elaborate?

Could you give the patch a shot?
---
diff --git a/scripts/nmk/scripts/build.mk b/scripts/nmk/scripts/build.mk
index bd409441293e..cee9a93c53b2 100644
--- a/scripts/nmk/scripts/build.mk
+++ b/scripts/nmk/scripts/build.mk
@@ -25,6 +25,13 @@ ifndef obj
 endif
 
 #
+# Filter out any -Wl,XXX option: some of build farms
+# assumes that we're using $(CC) for building built-in
+# targets.
+LDFLAGS-MASK	:= -Wl,%
+LDFLAGS		:= $(filter-out $(LDFLAGS-MASK),$(LDFLAGS))
+
+#
 # Accumulate common flags.
 define nmk-ccflags
         $(CFLAGS) $(ccflags-y) $(CFLAGS_$(@F))


More information about the CRIU mailing list