https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128584

--- Comment #2 from Jose E. Marchesi <jemarch at gcc dot gnu.org> ---
So GCC implements address spaces as a GNU extension, in the form of
named address spaces, as keywords which are backend-specific.

Clang implements address spaces as a llvm extension, in the form of an
attribute that gets constants which are then interpreted by the
backend.

The kernel does in bpf_arena_common.h:

  #define __arena __attribute__((address_space(1)))

So what if we add a GCC named address space __arena (much like x86
supports named spaces __seg_fs and __seg_gs for example) in BPF
targets, following GCC custom?

If building BPF with a GCC that supports the __arena address space, just do
not #define it.

Reply via email to