[CRIU] [PATCH] make: fix "make criu" after arch-specific vdso broke it

Filipe Brandenburger filbranden at google.com
Wed Jun 25 15:03:32 PDT 2014


Hi Cyrill,

On Wed, Jun 25, 2014 at 2:46 PM, Cyrill Gorcunov <gorcunov at gmail.com> wrote:
> It's rather a strange fix.

So, when I authored this patch I didn't think about what it was doing
too much, I just looked at the logs of commit c473461d24fd and noticed
this dependency was removed there:

$ git show c473461d24fd -- Makefile
+ifeq ($(VDSO),y)
+PROGRAM-BUILTINS       += $(ARCH_DIR)/vdso-pie.o
+endif
 PROGRAM-BUILTINS       += pie/util-fd.o
 PROGRAM-BUILTINS       += pie/util.o
 PROGRAM-BUILTINS       += protobuf/built-in.o
 PROGRAM-BUILTINS       += built-in.o

-$(ARCH_DIR)/vdso-pie.o: pie
-       $(Q) $(MAKE) $(build)=pie $(ARCH_DIR)/vdso-pie.o
-PROGRAM-BUILTINS       += $(ARCH_DIR)/vdso-pie.o
-pie/$(VDSO_O): pie
-       $(Q) $(MAKE) $(build)=pie pie/$(VDSO_O)
-PROGRAM-BUILTINS       += pie/$(VDSO_O)

> $(ARCH_DIR)/vdso-pie.o comes to
> both -- pie code and a regular PROGRAM-BUILTINS, which in
> run means we rather lack a rule
>
> ifeq ($(VDSO),y)
> pie: $(ARCH_DIR)/vdso-pie.o
> endif
>
> don't we?

Not sure what you mean...

I'm looking at the Makefiles and I see the rule to generate
$(ARCH_DIR)/vdso-pie.o actually lives in pie/Makefile, which adds it
to obj-e which to my understanding means it's that Makefile that will
figure out how to build it (using automatic rules to figure out it's
from $(ARCH_DIR)/vdso-pie.c)

> I suspect you were running make with -j because
> on plain make it doesn't trigger even after git clean -fdx

No, I'm running regular "make". It looks pretty predictable to me (so
much that "git bisect" was able to pinpoint the regression) but it's
possible that there's some non-deterministic behavior considering that
make can choose to satisfy dependencies of a same target in any order,
not sure if that does happen without -j but it could. In any case, no,
I wasn't using "make -j" but I *was* using "make criu" and not "make
all" or a bare "make", it's possible that "make all" was still working
without this patch.

Cheers,
Filipe


More information about the CRIU mailing list