+2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * compile/compile.c (compile_to_object): Conditionally call
+ set_verbose. Conditionally call compile or compile_v0.
+
2017-08-07 Weimin Pan <weimin.pan@oracle.com>
* sparc64-tdep.h: (adi_normalize_address): New export.
get_args (compiler, gdbarch, &argc, &argv);
gdb_argv argv_holder (argv);
+ if (compiler->fe->ops->version >= GCC_FE_VERSION_1)
+ compiler->fe->ops->set_verbose (compiler->fe, compile_debug);
+
error_message = compiler->fe->ops->set_arguments (compiler->fe, triplet_rx,
argc, argv);
if (error_message != NULL)
/* Call the compiler and start the compilation process. */
compiler->fe->ops->set_source_file (compiler->fe, fnames.source_file ());
- if (!compiler->fe->ops->compile (compiler->fe, fnames.object_file (),
- compile_debug))
+ if (compiler->fe->ops->version >= GCC_FE_VERSION_1)
+ ok = compiler->fe->ops->compile (compiler->fe, fnames.object_file ());
+ else
+ ok = compiler->fe->ops->compile_v0 (compiler->fe, fnames.object_file (),
+ compile_debug);
+ if (!ok)
error (_("Compilation failed."));
if (compile_debug)
+2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gcc-interface.h (enum gcc_base_api_version): Add
+ GCC_FE_VERSION_1.
+ (struct gcc_base_vtable): Rename compile to compile_v0. Update
+ comment for compile. New methods set_verbose and compile.
+
2017-08-21 Alexander Fedotov <alexander.fedotov@nxp.com>
Edmar Wienskoski <edmar.wienskoski@nxp.com>
enum gcc_base_api_version
{
- GCC_FE_VERSION_0 = 0
+ GCC_FE_VERSION_0 = 0,
+
+ /* Deprecated method compile_v0. Added method set_verbose and compile. */
+ GCC_FE_VERSION_1 = 1,
};
/* The operations defined by the GCC base API. This is the vtable for
const char *message),
void *datum);
- /* Perform the compilation. FILENAME is the name of the resulting
- object file. VERBOSE can be set to cause GCC to print some
- information as it works. Returns true on success, false on
- error. */
+ /* Deprecated GCC_FE_VERSION_0 variant of the GCC_FE_VERSION_1
+ compile method. GCC_FE_VERSION_0 version verbose parameter has
+ been replaced by the set_verbose method. */
- int /* bool */ (*compile) (struct gcc_base_context *self,
- const char *filename,
- int /* bool */ verbose);
+ int /* bool */ (*compile_v0) (struct gcc_base_context *self,
+ const char *filename,
+ int /* bool */ verbose);
/* Destroy this object. */
void (*destroy) (struct gcc_base_context *self);
+
+ /* VERBOSE can be set to non-zero to cause GCC to print some
+ information as it works. Calling this method overrides its
+ possible previous calls.
+
+ This method is only available since GCC_FE_VERSION_1. */
+
+ void (*set_verbose) (struct gcc_base_context *self,
+ int /* bool */ verbose);
+
+ /* Perform the compilation. FILENAME is the name of the resulting
+ object file. Either set_triplet_regexp or set_driver_filename must
+ be called before. Returns true on success, false on error.
+
+ This method is only available since GCC_FE_VERSION_1. */
+
+ int /* bool */ (*compile) (struct gcc_base_context *self,
+ const char *filename);
};
/* The GCC object. */