]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bpf: add support for the -mxbpf option
authorJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 12 Aug 2020 14:54:53 +0000 (16:54 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 12 Aug 2020 14:54:53 +0000 (16:54 +0200)
This patch adds support for a new option -mxbpf.  This tells GCC to
generate code for an expanded version of BPF that relaxes some of the
restrictions imposed by BPF.

(cherry pick of 51e10276d6792f67f1d88d90f299e7ac1b1f1f24)

2020-05-19  Jose E. Marchesi  <jose.marchesi@oracle.com>

gcc/
* config/bpf/bpf.opt (mxbpf): New option.
* doc/invoke.texi (Option Summary): Add -mxbpf.
(eBPF Options): Document -mxbbpf.

gcc/config/bpf/bpf.opt
gcc/doc/invoke.texi

index 78b93c5557549d49fd4365b97d6a60819658446c..6aa858408f135cfbcd2b72cabd7afd71c2bc21dc 100644 (file)
@@ -108,6 +108,12 @@ Enum(bpf_kernel) String(5.1) Value(LINUX_V5_1)
 EnumValue
 Enum(bpf_kernel) String(5.2) Value(LINUX_V5_2)
 
+; Use xBPF extensions.
+
+mxbpf
+Target Report Mask(XBPF)
+Generate xBPF.
+
 ; Selecting big endian or little endian targets.
 
 mbig-endian
index 4dc64ffe9dd8ce94b11e6f8af4b680ad427012c9..3cbf7640bbfbba34eefe4a46b935e70592848d34 100644 (file)
@@ -863,7 +863,7 @@ Objective-C and Objective-C++ Dialects}.
 
 @emph{eBPF Options}
 @gccoptlist{-mbig-endian -mlittle-endian -mkernel=@var{version}
--mframe-limit=@var{bytes}}
+-mframe-limit=@var{bytes} -mxbpf}
 
 @emph{FR30 Options}
 @gccoptlist{-msmall-model  -mno-lsim}
@@ -21045,6 +21045,10 @@ Generate code for a big-endian target.
 @item -mlittle-endian
 @opindex mlittle-endian
 Generate code for a little-endian target.  This is the default.
+
+@item -mxbpf
+Generate code for an expanded version of BPF, which relaxes some of
+the restrictions imposed by the BPF architecture.
 @end table
 
 @node FR30 Options