I'm building an eBPF program. For it to build I need to add as include paths (-I) some headers located in /usr/src/linux-headers-*/arch/x86/include.
Since this path is x86-specific, to be able to compile it for non-x86 architectures I will need to pick the right path as part of the build process.
However, the names of the architectures used in the Linux sources don't match those returned by uname -m. Eg, if uname -m returns x86_64 I need to include arch/x86/include, but if uname -m returns aarch64, then I need to include arch/arm64/include.
Is there a way to find which is the right arch/* to include, without the need to use a mapping (uname -m -> arch path) for all my supported architectures?