Commit Graph

1254 Commits

Author SHA1 Message Date
GCC Administrator c2bd5d8a30 Daily bump. 2021-10-23 00:16:26 +00:00
Eric Gallager c3e80a16af Add install-dvi Makefile targets.
Closes #102663

ChangeLog:

	PR other/102663
	* Makefile.def: Handle install-dvi target.
	* Makefile.tpl: Likewise.
	* Makefile.in: Regenerate.

c++tools/ChangeLog:

	PR other/102663
	* Makefile.in: Add dummy install-dvi target.

gcc/ChangeLog:

	PR other/102663
	* Makefile.in: Handle dvidir and install-dvi target.
	* configure: Regenerate.
	* configure.ac: Add install-dvi to target_list.

gcc/ada/ChangeLog:

	PR other/102663
	* gcc-interface/Make-lang.in: Allow dvi-formatted
	documentation to be installed.

gcc/c/ChangeLog:

	PR other/102663
	* Make-lang.in: Add dummy c.install-dvi target.

gcc/cp/ChangeLog:

	PR other/102663
	* Make-lang.in: Add dummy c++.install-dvi target.

gcc/d/ChangeLog:

	PR other/102663
	* Make-lang.in: Allow dvi-formatted documentation
	to be installed.

gcc/fortran/ChangeLog:

	PR other/102663
	* Make-lang.in: Allow dvi-formatted documentation
	to be installed.

gcc/lto/ChangeLog:

	PR other/102663
	* Make-lang.in: Add dummy lto.install-dvi target.

gcc/objc/ChangeLog:

	PR other/102663
	* Make-lang.in: Add dummy objc.install-dvi target.

gcc/objcp/ChangeLog:

	PR other/102663
	* Make-lang.in: Add dummy objc++.install-dvi target.

gnattools/ChangeLog:

	PR other/102663
	* Makefile.in: Add dummy install-dvi target.

libada/ChangeLog:

	PR other/102663
	* Makefile.in: Add dummy install-dvi target.

libcpp/ChangeLog:

	PR other/102663
	* Makefile.in: Add dummy install-dvi target.

libdecnumber/ChangeLog:

	PR other/102663
	* Makefile.in: Add dummy install-dvi target.

libiberty/ChangeLog:

	PR other/102663
	* Makefile.in: Allow dvi-formatted documentation
	to be installed.
2021-10-22 15:43:50 -07:00
GCC Administrator f5b3743596 Daily bump. 2021-10-18 00:16:27 +00:00
Luís Ferreira fb5b077858 [PATCH] d-demangle: properly skip anonymous symbols
libiberty/
	PR d/102618
	* d-demangle.c (dlang_parse_qualified): Handle anonymous
	symbols correctly.

	* testsuite/d-demangle-expected: New tests to cover anonymous
	symbols.
2021-10-17 18:38:10 -04:00
GCC Administrator 5d5885c99c Daily bump. 2021-10-15 00:17:02 +00:00
Luís Ferreira e19eea30d6 libiberty: d-demangle: Add test case for function literals
libiberty/ChangeLog:

	* testsuite/d-demangle-expected: Add test case for function literals.
2021-10-14 12:24:51 -04:00
Luís Ferreira 0555b86b5e libiberty: d-demangle: add test cases for simple special mangles
libiberty/ChangeLog:

	* testsuite/d-demangle-expected: Add test cases for simple special
	mangles.
2021-10-14 12:22:57 -04:00
GCC Administrator 52055987fb Daily bump. 2021-10-13 00:16:22 +00:00
Luís Ferreira 98c0ac7e0d [PATCH v2] libiberty: d-demangle: remove parenthesis where it is not needed
libiberty/
	* d-demangle.c (dlang_parse_qualified): Remove redudant parenthesis
	around lhs and rhs of assignments.
2021-10-12 10:40:20 -04:00
GCC Administrator 9d116bcc55 Daily bump. 2021-10-02 00:16:31 +00:00
Luís Ferreira cb4b82285b libiberty: testsuite: add missing format on d-demangle-expected
libiberty
	* testsuite/d-demangle-expected: Add missing format for new test
2021-10-01 13:26:48 -04:00
GCC Administrator 391b23e02b Daily bump. 2021-09-24 00:16:23 +00:00
Luís Ferreira b3585c0836 libiberty: prevent null dereferencing on dlang_type
libiberty/
	* d-demangle.c (dlang_Type): Validate MANGLED is nonnull.

	* testsuite/d-demangle-expected: New test.
2021-09-23 11:54:00 -04:00
Luís Ferreira 5481040197 libiberty: prevent buffer overflow when decoding user input
libiberty/
	* d-demangle.c (dlang_symbol_backref): Ensure strlen of
	string is less than length computed by dlang_number.
