From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1861) id 59A213857014; Mon, 29 Aug 2022 20:14:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59A213857014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661804088; bh=SuMR60eSz1BDzRb4mUgUQUI3Mg+BWdh9M6V/v6p7Yys=; h=From:To:Subject:Date:From; b=JQ2hrReJ0e/wY2EUM77deON/6lICFtYCapcY9IEZXfQhK3NobHCT9Mc3G4X1VIb7a R8QV3VPT1NtPoA+Yfy+TlWy2vaoKzwhj7Ez23912IX/4sPqAOM00th723w7A+otwge 0kxdTIBNCF+8cfxtHBkxJAaKTNZ0HvDTF6QPW2DQ= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jose E. Marchesi To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2254] bpf: define __bpf__ as well as __BPF__ as a target macro X-Act-Checkin: gcc X-Git-Author: Jose E. Marchesi X-Git-Refname: refs/heads/master X-Git-Oldrev: 60d1d296b42b22b08d4eaa38bea02100c07261ac X-Git-Newrev: c68b5c078bbf167e6ab84fc230a53580dcc651db Message-Id: <20220829201448.59A213857014@sourceware.org> Date: Mon, 29 Aug 2022 20:14:48 +0000 (GMT) List-Id: https://gcc.gnu.org/g:c68b5c078bbf167e6ab84fc230a53580dcc651db commit r13-2254-gc68b5c078bbf167e6ab84fc230a53580dcc651db Author: Jose E. Marchesi 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__");