diff options
author | Colin Cross <ccross@android.com> | 2022-04-22 23:26:12 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-04-22 23:26:12 +0000 |
commit | e1bdb0718fe0a1d3de04960aa289af39b16002b8 (patch) | |
tree | e89666e108f62e9e4c9553d06e108ac370fe461d | |
parent | d41b5b03ec13a6b008f420b819d3ea9685bcf8cc (diff) | |
parent | 61b9d9ccc29e1301a06476f0aa5b2e1ab705f10b (diff) | |
download | bpftool-e1bdb0718fe0a1d3de04960aa289af39b16002b8.tar.gz |
Hack around linux/compiler-gcc.h issue with musl am: 61b9d9ccc2
Original change: https://android-review.googlesource.com/c/platform/external/bpftool/+/2072344
Change-Id: If0bb18b8630c15d7fb70f01cc410881d94be7094
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -31,6 +31,19 @@ cc_binary_host { "include/uapi", "src/kernel/bpf" ], + target: { + musl: { + // There is an unfortunate interaction between the bionic uapi headers + // used by musl and the kernel headers distributed with bpftool. The + // bionic uapi headers include <linux/compiler_types.h>, which they + // expect to be resolved to their own copy of compiler_types.h that + // includes compiler.h. It instead resolves to the bpftool copy, + // which includes compiler-gcc.h directly, triggering an error if + // the _LINUX_COMPILER_H_ header guard is not already defined. Hack + // around it by always including linux/compiler.h from the command line. + cflags: ["-include linux/compiler.h"], + }, + }, static_libs: [ "libbpf", "libcap", |