projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60d1d29
)
bpf: define __bpf__ as well as __BPF__ as a target macro
author
Jose E. Marchesi
<jose.marchesi@oracle.com>
Mon, 29 Aug 2022 20:13:11 +0000
(22:13 +0200)
committer
Jose E. Marchesi
<jose.marchesi@oracle.com>
Mon, 29 Aug 2022 20:13:11 +0000
(22:13 +0200)
LLVM defines both __bpf__ and __BPF_ as target macros.
GCC was defining only __BPF__.
This patch defines __bpf__ as a target macro for BPF.
Tested in bpf-unknown-none.
gcc/ChangeLog:
* config/bpf/bpf.cc (bpf_target_macros): Define __bpf__ as a
target macro.
gcc/config/bpf/bpf.cc
patch
|
blob
|
history
diff --git
a/gcc/config/bpf/bpf.cc
b/gcc/config/bpf/bpf.cc
index
7e37e08
..
9cb56cf
100644
(file)
--- a/
gcc/config/bpf/bpf.cc
+++ b/
gcc/config/bpf/bpf.cc
@@
-291,6
+291,7
@@
void
bpf_target_macros (cpp_reader *pfile)
{
builtin_define ("__BPF__");
+ builtin_define ("__bpf__");
if (TARGET_BIG_ENDIAN)
builtin_define ("__BPF_BIG_ENDIAN__");