From a1acf0128dfb47482a2d58564a865b2fcca26cd2 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 30 Nov 2018 23:15:57 +0100 Subject: [PATCH] linux-infocus-flatfish: fix race condition Add -j1 to compiling the standby code, which is compiled separately already. This change seems to make the kernel always compile, I've tried it 6 times, 3 times of that with pmbootstrap's "--no-ccache" option. It got past an error about 30 seconds into the build, which happened roughly 2 out of 10 times: gcc6-armv6-alpine-linux-muslgnueabihf-ld: cannot find standby.o: No such file or directory I thought, this was related to gcc6 changes, or to changes in abuild, but both were not the case. Grant Miller confirmed that this fixed the build, he was able to compile the kernel ten times in a row with this commit. --- device/linux-infocus-flatfish/APKBUILD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/device/linux-infocus-flatfish/APKBUILD b/device/linux-infocus-flatfish/APKBUILD index 910262f2a..773330e5d 100644 --- a/device/linux-infocus-flatfish/APKBUILD +++ b/device/linux-infocus-flatfish/APKBUILD @@ -59,7 +59,8 @@ build() { unset LDFLAGS # The standby code needs to be built separately - make ARCH="$_carch" CC="${CC:-gcc}" \ + # Without -j1, this fails the build sometimes! + make -j1 ARCH="$_carch" CC="${CC:-gcc}" \ KDIR=$builddir \ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \ -C $builddir/arch/arm/mach-sun6i/pm/standby