diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2022-08-29 22:13:11 +0200 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2022-08-29 22:13:11 +0200 |
commit | c68b5c078bbf167e6ab84fc230a53580dcc651db (patch) | |
tree | d4b58e6d2108694bea063bc1c69b8e61ccf00366 /gcc/config | |
parent | 60d1d296b42b22b08d4eaa38bea02100c07261ac (diff) | |
download | gcc-c68b5c078bbf167e6ab84fc230a53580dcc651db.zip gcc-c68b5c078bbf167e6ab84fc230a53580dcc651db.tar.gz gcc-c68b5c078bbf167e6ab84fc230a53580dcc651db.tar.bz2 |
bpf: define __bpf__ as well as __BPF__ as a target macro
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.
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/bpf/bpf.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc index 7e37e08..9cb56cf 100644 --- 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__"); |