testsuite: remove SPE tests.
[official-gcc.git] / lto-plugin / ChangeLog
blobbdd92bf966990916a12c0d66bf69e50211e10c02
1 2020-05-29  H.J. Lu  <hjl.tools@gmail.com>
3         PR bootstrap/95413
4         * configure: Regenerated.
6 2020-05-26  Alexandre Oliva  <oliva@adacore.com>
8         * lto-plugin.c (skip_in_suffix): New.
9         (exec_lto_wrapper): Use skip_in_suffix and concat to build
10         non-temporary output names.
11         (onload): Look for -dumpdir in COLLECT_GCC_OPTIONS, and
12         override link_output_name with it.
14 2020-05-12  H.J. Lu  <hongjiu.lu@intel.com>
16         PR bootstrap/94998
17         * configure: Regenerated.
19 2020-05-05  Eric Botcazou  <ebotcazou@adacore.com>
21         * lto-plugin.c: Document -linker-output-auto-notlo-rel option.
22         (linker_output_set): Change type to bool.
23         (linker_output_known): Likewise.
24         (linker_output_auto_nolto_rel): New variable.
25         (all_symbols_read_handler): Take it into account.
26         <LDPO_REL>: Do not issue the warning if it is set.
27         (process_option): Process -linker-output-auto-notlo-rel.
28         (cleanup_handler): Remove unused variable.
29         (onload) <LDPT_LINKER_OUTPUT>: Adjust to above type change.
31 2020-04-28  H.J. Lu  <hongjiu.lu@intel.com>
33         PR bootstrap/94739
34         * configure: Regenerated.
36 2020-04-25  H.J. Lu  <hongjiu.lu@intel.com>
38         PR bootstrap/94739
39         * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
40         * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
41         AC_SUBST(CET_HOST_FLAGS).
42         * Makefile.in: Regenerated.
43         * aclocal.m4: Likewise.
44         * configure: Likewise.
46 2020-03-19  Martin Liska  <mliska@suse.cz>
48         * lto-plugin.c (LTO_SECTION_PREFIX): Rename to ...
49         (LTO_SYMTAB_PREFIX): ... this.
50         (LTO_SECTION_PREFIX_LEN): Rename to ...
51         (LTO_SYMTAB_PREFIX_LEN): ... this.
52         (LTO_SYMTAB_EXT_PREFIX): New.
53         (LTO_SYMTAB_EXT_PREFIX_LEN): New.
54         (LTO_LTO_PREFIX): New.
55         (LTO_LTO_PREFIX_LEN): New.
56         (parse_table_entry): Fill up unused to zero.
57         (parse_table_entry_extension): New.
58         (parse_symtab_extension): New.
59         (finish_conflict_resolution): Change type
60         for resolution.
61         (process_symtab): Use new macro name.
62         (process_symtab_extension): New.
63         (claim_file_handler): Parse also process_symtab_extension.
64         (onload): Call new add_symbols_v2.
66 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
68         Update copyright years.
70 2019-09-27  Maciej W. Rozycki  <macro@wdc.com>
72         * configure: Regenerate.
74 2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>
76         * lto-plugin.c (cleanup_handler): Remove unused var.
78 2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>
80         * lto-plugin.c (exec_lto_wrapper): Make the wrapper
81         arguments filename more user-friendly.
82         (file_exists, maybe_unlink): New.
83         (cleanup_handler): Use maybe unlink to handle the
84         case when temps should be saved.
85         (process_option): Look for -v, —-version, -save-temps.
86         (onload): Record the linker output file name.
87         Check for -v, —-version, -save-temps in the GCC collect
88         options environment.
90 2019-02-26  Martin Liska  <mliska@suse.cz>
92         * lto-symtab.c: Remove.
94 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
96         Update copyright years.
98 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
100         PR bootstrap/82856
101         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
102         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
104 2018-05-30  Jan Hubicka  <jh@suse.cz>
106         * lto-plugin.c: (non_claimed_files): New static var.
107         (linker_ouput_known): New static var.
108         (all_symbols_read_handler): When user specifies linker output do not
109         imply it; output warning when nonlto-rel mode is forced.
110         (claim_file_header): Record number of nonclaimed files.
111         (process_option): Remember if linker output is known
113 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
115         PR jit/85384
116         * configure: Regenerate.
118 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
120         Update copyright years.
122 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
124         PR lto/81487
125         * lto-plugin.c (claim_file_handler): Use xasprintf instead of
126         asprintf.
127         [hi!=0]: Swap hi and lo arguments supplied to xasprintf.
129 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
131         PR other/79046
132         * configure.ac: Add GCC_BASE_VER.
133         * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
134         get version from BASE-VER file.
135         * configure: Regenerated.
136         * Makefile.in: Regenerated.
138 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
140         Update copyright years.
142 2016-11-15  Matthias Klose  <doko@ubuntu.com>
144         * configure: Regenerate.
146 2016-02-25  Ilya Verbin  <ilya.verbin@intel.com>
148         PR driver/68463
149         * lto-plugin.c (struct plugin_offload_file): New.
150         (offload_files): Change type.
151         (offload_files_last, offload_files_last_obj): New.
152         (offload_files_last_lto): New.
153         (free_2): Adjust accordingly.
154         (all_symbols_read_handler): Don't add offload files to lto_arg_ptr.
155         Don't call free_1 for offload_files.  Write names of object files with
156         offloading to the temporary file.  Add new option to lto_arg_ptr.
157         (claim_file_handler): Don't claim file if it contains offload sections
158         without LTO sections.  If it contains offload sections, add to the list.
160 2016-01-15  Martin Liska  <mliska@suse.cz>
162         * lto-plugin.c (all_symbols_read_handler): Assign default
163         value to a string variable.
165 2015-11-25  Jan Hubicka  <jh@suse.cz>
167         PR lto/67548
168         * lto-plugin.c (linker_output, linker_output_set): New statics.
169         (all_symbols_read_handler): Add -flinker-output option.
170         (onload): Record linker_output info.
172 2015-07-02  Uros Bizjak  <ubizjak@gmail.com>
174         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
175         * configure: Regenerate.
176         * config.h.in: Ditto.
178 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
180         * Makefile.am: Drop 'by automake version' from top-level comment.
181         * Makefile.in: Regenerated with automake-1.11.6.
182         * aclocal.m4: Likewise.
183         * configure: Likewise.
185 2015-02-06  H.J. Lu  <hongjiu.lu@intel.com>
187         * lto-plugin.c (release_input_file): Removed.
188         (claim_file_handler): Don't call release_input_file.
189         (onload): Don't set release_input_file.
191 2015-02-05  H.J. Lu  <hongjiu.lu@intel.com>
193         * lto-plugin.c (claim_file_handler): Pass handle to
194         release_input_file.
196 2015-02-05  H.J. Lu  <hongjiu.lu@intel.com>
198         * lto-plugin.c (claim_file_handler): Call release_input_file only
199         if file is claimed.
201 2015-01-28  H.J. Lu  <hongjiu.lu@intel.com>
203         * lto-plugin.c (claim_file_handler): Call release_input_file only
204         if it is not NULL.
206 2015-01-28  H.J. Lu  <hongjiu.lu@intel.com>
208         PR lto/64837
209         * lto-plugin.c (release_input_file): New.
210         (claim_file_handler): Call release_input_file.
211         (onload): Set release_input_file.
213 2014-12-09  Ilya Verbin  <ilya.verbin@intel.com>
215         * lto-plugin.c (offload_files, num_offload_files): New static variables.
216         (free_1): Use arguments instead of global variables.
217         (free_2): Free offload_files.
218         (all_symbols_read_handler): Add names from offload_files to lto-wrapper
219         arguments.
220         (claim_file_handler): Do not add file to claimed_files if it contains
221         offload sections without LTO sections.  Add it to offload_files instead.
223 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
225         PR bootstrap/63784
226         * configure: Regenerated.
228 2014-11-13  Ilya Verbin  <ilya.verbin@intel.com>
229             Bernd Schmidt  <bernds@codesourcery.com>
230             Andrey Turetskiy  <andrey.turetskiy@intel.com>
231             Michael Zolotukhin  <michael.v.zolotukhin@intel.com>
233         * lto-plugin.c (OFFLOAD_SECTION, OFFLOAD_SECTION_LEN): Define.
234         (struct plugin_objfile): Add new field "offload".
235         (process_offload_section): New static function.
236         (claim_file_handler): Claim file if it contains offload sections.
238 2014-11-13  Bernd Schmidt  <bernds@codesourcery.com>
239             Thomas Schwinge  <thomas@codesourcery.com>
240             Ilya Verbin  <ilya.verbin@intel.com>
241             Andrey Turetskiy  <andrey.turetskiy@intel.com>
243         * Makefile.am (libexecsubdir): Tweak for the possibility of being
244         configured for offload compiler.
245         (accel_dir_suffix, real_target_noncanonical): New variables substituted
246         by configure.
247         * Makefile.in: Regenerate.
248         * configure: Regenerate.
249         * configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
250         variables.
252 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
254         PR target/63610
255         * configure: Regenerate.
257 2014-08-26  H.J. Lu  <hongjiu.lu@intel.com>
259         PR bootstrap/62260
260         * Makefile.am (gcc_build_dir): Set to @gcc_build_dir@.
261         * configure.ac (gcc_build_dir): Set and AC_SUBST according to
262         $host_subdir.
263         * Makefile.in: Regenerated.
264         * configure: Likewise.
266 2014-06-13  Thomas Schwinge  <thomas@codesourcery.com>
268         * configure.ac (--with-libiberty): New configure option.
269         * configure: Regenerate.
270         * Makefile.am (libiberty, libiberty_noasan, libiberty_pic): New
271         variables.
272         (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS)
273         (liblto_plugin_la_DEPENDENCIES): Use them.
274         * Makefile.in: Regenerate.
276 2014-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
278         PR lto/60981
279         * configure.ac: Check for -static-libgcc.
280         * configure: Regenerate.
282 2014-04-17  Jakub Jelinek  <jakub@redhat.com>
284         PR sanitizer/56781
285         * Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address.
286         (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS,
287         liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a
288         over ../libiberty/pic/libiberty.a if the former exists.
289         * Makefile.in: Regenerated.
291         PR sanitizer/56781
292         * Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
293         * Makefile.in: Regenerated.
295 2014-04-02  Richard Biener  <rguenther@suse.de>
297         * lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin
298         is set in COLLECT_GCC_OPTIONS.
300 2014-03-28  Richard Biener  <rguenther@suse.de>
302         * lto-plugin.c (process_symtab): Handle EINTR and short reads.
304 2014-03-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
306         * configure.ac (ac_lto_plugin_ldflags): Set to -Wc,-static-libgcc
307         for gcc.
308         * configure: Regenerate.
309         * Makefile.am (AM_LDFLAGS): New variable.
310         (liblto_plugin_la_LDFLAGS): Add it.
311         * Makefile.in: Regenerate.
313 2013-09-20  Alan Modra  <amodra@gmail.com>
315         * configure: Regenerate.
317 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
319         * configure: Regenerated.
321 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
323         * lto-plugin.c: Fix typo.
325 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
327         * configure: Regenerated.
329 2012-02-22  Kai Tietz  <ktietz@redhat.com>
331         PR lto/50616
332         * lto-plugin.c (PRI_LL): New macro.
333         (dump_symtab): Use PRI_LL instead of ll in print.
334         (process_symtab): Use PRI_LL instead of ll in scan.
336 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
338         * configure: Regenerate.
340 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
342         * configure: Regenerate.
344 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
346         * configure: Regenerate.
348 2011-10-02  Jan Hubicka  <jh@suse.cz>
350         PR lto/47247
351         * lto-plugin.c (get_symbols_v2): New variable.
352         (write_resolution): Use V2 API when available.
353         (onload): Handle LDPT_GET_SYMBOLS_V2.
355 2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
356             Andi Kleen  <ak@linux.intel.com>
358         PR lto/50568
359         * lto-plugin.c (sym_aux): Change id to unsigned long long.
360         (plugin_symtab): Likewise.
361         (dump_symtab): Likewise.
362         (resolve_conflicts): Likewise.
363         (process_symtab): Likewise.
365 2011-08-10  Richard Guenther  <rguenther@suse.de>
367         PR bootstrap/49907
368         lto-plugin/
369         * configure.ac: Use ACX_PROG_CC_WARNING_OPTS to detect -Wall presence.
370         * Makefile.am (AM_CFLAGS): Adjust.  Do not build with -Werror.
371         * configure: Regenerate.
372         * Makefile.in: Likewise.
373         * aclocal.m4: Likewise.
375 2011-04-20  Jim Meyering  <meyering@redhat.com>
377         * lto-plugin.c (free_1, free_2): Remove useless if-before-free.
379 2011-04-05  Richard Guenther  <rguenther@suse.de>
381         PR bootstrap/48431
382         * lto-plugin.c (claim_file_handler): Do not declare vars in code.
384 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
386         * Makefile.in: Regenerate.
387         * aclocal.m4: Regenerate.
388         * configure: Regenerate.
390 2011-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
392         * Makefile.am (all-local): Rename from 'all'.
393         * Makefile.in: Regenerate.
395 2011-02-12  Alexandre Oliva  <aoliva@redhat.com>
397         PR lto/47225
398         * Makefile.am (gcc_build_dir, in_gcc_libs): New.
399         (liblto_plugin_la_LDFLAGS): Add -module.
400         (copy_lto_plugin): Renamed to...
401         ($(in_gcc_libs)): ... this.  Add mkinstalldirs.  Skip copying
402         of static modules.
403         * Makefile.in: Rebuild.
405 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
407         PR lto/47225
408         * Makefile.am (Wc): New helper for encoding -Wc,.
409         (liblto_plugin_la_LIBADD): Use Wc for libiberty library.
410         (liblto_plugin_la_DEPENDENCIES): Special case pic libiberty.
411         * Makefile.in: Regenerated.
413 2011-02-07  Paolo Bonzini  <bonzini@gnu.org>
415         Revert:
417         2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
419         PR lto/47225
420         * Makefile.am (Wl): New helper for encoding -Wl,.
421         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
422         * Makefile.in: Regenerated.
424 2011-02-07  Kai Tietz  <kai.tietz@onevision.com>
426         PR lto/47225
427         * Makefile.am (Wl): New helper for encoding -Wl,.
428         (liblto_plugin_la_LIBADD): Use -Wl for libiberty library.
429         * Makefile.in: Regenerated.
431 2011-01-25  Ian Lance Taylor  <iant@google.com>
433         * lto-plugin.c (gold_version): New static variable.
434         (all_symbols_read_handler): Don't check pass_through_items if
435         using gold 1.11 or later.
436         (onload): Set gold_version if we see LDPT_GOLD_VERSION.
438 2011-01-12  Richard Guenther  <rguenther@suse.de>
440         PR lto/47264
441         * lto-plugin.c (parse_table_entry): Use memcpy to access
442         unaligned fields.
444 2010-12-20  Dave Korn  <dave.korn.cygwin@gmail.com>
446         * Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.
447         * Makefile.in: Regenerate.
449 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
451         Revert last change.
453 2010-12-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
455         * Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
456         (liblto_plugin_la_LIBADD): Use -L../libiberty/pic -liberty.
457         (liblto_plugin_la_LDFLAGS): Use -L../libiberty -liberty.
458         * Makefile.in: Regenerate.
460 2010-12-10  Dave Korn  <dave.korn.cygwin@gmail.com>
462         PR middle-end/46674
463         PR lto/43157
464         * configure.ac (SYM_STYLE): Don't AC_DEFINE.
465         * lto-plugin.c (sym_style): Don't use it; default to ss_none.
466         * configure: Regenerate.
467         * config.h.in: Likewise.
469 2010-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
471         PR target/40125
472         PR lto/46695
473         * configure.ac: Invoke ACX_LT_HOST_FLAGS.
474         * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but
475         override -bindir setting.
476         * aclocal.m4: Regenerate.
477         * configure: Regenerate.
478         * Makefile.in: Regenerate.
480 2010-12-05  Kai Tietz  <kai.tietz@onevision.com>
482         * config.h.in: Regenerated.
483         * configure: Regenerated.
484         * configure.ac (AC_CHECK_HEADERS): Replaced by AC_HEADER_SYS_WAIT.
485         * lto-plugin.c (WIFEXITED): Define default.
486         (WEXITSTATUS): Likeiwse.
488 2010-12-01  Kai Tietz  <kai.tietz@onevision.com>
490         * config.h.in: Regenerated.
491         * configure: Regenerated.
492         * Makefile.in: Regenerated.
493         * configure.ac (AC_CHECK_HEADERS): Check for sys/wait.h.
494         * lto-plugin.c:  Include sys/wait.h conditionally.
495         * aclocal.m4: Regenerated.
497 2010-11-13  Kai Tietz  <kai.tietz@onevision.com>
499         * lto-plugin.c (add_output_files): Fix memory leak.
501 2010-11-11  Dave Korn  <dave.korn.cygwin@gmail.com>
503         PR bootstrap/46397
504         PR bootstrap/46362
505         * configure.ac: Add AC_TYPE_INT64_T test.
506         * config.h.in: Regenerate.
507         * configure: Likewise.
508         * lto-plugin.c (debug): Use char not bool.
509         (nop): Likewise.
510         (check_1): Rename from check, and use int not bool for gate argument.
511         (check): Macro wrapper for the above to coerce gate argument into
512         boolean-valued integer in case it has pointer type.
513         (parse_table_entry): Use 0 not false.
514         (claim_file_handler): Avoid use of PRIx64 by splitting 64-bit size
515         into two 32-bit parts and printing as hex ints.
517 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
519         PR lto/46291
520         * lto-plugin.c (claim_file_handler): Don't close file descriptor.
522 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
524         PR lto/46273
525         * lto-plugin.h: Delete.
526         * lto-plugin-elf.c: Likewise.
527         * lto-plugin-coff.c: Likewise.
528         * configure.ac: Don't use libelf, don't source config.gcc.
529         (LIBELFLIBS): Delete.
530         (LIBELFINC): Delete.
531         (LTO_FORMAT): Delete.
532         (SYM_STYLE): Add AC_DEFINE var, set based on $target.
533         (config.h): Add AC_CONFIG_HEADERS directive.
534         * Makefile.am (LIBELFLIBS): Delete.
535         (LIBELFINC): Delete.
536         (LTO_FORMAT): Delete.
537         (DEFS): Import.
538         (AM_CPPFLAGS): Use it.  Don't use LIBELFINC.
539         (liblto_plugin_la_SOURCES): Don't use LTO_FORMAT, don't include
540         any object-format-specific source file in the link.
541         (liblto_plugin_la_LIBADD): Don't use LIBELFLIBS.
542         * config.h.in: Generate.
543         * configure: Regenerate.
544         * Makefile.in: Likewise.
545         * lto-plugin.c (O_BINARY): Definition moved here from lto-plugin.h.
546         (LTO_SEGMENT_NAME): New definition.
547         (LTO_SECTION_PREFIX): Definition moved here from lto-plugin.h.
548         (LTO_SECTION_PREFIX_LEN): New definition.
549         (struct sym_aux): Struct definition moved here from lto-plugin.h.
550         (struct plugin_symtab): Likewise.
551         (struct plugin_objfile): Likewise.
552         (struct plugin_objfile): New struct def.
553         (enum symbol_style): New enum type.
554         (add_symbols): Make static.
555         (claimed_files): Likewise.
556         (num_claimed_files): Likewise.
557         (sym_style): New global.
558         (check): Make static.
559         (parse_table_entry): Likewise.  Respect sym_style when extracting
560         symbol from symtab entry.
561         (translate): Make static.
562         (resolve_conflicts): Likewise.
563         (process_symtab): New function, per-section callback version of
564         old object-format-specific handling from deleted lto-plugin-elf.c.
565         (claim_file_handler): Convert ELF-specific version from deleted
566         lto-plugin-elf.c to simple_object interface and move here.
567         (process_options): Allow new '-sym-style=' option.
568         (onload): Don't call deleted onload_format_checks hook.
570 2010-10-11  Kai Tietz  <kai.tietz@onevision.com>
572         * lto-plugin.c (dump_symtab): Correct printf argument type.
573         (finish_conflict_resolution): Initialize resolution.
575 2010-10-08  H.J. Lu  <hongjiu.lu@intel.com>
577         PR bootstrap/45951
578         * configure.ac: Add AC_CANONICAL_SYSTEM.
579         * configure: Regenerated.
581 2010-10-07  Dave Korn  <dave.korn.cygwin@gmail.com>
583         * configure.ac: Source config.gcc to determine lto_binary_reader.
584         (LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
585         * Makefile.am (LTO_FORMAT): Import.
586         (liblto_plugin_la_SOURCES): Add object format dependent module
587         defined by LTO_FORMAT.
588         (liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
589         and work around libtool warning.
590         * configure: Regenerate.
591         * Makefile.in: Likewise.
592         * lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
593         (struct sym_aux): Likewise.
594         (struct plugin_symtab): Likewise.
595         (struct plugin_file_info): Likewise.
596         (LTO_SECTION_PREFIX): Likewise.
597         (add_symbols):  Make non-static.
598         (claimed_files): Likewise.
599         (num_claimed_files): Likewise.
600         (check): Likewise.
601         (parse_table_entry): Likewise.
602         (translate): Likewise.
603         (resolve_conflicts): Likewise.
604         (process_symtab): Move to new lto-plugin-elf.c object format dependent
605         source file.
606         (claim_file_handler): Likewise, and make non-static.
607         (onload): Call new onload_format_checks function.
608         * lto-plugin.h: New file.
609         (LTO_SECTION_PREFIX): Move here.
610         (struct sym_aux): Likewise.
611         (struct plugin_symtab): Likewise.
612         (struct plugin_file_info): Likewise.
613         (claim_file_handler): Add new function prototype.
614         (onload_format_checks): Likewise.
615         (check): Declare extern.
616         (translate): Likewise.
617         (parse_table_entry): Likewise.
618         (resolve_conflicts): Likewise.
619         (add_symbols):  Likewise.
620         (claimed_files): Likewise.
621         (num_claimed_files): Likewise.
622         * lto-plugin-elf.c (process_symtab): Move here.
623         (claim_file_handler): Likewise, and make non-static.
624         (onload_format_checks): New function factored out from onload.
625         * lto-plugin-coff.c (claim_file_handler): New function stub.
626         (onload_format_checks): Likewise.
628 2010-08-05  Andi Kleen  <ak@linux.intel.com>
630         * lto-plugin.c: Include <hashtab.h>
631         (sym_aux): Add next_conflict field to save conflict chains.
632         (plugin_file_info): Add conflicts symtab.
633         (parse_table_entry): Initialize aux->next_conflict.
634         (process_symtab): Increment found.
635         (dump_symtab): Add.
636         (finish_conflict_resolution): Add.
637         (free_symtab): Add.
638         (write_resolution): Remove symbols loop and move into
639         dump_symtab. Call dump_symtab for main symbol and conflicts table.
640         Call free_symtab to free conflicts table.
641         (SWAP): Add.
642         (eq_sym): Add.
643         (hash_sym): Add.
644         (symbol_strength): Add.
645         (resolve_conflicts): Add.
646         (claim_file_handler): Add n variable. Check return value of
647         process_symtab. Call resolve_conflicts.
649 2010-07-27  Andi Kleen  <ak@linux.intel.com>
651         * lto-plugin.c (translate): Remove debug fprintf.
653 2010-07-23  H.J. Lu  <hongjiu.lu@intel.com>
655         PR bootstrap/45042
656         * lto-plugin.c (translate): Cast to unsigned long.
658 2010-07-23   Andi Kleen  <ak@linux.intel.com>
660         PR lto/44992
661         * lto-plugin.c (sym_aux): Add.
662         (plugin_symtab): Remove slots. Add aux and id.
663         (parse_table_entry): Change to use aux instead of slots.
664         (LTO_SECTION_PREFIX): Add.
665         (translate): Improve buffer allocation. Change to append
666         symbols to existing out buffer.
667         (get_section): Remove.
668         (process_symtab): Add.
669         (free_2): Free symtab->aux.
670         (write_resolution): Handle aux instead of slots.
671         Print sub id to resolution file.
672         (claim_file_handler): Clear lto_file. Replace get_symtab/translate
673         calls with call to process_symtab.
675 2010-07-22  Richard Guenther  <rguenther@suse.de>
677         * Makefile.am: New copy_lto_plugin rule to install the plugin
678         into ../gcc.
679         * Makefile.in: Regenerated.
681 2010-05-21  Richard Guenther  <rguenther@suse.de>
683         * lto-plugin.c (write_resolution): Do not assert syms is non-NULL.
685 2010-05-07  Richard Guenther <rguenther@suse.de>
687         * lto-plugin.c (free_2): Do not free resolution_file.
688         (write_resolution): Check that we were passed a resolution file.
689         (all_symbols_read_handler): Adjust.
690         (cleanup_handler): Do not remove the resolution file.
691         (process_option): Handle -fresolution=.
693 2010-05-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
695         PR other/43620
696         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
697         * Makefile.in: Regenerate.
699 2010-04-23  Richard Guenther  <rguenther@suse.de>
701         PR lto/41550
702         * lto-plugin.c (parse_table_entry): Use xstrdup and xrealloc.
703         (translate): Likewise.
704         (all_symbols_read_handler): Likewise.
705         (claim_file_handler): Likewise.
706         (process_option): Likewise.
707         (add_output_files): Likewise.  Remove filename length limit.
709 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
711         * Makefile.in: Regenerate.
712         * aclocal.m4: Regenerate.
714 2010-03-16  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
716         PR lto/43336
717         * lto-plugin.c (cleanup_handler): Delete temporary output files.
719 2010-01-11  Richard Guenther  <rguenther@suse.de>
721         PR lto/41569
722         * Makefile.am: Disable dependencies.
723         * Makefile.in: Regenerated.
725 2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
727         PR lto/42520
728         * lto-plugin.c (exec_lto_wrapper): Output lto-wrapper command
729         if -v is passed.
731 2009-12-05  H.J. Lu  <hongjiu.lu@intel.com>
733         PR bootstrap/42306
734         * configure: Regenerated.
735         * Makefile.in: Likewise.
737 2009-11-19  Rafael Avila de Espindola  <espindola@google.com>
739         PR bootstrap/42096
740         * lto-plugin.c (claim_file_handler): Print offsets in hex.
742 2009-11-12  Rafael Avila de Espindola  <espindola@google.com>
744         * lto-plugin.c (write_resolution): Assume resolution_file is set.
745         Print the symbol name.
746         (all_symbols_read_handler): Create a resolution file.
747         Pass it to gcc.
748         (cleanup_handler): Remove the resolution file.
749         (process_option): Drop the -resolution option.
751 2009-11-05  Rafael Avila de Espindola  <espindola@google.com>
753         * lto-plugin.c (temp_obj_dir_name): Remove.
754         (arguments_file_name): New.
755         (free_2): Free arguments_file_name instead of temp_obj_dir_name.
756         (exec_lto_wrapper):  Create arguments file with make_temp_file.
757         (cleanup_handler): Don't remove the temporary directory. Remove the
758         arguments file.
759         (onload): Don't create the temporary directory.
761 2009-11-04  Richard Guenther  <rguenther@suse.de>
762             Rafael Avila de Espindola  <espindola@google.com>
764         * lto-plugin.c (plugin_file_info): Remove temp field.
765         (cleanup_handler): Don't delete temporary objects.
766         (claim_file_handler): Don't create temporary objects.
768 2009-11-04  Rafael Avila de Espindola  <espindola@google.com>
770         * lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
772 2009-10-30  Rafael Avila de Espindola  <espindola@google.com>
774         PR41871
775         * lto-plugin.c (claim_file_handler): Close files that we created.
777 2009-10-28  Rafael Avila de Espindola  <espindola@google.com>
779         * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
780         LDPL_ERROR
782 2009-10-27  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
784         PR lto/41652
785         * configure.ac: Call AC_SYS_LARGEFILE before AC_OUTPUT.
786         * configure: Regenerate.
788 2009-10-26  Richard Guenther  <rguenther@suse.de>
790         * configure.ac: Use AM_MAINTAINER_MODE.
791         * acinclude.m4: Remove.
792         * configure: Re-generate.
793         * Makefile.in: Likewise.
794         * aclocal.m4: Likewise.
796 2009-10-19  Rafael Avila de Espindola  <espindola@google.com>
797     
798         PR40790
799         * configure: Regenerate.
800         * configure.ac: Add AC_TYPE_UINT64_T.
802 2009-10-16  Rafael Avila de Espindola  <espindola@google.com>
804         * lto-plugin.c (message): New variable.
805         (check): New function.
806         (parse_table_entry, translate, write_resolution,add_output_files,
807         exec_lto_wrapper,claim_file_handler, onload): Use check instead of
808         assert.
809         (cleanup_handler): Use check instead of assert. Remove the arguments
810         file if it exists.
812 2009-10-15  Rafael Avila de Espindola  <espindola@google.com>
814         * lto-plugin.c (resolution_file): New.
815         (free_1): Update comment.
816         (free_2): Free resolution_file.
817         (write_resolution): Write resolution to specified file. Use the
818         syms array from the symbol table.
819         (all_symbols_read_handler): Delay call to free_1 past call to
820         write_resolution.
821         (process_option): Add a -resolution option.
823 2009-10-13  Richard Guenther  <rguenther@suse.de>
825         * Makefile.am (liblto_plugin_la_LIBADD): Link against the
826         correct libiberty.
827         * Makefile.in: Regenerated.
829 2009-10-08  Rafael Avila de Espindola  <espindola@google.com>
831         * lto-plugin.c (add_input_library): New.
832         (all_symbols_read_handler): Use add_input_library for items that
833         start with -l.
834         (process_option): Fit in 80 columns.
835         (onload): Handle LDPT_ADD_INPUT_LIBRARY.
837 2009-10-02  Diego Novillo  <dnovillo@google.com>
839         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
840         and -D_FILE_OFFSET_BITS=64.
841         * configure.ac: Add AC_SYS_LARGEFILE.
842         * configure: Regenerate.
843         * Makefile.in: Regenerate.
844         * lto-plugin.c: Fix copyright boilerplate.
846 2009-10-02  Diego Novillo  <dnovillo@google.com>
848         * Makefile.am (ACLOCAL_AMFLAGS): Define.
849         * aclocal.m4: Regenerate with aclocal-2.64
850         * acinclude.m4: Remove.
851         * Makefile.in: Regenerate with automake-1.11
852         * configure.ac (AC_PREREQ): Update to 2.64.
853         * configure: Regenerate.
855 2009-10-02  Diego Novillo  <dnovillo@google.com>
857         * Makefile.am (AM_CPPFLAGS): Remove -D_LARGEFILE_SOURCE
858         and -D_FILE_OFFSET_BITS=64.
859         * configure.ac: Add AC_SYS_LARGEFILE.
860         * configure: Regenerate.
861         * Makefile.in: Regenerate.
862         * lto-plugin.c: Fix copyright boilerplate.
864 2009-10-02  Diego Novillo  <dnovillo@google.com>
866         * Makefile.am (ACLOCAL_AMFLAGS): Define.
867         * aclocal.m4: Regenerate with aclocal-2.64
868         * acinclude.m4: Remove.
869         * Makefile.in: Regenerate with automake-1.11
870         * configure.ac (AC_PREREQ): Update to 2.64.
871         * configure: Regenerate.
873 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
875         * Makefile.am (liblto_plugin_la_SOURCES): Remove
876         $(top_srcdir)/../gcc/lto/common.c
877         * Makefile.in: Regenerate.
879 2009-10-01  Rafael Avila de Espindola  <espindola@google.com>
881         * lto-plugin.c (pass_through_items): New.
882         (num_pass_through_items): New.
883         (all_symbols_read_handler): Update to use the -pass-through option.
884         (process_option): Replace -libgcc with -pass-through.
885         
886 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
888         * lto-plugin.c (onload): Return a ld_plugin_status. Don't require
889         register_cleanup to be set.
891 2009-09-30  Rafael Avila de Espindola  <espindola@google.com>
893         * Makefile.am: Remove all reference to ltosymtab.
894         * Makefile.in: Regenerate.
895         * lto-symtab.c: Remove.
897 2009-05-21  Diego Novillo  <dnovillo@google.com>
899         * configure.ac: Remove call to AC_CHECK_GELF.
900         Call AC_ARG_VAR for LIBELFLIBS and LIBELFINC.
901         * acinclude.m4: Do not include ../config/libelf.m4
902         * Makefile.am (LIBELFLIBS): Define.
903         (LIBELFINC): Define.
904         (AM_CPPFLAGS): Add $(LIBELFINC).
905         (ltosymtab_LDADD): Add $(LIBELFLIBS).
906         (liblto_plugin_la_LIBADD): Add $(LIBELFLIBS)
907         * lto-plugin.c: Always include <gelf.h>
908         * lto-symtab.c: Likewise.
909         * configure: Regenerate.
910         * Makefile.in: Regenerate.
912 2009-03-23  Rafael Avila de Espindola  <espindola@google.com>
914         * lto-plugin.c (libgcc_filename): New.
915         (all_symbols_read_handler): Pass libgcc to the linker.
916         (all_symbols_read_handler): Parse -libgcc
918 2009-02-05  Rafael Avila de Espindola  <espindola@google.com>
920         * Makefile.am (liblto_plugin_la_LIBADD): Link with libiberty.
921         * Makefile.in: Regenerate.
922         * lto-plugin.c (add_output_files): Argument is now a FILE.
923         (exec_lto_wrapper): Use writeargv and pex.
925 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
927         Revert:
928         2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
929         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
932 2009-02-04  Rafael Avila de Espindola  <espindola@google.com>
934         * lto-plugin.c (exec_lto_wrapper): Use writeargv.
936 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
938         * lto-plugin.c: Include libiberty.h.
939         (exec_lto_wrapper, claim_file_handler): Use asprintf instead of
940         snprintf.
942 2009-01-29  Rafael Avila de Espindola  <espindola@google.com>
944         * lto-plugin.c (exec_lto_wrapper): Write argv to a file. Pass that
945         file to lto-wrapper.
947 2009-01-28  Rafael Avila de Espindola  <espindola@google.com>
949         * lto-plugin.c (plugin_file_info): Remove fd and elf.
950         (parse_table_entry): strdup entry->name and entry->comdat_key.
951         (free_1): Free name and comdat_key. Don't close the file. Don't call
952         elf_end.
953         (claim_file_handler): Always call elf_end.
955 2008-12-23  Rafael Avila de Espindola  <espindola@google.com>
957         * Makefile.am (AM_CPPFLAGS): Add -D_LARGEFILE_SOURCE
958         -D_FILE_OFFSET_BITS=64
959         * Makefile.in: Regenerate
961 2008-12-22  Rafael Avila de Espindola  <espindola@google.com>
963         * Makefile.am (gcc_version, target_noncanonical, libexecsubdir): New.
964         (lib_LTLIBRARIES): Rename to libexecsub_LTLIBRARIES.
965         * Makefile.in: Regenerate.
966         * acinclude.m4: Include ../config/acx.m4 and ../lt~obsolete.m4
967         * configure: Regenerate.
968         * configure.ac: Add AC_SUBST(target_noncanonical).
970 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
972         * lto-plugin.c: Include stdbool.h.
973         (debug, nop): Declare as bool.
975 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
977         * lto-plugin.c (nop): New.
978         (use_original_files): New.
979         (all_symbols_read_handler): Call use_original_files if nop is true.
980         (process_option): Parse the -nop option.
982 2008-12-08  Rafael Avila de Espindola  <espindola@google.com>
984         * lto-plugin.c (debug): New.
985         (exec_lto_wrapper): Print argv if debug is true.
986         (process_option): Process the -debug command line option.
988 2008-12-03  Rafael Avila de Espindola  <espindola@google.com>
990         * lto-plugin.c (process_option): The argument is now a single option,
991         not a space separated list.
993 2008-12-02  Rafael Avila de Espindola  <espindola@google.com>
995         * lto-plugin.c: Include sys/types.h and sys/wait.h
996         (output_files, num_output_files, lto_wrapper_argv,
997         lto_wrapper_num_args): New.
998         (free_2): Free output_files.
999         (write_resolution): Disable.
1000         (add_output_files): New.
1001         (exec_lto_wrapper): New.
1002         (all_symbols_read_handler): Run lto-wrapper.
1003         (claim_file_handler): Free lto_file.name and call elf_end.
1004         (process_option): New.
1006 2008-11-26  Rafael Espindola  <espindola@google.com>
1008         * lto-plugin.c (add_input_file): New.
1009         (get_section): Return NULL if get_section fails.
1010         (write_resolution): New.
1011         (all_symbols_read_handler): Call add_input_file.
1012         (claim_file_handler): Unlink the correct file.
1013         (onload): Record add_input_file.
1015 2008-09-23 Rafael Espindola  <espindola@google.com>
1017         * Makefile.am (ltosymtab_SOURCES, liblto_plugin_la_SOURCES):
1018         Update the location of common.c.
1019         * Makefile.in: Regenerate.
1020         * common.c: Moved to gcc/lto.
1021         * common.h: Moved to gcc/lto.
1022         * lto-plugin.c: Update the location of common.h.
1023         * lto-symtab.c: Update the location of common.h.
1025 2008-09-23 Rafael Espindola  <espindola@google.com>
1027         * common.c: Include common.h.
1028         (lto_kind_str, lto_visibility_str, lto_resolution_str): Use explicit
1029         sizes.
1030         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str): Use
1031         explicit sizes.
1033 2008-09-23 Rafael Espindola  <espindola@google.com>
1035         * lto-plugin.c (plugin_file_info): Add temp.
1036         (cleanup_handler): Only delete temporary files.
1037         (claim_file_handler): Initialize lto_file.temp.
1039 2008-09-23  Rafael Espindola  <espindola@google.com>
1041         * plugin-api.h: Moved to include.
1043 2008-09-23 Rafael Espindola  <espindola@google.com>
1045         * lto-plugin.c (all_symbols_read_handler): Print resolution in a new
1046         format.
1048 2008-09-22 Rafael Espindola  <espindola@google.com>
1050         * plugin-api.h: Copy from binutils' cvs.
1052 2008-09-22 Rafael Espindola  <espindola@google.com>
1054         * lto-symtab.c (get_symbols, add_symbols): Update signature.
1055         * plugin-api.h: Copy from binutils' cvs.
1057 2008-09-22 Rafael Espindola  <espindola@google.com>
1059         * common.h (lto_kind_str, lto_visibility_str, lto_resolution_str):
1060         Make extern
1062 2008-09-10 Rafael Espindola  <espindola@google.com>
1064         * lto-plugin.c (onload): add missing break statements and asserts.
1065         * lto-symtab.c (claim_file_handler): Make it static.
1066         (all_symbols_read_handler): Make it static.
1067         (all_file_handles): Make it static.
1068         (num_file_handles): Make it static.
1069         (register_claim_file): Make it static.
1070         (register_object): Indent properly.
1072 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
1074         * Makefile.am (ltosymtab_LDADD): Add -lelf.
1075         * Makefiel.in: Regenerate.
1076         * lto-plugin.c: Include ar.h.
1077         (claim_file_handler): Handle file->offset != 0.
1078         * lto-symtab.c: Include gelf.h.
1079         (all_file_handles): Change type.
1080         (register_object): New.
1081         (register_file): Add support for archives.
1082         (resolve): Update to new type of all_file_handles.
1083         (print): Update to new type of all_file_handles.
1084         (free_all): Update to new type of all_file_handles.
1085         (main): Update to new type of all_file_handles.
1087 2008-09-10  Rafael Avila de Espindola  <espindola@google.com>
1089         * lto-plugin.c (get_string_table): Remove.
1090         (get_section): Use elf_strptr instead of get_string_table.
1092 2008-09-08  Doug Kwan  <dougkwan@google.com>
1094         * lto-plugin.c (all_symbols_read_handler): Widen fprintf arguments
1095         to 64-bit to fix a 32-bit bootstrap failure due to format warnings.
1097 2008-09-08  Rafael Avila de Espindola  <espindola@google.com>
1099         * Makefile.am (ltosymtab_SOURCES): add common.c.
1100         (ltosymtab_CFLAGS): New.
1101         (liblto_plugin_la_SOURCES): Add common.c.
1102         * Makefile.in: Regenerate.
1103         * common.c: New.
1104         * common.h: New.
1105         * lto-plugin.c: Include stdio.h, inttypes.h and common.h.
1106         (plugin_symtab): New.
1107         (plugin_file_info): New.
1108         (register_all_symbols_read): New.
1109         (get_symbols): New.
1110         (claimed_files): New.
1111         (num_claimed_files): New.
1112         (translate): Don't drop the slot number.
1113         (free_1): New.
1114         (free_2): New.
1115         (all_symbols_read_handler): New.
1116         (claim_file_handler): Record every claimed file.
1117         (onload): Handle LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1118         LDPT_GET_SYMBOLS.
1119         * lto-symtab.c: Include stdlib.h, string.h and common.h.
1120         (current_file_handle): Remove.
1121         (ld_plugin_all_symbols_read_handler): New.
1122         (plugin_handle): New.
1123         (file_handle): New.
1124         (all_file_handles): New.
1125         (num_file_handles): New.
1126         (get_symbols): New.
1127         (register_all_symbols_read): New.
1128         (add_symbols): Don't print the symbols, just record them.
1129         (ld_plugin_tv): Add LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK and
1130         LDPT_GET_SYMBOLS.
1131         (load_plugin): Use plugin_handle.
1132         (register_file): Add the file handle to all_file_handles.
1133         (resolve): New.
1134         (print): New.
1135         (unload_plugin): New.
1136         (free_all): New.
1137         (main): Call all_symbols_read_handler and free resources.
1139 2008-09-03  Rafael Avila de Espindola  <espindola@google.com>
1141         * Makefile.am (AM_CFLAGS): New.
1142         (ltosymtab_LDADD): Remove -lelf. Add -ldl.
1143         (lib_LTLIBRARIES): New.
1144         (liblto_plugin_la_SOURCES): New.
1145         (liblto_plugin_la_LIBADD): New.
1146         * Makefile.in: Regenerate.
1147         * acinclude.m4: Don't include ../config/acx.m4 and
1148         ../config/no-executables.m4.
1149         Include ../ltsugar.m4, ../ltoptions.m4, ../ltversion.m4 and
1150         ../libtool.m4.
1151         * aclocal.m4: Regenerate.
1152         * configure: Regenerate.
1153         * configure.ac: Use AM_PROG_LIBTOOL.
1154         * lto-plugin.c: New.
1155         * lto-symtab.c: Rewrite to use the plugin.
1156         * plugin-api.h: New.
1158 2008-08-25  Rafael Avila de Espindola  <espindola@google.com>
1160         * configure: Regenerate.
1161         * configure.ac: Use AC_CHECK_GELF.
1162         * lto-symtab.c: Include gelf.h.
1163         (get_string_table): Use size independent API.
1164         (printTable): Use lld to print 64 bit integers.
1166 2008-08-22  Rafael Avila de Espindola  <espindola@google.com>
1168         * lto-symtab.c (parse_table_entry): Assert entry->kind and
1169         entry->visibility are valid.
1171 2008-07-22  Rafael Avila de Espindola  <espindola@google.com>
1172         * lto-symtab.c (table_entry): Add comdat.
1173         (parse_table_entry): Read comdat.
1175 2008-08-21  Rafael Espindola  <espindola@google.com>
1177         * Makefile.am: New.
1178         * Makefile.in: New.
1179         * acinclude.m4: New.
1180         * aclocal.m4: New.
1181         * configure: New.
1182         * configure.ac: New.
1183         * lto-symtab.c: New.