2021-09-23 11:48:45 -04:00
GCC Administrator e11c6046f9 Daily bump. 2021-09-02 00:16:59 +00:00
Iain Sandoe fbb334a6ac libiberty, configure, Darwin: Avoid detecting deprecated sbrk.
Darwin provides an implementation of sbrk, which is detected by
the configuration process.  However, it is deprecated which leads
to build warnings.  The malloc-based implementation is more
suitable.  This patch removes sbrk from the functions searched
for Darwin.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

libiberty/ChangeLog:

	* configure: Regenerate.
	* configure.ac: Do not search for sbrk on Darwin.
	* xmalloc.c: Do not declare sbrk unless it has been found
	by configure.
2021-09-01 19:34:07 +01:00
GCC Administrator 1e77fd4f17 Daily bump. 2021-08-30 00:16:44 +00:00
Iain Buclaw 392e141079 libiberty: Add support for demangling local D template declarations
The D language now allows multiple different template declarations in
the same function that have the same mangled name.  To make the mangled
names unique, a fake parent in the form `__Sddd' is added to the symbol.
This information is not important for the user, so the demangler now
handles and ignores it.

libiberty/ChangeLog:

	* d-demangle.c (dlang_identifier): Skip over fake parent manglings.
	* testsuite/d-demangle-expected: Add tests.
2021-08-30 01:14:18 +02:00
Iain Buclaw 34f3e0657a libiberty: Add support for demangling D function literals as template value parameters
The D language now allows instantiating templates using struct literals
that have function literal fields as a value argument.

libiberty/ChangeLog:

	* d-demangle.c (dlang_parse_arrayliteral): Add 'info' parameter.
	(dlang_parse_assocarray): Likewise.
	(dlang_parse_structlit): Likewise.
	(dlang_value): Likewise.  Handle function literal symbols.
	(dlang_template_args): Pass 'info' to dlang_value.
	* testsuite/d-demangle-expected: Add new test.
2021-08-30 01:14:18 +02:00
Iain Buclaw 0e32a5aa8b libiberty: Add support for D `typeof(*null)' types
The D language has a new bottom type `typeof(*null)'.  Null types were
also incorrectly being demangled as `none', this has been fixed to be
`typeof(null)'.

libiberty/ChangeLog:

	* d-demangle.c (dlang_attributes): Handle typeof(*null).
	(dlang_type): Likewise.  Demangle 'n' as typeof(null).
	* testsuite/d-demangle-expected: Update tests.
2021-08-30 01:14:18 +02:00
GCC Administrator 38b19c5b08 Daily bump. 2021-08-24 00:17:00 +00:00
Iain Sandoe 38757aa887 libiberty, Darwin: Fix a build warning.
r12-3005-g220c410162ebece4f missed a cast for the set_32 call.
Fixed thus.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

libiberty/ChangeLog:

	* simple-object-mach-o.c (simple_object_mach_o_write_segment):
	Cast the first argument to set_32 as needed.
2021-08-23 17:37:41 +01:00
GCC Administrator 6e529985d8 Daily bump. 2021-08-19 00:16:42 +00:00
Iain Sandoe 220c410162 libiberty, Darwin : Fix simple-object LTO table for cross-endian case.
We encapsulate streamed IR in three special sections with a table
that describes their entries.  The table is expected to be written
with native endianness for the target, but for cross-endian cross-
compilation the swapping was omitted.  Fixed thus.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

libiberty/ChangeLog:

	* simple-object-mach-o.c (simple_object_mach_o_write_segment):
	Arrange to swap the LTO index tables where needed.
2021-08-18 19:33:49 +01:00
GCC Administrator 25b6bfea5f Daily bump. 2021-07-01 00:16:41 +00:00
Gerald Pfeifer 13eaeffde5 libiberty: No longer use /usr/tmp
/usr/tmp is antiquated and not present on decently modern systems.
Remove it from consideration when choosing a directory for temporary
files.

libiberty:

2021-06-29  Gerald Pfeifer  <gerald@pfeifer.com>

	* make-temp-file.c (usrtmp): Remove.
	(choose_tmpdir): Remove use of usrtmp.
2021-07-01 00:00:26 +02:00
GCC Administrator c8abc2058e Daily bump. 2021-06-29 00:16:42 +00:00
Indu Bhagat 9c93f6cc95 libiberty: copy over .BTF section when using LTO
libiberty/ChangeLog:

	* simple-object.c (handle_lto_debug_sections): Copy over .BTF section.
2021-06-28 18:47:21 +02:00
Indu Bhagat b7e215a8ee CTF/BTF debug formats
This commit introduces support for generating CTF debugging
information and BTF debugging information from GCC.

2021-06-28  Indu Bhagat  <indu.bhagat@oracle.com>
	    David Faust  <david.faust@oracle.com>
	    Jose E. Marchesi  <jose.marchesi@oracle.com>
	    Weimin Pan  <weimin.pan@oracle.com>

gcc/

	* Makefile.in: Add ctfc.*, ctfout.c and btfout.c files to
	GTFILES.  Add new object files.
	* common.opt: Add CTF and BTF debug info options.
	* btfout.c: New file.
	* ctfc.c: Likewise.
	* ctfc.h: Likewise.
	* ctfout.c: Likewise.
	* dwarf2ctf.c: Likewise.
	* dwarf2ctf.h: Likewise.
	* dwarf2cfi.c (dwarf2out_do_frame): Acknowledge CTF_DEBUG and
	BTF_DEBUG.
	* dwarf2out.c (dwarf2out_source_line): Likewise.
	(dwarf2out_finish): Skip emitting DWARF if CTF or BTF are to
	be generated.
	(debug_format_do_cu): New function.
	(dwarf2out_early_finish): Traverse DIEs and emit CTF/BTF for
	them if	requested.
	Include dwarf2ctf.c.
	* final.c (dwarf2_debug_info_emitted_p): Acknowledge DWARF-based debug
	formats.
	* flag-types.h (enum debug_info_type): Add CTF_DEBUG and BTF_DEBUG.
	(CTF_DEBUG): New bitmask.
	(BTF_DEBUG): Likewise.
	(enum ctf_debug_info_levels): New enum.
	* gengtype.c (open_base_files): Handle ctfc.h.
	(main): Handle uint32_t type.
	* flags.h (btf_debuginfo_p): New definition.
	(dwarf_based_debuginfo_p): Likewise.
	* opts.c (debug_type_names): Add entries for CTF and BTF.
	(btf_debuginfo_p): New function.
	(dwarf_based_debuginfo_p): Likewise.
	(common_handle_option): Handle -gctfN and -gbtf options.
	(set_debug_level): Set CTF_DEBUG, BTF_DEBUG whenever appropriate.
	* toplev.c (process_options): Inform the user and ignore -gctfLEVEL if
	frontend is not C.

include/

	* ctf.h: New file.
	* btf.h: Likewise.

libiberty/

	* simple-object.c (handle_lto_debug_sections): Copy over .ctf
	sections.
2021-06-28 18:47:20 +02:00
GCC Administrator 28c6247505 Daily bump. 2021-06-06 00:16:22 +00:00
John David Anglin a0864ce866 Use libiberty snprintf and vsnprintf on hppa*-*-hpux*.
libiberty/ChangeLog:

	PR target/100734
	* configure.ac: Use libiberty snprintf and vsnprintf on
	hppa*-*-hpux*.
	* configure: Regenerate.
2021-06-05 15:48:04 +00:00
GCC Administrator cfe82a0cbe Daily bump. 2021-05-07 00:16:33 +00:00
Tom Tromey 77380c6806 libiberty: add htab_eq_string
The libiberty hash table includes a helper function for strings, but
no equality function.  Consequently, this equality function has been
reimplemented a number of times in both the gcc and binutils-gdb
source trees.  This patch adds the function to the libiberty hash
table, as a step toward the goal of removing all the copies.

One change to gcc is included here.  Normally I would have put this in
the next patch, but gensupport.c used the most natural name for its
reimplementation of this function, and this can't coexist with the
extern function in libiberty.

include

	* hashtab.h (htab_eq_string): Declare.

libiberty

	* hashtab.c (htab_eq_string): New function.

gcc

	* gensupport.c (htab_eq_string): Remove.
2021-05-06 08:51:28 -06:00
GCC Administrator 99e8df7a4c Daily bump. 2021-05-05 00:16:54 +00:00
Eric Botcazou f418bc3cd1 Fix libiberty link failures in LTO mode for MinGW
The test for the presence of variables (really symbols) does not work
when you add -Ox -flto to CFLAGS:

  for v in $vars; do
    AC_MSG_CHECKING([for $v])
    AC_CACHE_VAL(libiberty_cv_var_$v,
      [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v [];
                                         p = $v;]])],
                      [eval "libiberty_cv_var_$v=yes"],
                      [eval "libiberty_cv_var_$v=no"])])
    if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
      AC_MSG_RESULT(yes)
      AC_DEFINE_UNQUOTED($n)
    else
      AC_MSG_RESULT(no)
    fi
  done

because the assignment to 'p' is optimized away by LTO.  This is visible
on MinGW platforms in the form of a link failure for sys_siglist.

There is another link failures for stpcpy: the symbol is both referenced
by libiberty's pex-win32.c and provided by libiberty's stpcpy.c, so it
needs to have a linkage to be resolved in LTO mode.

libiberty/
	* configure.ac: Make test for variables more robust.
	* configure: Regenerate.
gcc/
	* builtins.c (builtin_with_linkage_p): Return true for stp[n]cpy.
	* symtab.c (symtab_node::output_to_lto_symbol_table_p): Tidy up.
2021-05-04 12:53:21 +02:00
GCC Administrator e690396da7 Daily bump. 2021-05-04 00:16:53 +00:00
H.J. Lu fd7eb4bc94 GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs
Sync with binutils for PR binutils/27397.  Check if host supports
multi-byte NOPs before enabling CET on host.

config/

	PR bootstrap/99703
	* cet.m4 (GCC_CET_HOST_FLAGS): Check if host supports multi-byte
	NOPs.

libiberty/

	PR bootstrap/99703
	* configure: Regenerated.
2021-05-03 05:00:05 -07:00
GCC Administrator c1ef0c9234 Daily bump. 2021-04-22 00:16:32 +00:00
Andreas Schwab 53bc2e123c Fix endian bug in rust demangler
libiberty/
	PR demangler/100177
	* rust-demangle.c (demangle_const_char): Properly print the
	character value.
2021-04-21 13:28:21 +02:00
GCC Administrator 95d217ab52 Daily bump. 2021-04-01 00:16:39 +00:00
Patrick Palka a3bf6ce7f2 c++: Adjust mangling of __alignof__ [PR88115]
r11-4926 made __alignof__ get mangled differently from alignof,
encoding __alignof__ as a vendor extended operator.  But this
mangling is problematic for the reasons mentioned in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88115#c6.

This patch changes our mangling of __alignof__ to instead use the
new "vendor extended expression" syntax that's proposed in
https://github.com/itanium-cxx-abi/cxx-abi/issues/112.  Clang does
the same thing already, so after this patch Clang and GCC agree
about the mangling of __alignof__(type) and __alignof__(expr).

gcc/cp/ChangeLog:

	PR c++/88115
	* mangle.c (write_expression): Adjust the mangling of
	__alignof__.

include/ChangeLog:

	PR c++/88115
	* demangle.h (enum demangle_component_type): Add
	DEMANGLE_COMPONENT_VENDOR_EXPR.

libiberty/ChangeLog:

	PR c++/88115
	* cp-demangle.c (d_dump, d_make_comp, d_expression_1)
	(d_count_templates_scopes): Handle DEMANGLE_COMPONENT_VENDOR_EXPR.
	(d_print_comp_inner): Likewise.
	<case DEMANGLE_COMPONENT_EXTENDED_OPERATOR>: Revert r11-4926
	change.
	<case DEMANGLE_COMPONENT_UNARY>: Likewise.
	* testsuite/demangle-expected: Adjust __alignof__ tests.

gcc/testsuite/ChangeLog:

	PR c++/88115
	* g++.dg/cpp0x/alignof7.C: Adjust expected mangling.
2021-03-30 22:57:11 -04:00
GCC Administrator bc2127767a Daily bump. 2021-03-17 00:16:25 +00:00
Nick Clifton f6e9c1c919 Fix potentially undefined behaviour when computing a sha1 value.
libiberty/
	* sha1.c (sha1_process_bytes): Use memmove in place of memcpy.
2021-03-16 14:43:17 +00:00
GCC Administrator b2a55cafa8 Daily bump. 2021-02-21 00:16:18 +00:00
Mike Frysinger 470beb9219 libiberty: autogenerate aclocal.m4
Move custom macros to acinclude.m4 so we can autogenerate aclocal.m4
with aclocal.  This matches every other project in the tree.

libiberty/ChangeLog:

	* Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, $(srcdir)/aclocal.m4): Define.
	(configure_deps): Rename to ...
	(aclocal_deps): ... this.  Replace aclocal.m4 with acinclude.m4.
	($(srcdir)/configure): Replace $(configure_deps) with
	$(srcdir)/aclocal.m4.
	* aclocal.m4: Move libiberty macros to acinclude.m4, then regenerate.
	* acinclude.m4: New file.
	* configure: Regenerate.
2021-02-20 03:33:32 -05:00
GCC Administrator 50352c6cd2 Daily bump. 2021-02-20 00:16:26 +00:00
Ayush Mittal 0b2b7ef367 [PATCH v2] libiberty(argv.c): Fix memory leak in expandargv
libiberty:
	* argv.c (expandargv): free allocated buffer if read fails.
2021-02-18 22:00:06 -07:00
GCC Administrator f7884fb176 Daily bump. 2021-02-02 00:16:23 +00:00
Martin Sebor 445d6db649 Avoid -Wstringop-truncation.
libiberty/ChangeLog:

	* dyn-string.c (dyn_string_insert_cstr): Use memcpy instead of strncpy
	to avoid -Wstringop-truncation.
2021-02-01 09:00:02 -07:00
GCC Administrator 7e73f51157 Daily bump. 2021-01-05 00:16:42 +00:00