Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust the order of linux kernel header include paths
The current order of include paths could cause the following error: In file included from /virtual/main.c:3: In file included from include/linux/sched.h:13: In file included from include/linux/pid.h:4: In file included from include/linux/rculist.h:10: In file included from include/linux/rcupdate.h:38: In file included from include/linux/spinlock.h:50: In file included from include/linux/preempt.h:80: In file included from /lib/modules/4.12.14-197.45-default/build/arch/s390/include/generated/asm/preempt.h:1: include/asm-generic/preempt.h:10:42: error: no member named 'preempt_count' in 'struct thread_info' return READ_ONCE(current_thread_info()->preempt_count); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ include/linux/compiler.h:349:34: note: expanded from macro 'READ_ONCE' ~~~~~~~~~~~~^~~~~ include/linux/compiler.h:342:17: note: expanded from macro '__READ_ONCE' union { typeof(x) __val; char __c[1]; } __u; \ ... 7 errors generated. It's supposed to load "asm/preempt.h" from "source/"(*) but accidentally loaded the one from "build/", so the error showed. (x86_64 didn't suffer this error because it didn't install the extra "asm/preempt.h" to "build/".) For the distros, e.g. SUSE/openSUSE and debian, with separate "build/" and "source/", all those "generated/" paths only exist in "build/". To avoid the potential compilation issue, this commit adjusts the include order for those with split headers to align the include order from kernel top Makefile. (*) /lib/modules/4.12.14-197.45-default/source/arch/s390/include/ Signed-off-by: Gary Lin <[email protected]>
- Loading branch information