Skip to content

Commit c6adafa

Browse files
committed
github: Work around kernel build error
Older versions of the Linux kernel won't compile correctly on newer kernels. This causes our automated patch checks to fail. This issue has been fixed upstream but still needs to be applied to some older kernels. This patch is specifically required to prevent a build failure in the 4.14 kernel that is added in the next commit. Link: https://lore.kernel.org/selinux/[email protected]/ Signed-off-by: Jason Gerecke <[email protected]>
1 parent 5c56b3e commit c6adafa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ jobs:
5757
COMPILER_H=$(ls -v ${KERNELROOT}/include/linux/compiler-gcc*.h | tail -n1)
5858
ln -s "${COMPILER_H}" "${KERNELROOT}/include/linux/compiler-gcc${GCC_MAJOR_VER}.h"
5959
fi
60+
61+
# Fix issue preventing some late-version 4.x kenels from completing config
62+
if [[ "${KERNELVER}" == "4."* || "${KERNELVER}" == "5.1" ]]; then
63+
curl "https://github.com/torvalds/linux/commit/dfbd199a7cfe3e3cd8531e1353cdbd7175bfbc5e.patch" | patch -t -N -r - -p1 -d "${KERNELROOT}" || true
64+
fi
65+
6066
make -C ${KERNELROOT} defconfig
6167
${KERNELROOT}/scripts/config --file ${KERNELROOT}/.config --disable UNWINDER_ORC --enable UNWINDER_FRAME_POINTER
6268
make -C ${KERNELROOT} prepare modules_prepare EXTRA_CFLAGS="${PREPARE_CFLAGS} ${{ matrix.prepare_cflags }}"

0 commit comments

Comments
 (0)