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

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> -foffload-abi=[lp64|ilp32]
> -foffload-abi-host-opts

The former affects the offload compiler, is used by nvptx/gcn's mkoffload, and
toggles between -m32 and -m64 for the offload compiler. But at least when used
as for offloading (called via libgomp) only '-m64' is supported.

The second option seems to be there to tell the offloading compiler whether the
host side (host in the OpenMP/OpenACC sense) is compiled with -m32/-m64.
Together, the offload compiler knows whether host and offload side both use 64
or 32 bit or have different pointer sizes, which is implementable but
completely unimplemented.

→ Effectively, only -m64 is supported by nvptx + gcn and, when compiling for
offloading, the host also must be -m64.


(Currently, both are set based by the host compiler, based on -m32/-m64, such
that host and offload side are either both 32bit or 64bit. The two flags are
set in config/aarch64/aarch64.cc, config/i386/i386-options.cc, and
config/rs6000/rs6000.cc, respectively; while -foffload-abi-host-opts seems to
be unused, -foffload-abi is consumed by gcn/nvptx's mkoffload.)


Hence, regarding:
> If both this and -foffload-abi are not intended to be user-visible, the right 
> thing to do is add the "Undocumented" property to their respective entries in 
> common.opt.  ??

Answer: yes, 'undocumented' makes most sense.

Reply via email to