xref: /linux/tools/sched_ext/include/bpf-compat/gnu/stubs.h (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1*2a52ca7cSTejun Heo /*
2*2a52ca7cSTejun Heo  * Dummy gnu/stubs.h. clang can end up including /usr/include/gnu/stubs.h when
3*2a52ca7cSTejun Heo  * compiling BPF files although its content doesn't play any role. The file in
4*2a52ca7cSTejun Heo  * turn includes stubs-64.h or stubs-32.h depending on whether __x86_64__ is
5*2a52ca7cSTejun Heo  * defined. When compiling a BPF source, __x86_64__ isn't set and thus
6*2a52ca7cSTejun Heo  * stubs-32.h is selected. However, the file is not there if the system doesn't
7*2a52ca7cSTejun Heo  * have 32bit glibc devel package installed leading to a build failure.
8*2a52ca7cSTejun Heo  *
9*2a52ca7cSTejun Heo  * The problem is worked around by making this file available in the include
10*2a52ca7cSTejun Heo  * search paths before the system one when building BPF.
11*2a52ca7cSTejun Heo  */
12