public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2254] bpf: define __bpf__ as well as __BPF__ as a target macro
@ 2022-08-29 20:14 Jose E. Marchesi
0 siblings, 0 replies; only message in thread
From: Jose E. Marchesi @ 2022-08-29 20:14 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c68b5c078bbf167e6ab84fc230a53580dcc651db
commit r13-2254-gc68b5c078bbf167e6ab84fc230a53580dcc651db
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date: Mon Aug 29 22:13:11 2022 +0200
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.
Diff:
---
gcc/config/bpf/bpf.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc
index 7e37e080808..9cb56cfb287 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__");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-29 20:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29 20:14 [gcc r13-2254] bpf: define __bpf__ as well as __BPF__ as a target macro Jose E. Marchesi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).