landlock-lsm / landlock-test-tools

Landlock test tools
https://landlock.io
GNU General Public License v2.0
0 stars 1 forks source link

Support compiler version bump #7

Open l0kod opened 5 months ago

l0kod commented 5 months ago

I noticed that when we run a kernel build with a new compiler version (e.g. GCC 14) it fails if we previously built the same kernel in the same build directory but with a different compiler version (e.g. GCC 13):

  GEN     Makefile
mkdir -p .../.out-landlock_local-x86_64-gcc/tools/objtool && make O=.../.out-landlock_local-x86_64-gcc subdir=tools/objtool --no-print-directory -C objtool
  CC      scripts/mod/empty.o
  CC      scripts/mod/devicetable-offsets.s
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/mod/symsearch.o
  INSTALL libsubcmd_headers
make[6]: *** No rule to make target '/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/stdbool.h', needed by '.../.out-landlock_local-x86_64-gcc/tools/objtool/libsubcmd/exec-cmd.o'.  Stop.
make[5]: *** [Makefile:80: .../.out-landlock_local-x86_64-gcc/tools/objtool/libsubcmd/libsubcmd-in.o] Error 2
make[4]: *** [Makefile:82: .../.out-landlock_local-x86_64-gcc/tools/objtool/libsubcmd/libsubcmd.a] Error 2
make[3]: *** [Makefile:72: objtool] Error 2

The simple fix is to remove the build directory and start again...