aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReza Arbab <arbab@linux.ibm.com>2025-02-04 08:49:01 -0600
committerReza Arbab <arbab@linux.ibm.com>2025-02-26 08:31:50 -0600
commitd6f297ff7360e3968657d49ecf47b90e331a7c87 (patch)
treef927ddafc2f219312cde48c250881d9e60a37099
parentcce3a048302b1ed39c7415cbea45ec036162a47c (diff)
downloadskiboot-d6f297ff7360e3968657d49ecf47b90e331a7c87.zip
skiboot-d6f297ff7360e3968657d49ecf47b90e331a7c87.tar.gz
skiboot-d6f297ff7360e3968657d49ecf47b90e331a7c87.tar.bz2
external/ffspart: Avoid makefile race condition
In ffspart we assign this make variable: FFSPART_VERSION ?= $(shell ./make_version.sh $(EXE)) However, ./make_version.sh is actually a make target, and whether it exists or not at the time of this assignment is by chance, depending on how the make concurrency works out. In practice, this intermittently causes CI build failure: make -j${MAKE_J} check + make -j4 check ... [ RUN-TEST ] check-ffspart ... make[1]: ./make_version.sh: No such file or directory ... make[1]: *** [Makefile:13: check] Error 1 make[1]: Entering directory '/build/external/ffspart' ... running test/tests/00-usage running test/tests/01-param-sanity Fatal error, cannot execute binary './ffspart'. Did you make? make[1]: Leaving directory '/build/external/ffspart' make: *** [/build/external/Makefile.check:21: check-ffspart] Error 2 make: *** Waiting for unfinished jobs.... The rule for make_version.sh is just a symlink: make_version.sh: $(Q_LN)ln -sf ../../make_version.sh To avoid the race, call make_version.sh from its actual location instead of relying on the link to be created. The same thing was done for gard in commit 8ab0caf26de9 ("external/gard: Fix make dist target"). Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
-rw-r--r--external/ffspart/rules.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/external/ffspart/rules.mk b/external/ffspart/rules.mk
index e006dc5..cbbd4a8 100644
--- a/external/ffspart/rules.mk
+++ b/external/ffspart/rules.mk
@@ -15,7 +15,7 @@ sbindir = $(prefix)/sbin
CC = $(CROSS_COMPILE)gcc
-FFSPART_VERSION ?= $(shell ./make_version.sh $(EXE))
+FFSPART_VERSION ?= $(shell ../../make_version.sh $(EXE))
version.c: make_version.sh .version
@(if [ "a$(FFSPART_VERSION)" = "a" ]; then \