Re: [COMMITTED] bpf: define __bpf__ as well as __BPF__ as a target macro

2022-08-30 Thread Fangrui Song via Gcc-patches
On Tue, Aug 30, 2022 at 9:46 AM Jose E. Marchesi wrote: > > > > On Mon, Aug 29, 2022 at 1:16 PM Jose E. Marchesi via Gcc-patches > > wrote: > >> > >> > >> LLVM defines both __bpf__ and __BPF_ as target macros. > >> GCC was defining only __BPF__. > >> > >> This patch defines __bpf__ as a target ma

Re: [COMMITTED] bpf: define __bpf__ as well as __BPF__ as a target macro

2022-08-30 Thread Jose E. Marchesi via Gcc-patches
> On Mon, Aug 29, 2022 at 1:16 PM Jose E. Marchesi via Gcc-patches > wrote: >> >> >> 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: >> >>

Re: [COMMITTED] bpf: define __bpf__ as well as __BPF__ as a target macro

2022-08-29 Thread Fangrui Song via Gcc-patches
On Mon, Aug 29, 2022 at 1:16 PM Jose E. Marchesi via Gcc-patches wrote: > > > 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/

[COMMITTED] bpf: define __bpf__ as well as __BPF__ as a target macro

2022-08-29 Thread Jose E. Marchesi via Gcc-patches
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/