diff options
author | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-13 13:54:07 +0000 |
---|---|---|
committer | kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-13 13:54:07 +0000 |
commit | 38e21583d174a96a85786dd8d63d465e9e9e3391 (patch) | |
tree | 2fe44e0f530c8b4cf77e4ce8d2d53f000fba9744 /gcc/target.def | |
parent | 995b27b9592c984d7fcd8d1efb4d1a0db248e507 (diff) | |
download | gcc-38e21583d174a96a85786dd8d63d465e9e9e3391.tar.gz |
[PATCH 6/7] OpenMP 4.0 offloading infrastructure: option handling.
gcc/
* common.opt (foffload, foffload-abi): New options.
* config/i386/i386.c (ix86_offload_options): New static function.
(TARGET_OFFLOAD_OPTIONS): Define.
* coretypes.h (enum offload_abi): New enum.
* doc/tm.texi: Regenerate.
* doc/tm.texi.in (TARGET_OFFLOAD_OPTIONS): Document.
* gcc.c (offload_targets): New static variable.
(handle_foffload_option): New static function.
(driver_handle_option): Handle OPT_foffload_.
(driver::maybe_putenv_OFFLOAD_TARGETS): Set OFFLOAD_TARGET_NAMES
according to offload_targets.
* hooks.c (hook_charptr_void_null): New hook.
* hooks.h (hook_charptr_void_null): Declare.
* lto-opts.c: Include lto-section-names.h.
(lto_write_options): Append options from target offload_options hook and
store them to offload_lto section. Do not store target-specific,
driver and diagnostic options in offload_lto section.
* lto-wrapper.c (merge_and_complain): Handle OPT_foffload_ and
OPT_foffload_abi_.
(append_compiler_options, append_linker_options)
(append_offload_options): New static functions.
(compile_offload_image): Add new arguments with options.
Call append_compiler_options and append_offload_options.
(compile_images_for_offload_targets): Add new arguments with options.
(find_and_merge_options): New static function.
(run_gcc): Outline options handling into the new functions:
find_and_merge_options, append_compiler_options, append_linker_options.
* opts.c (common_handle_option): Don't handle OPT_foffload_.
Forbid OPT_foffload_abi_ for non-offload compiler.
* target.def (offload_options): New target hook.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217493 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target.def')
-rw-r--r-- | gcc/target.def | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/target.def b/gcc/target.def index 682d22ead00..01549679440 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -1802,6 +1802,15 @@ actions then, you should have @code{TARGET_OPTION_OVERRIDE} call\n\ void, (void), hook_void_void) +DEFHOOK +(offload_options, + "Used when writing out the list of options into an LTO file. It should\n\ +translate any relevant target-specific options (such as the ABI in use)\n\ +into one of the @option{-foffload} options that exist as a common interface\n\ +to express such options. It should return a string containing these options,\n\ +separated by spaces, which the caller will free.\n", +char *, (void), hook_charptr_void_null) + DEFHOOK_UNDOC (eh_return_filter_mode, "Return machine mode for filter value.", |