aboutsummaryrefslogtreecommitdiff
path: root/libiberty
AgeCommit message (Collapse)AuthorFilesLines
2021-10-23Daily bump.GCC Administrator1-0/+6
2021-10-22Add install-dvi Makefile targets.Eric Gallager1-1/+19
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-18Daily bump.GCC Administrator1-0/+8
2021-10-17[PATCH] d-demangle: properly skip anonymous symbolsLuís Ferreira2-4/+18
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-15Daily bump.GCC Administrator1-0/+9
2021-10-14libiberty: d-demangle: Add test case for function literalsLuís Ferreira1-0/+4
libiberty/ChangeLog: * testsuite/d-demangle-expected: Add test case for function literals.
2021-10-14libiberty: d-demangle: add test cases for simple special manglesLuís Ferreira1-0/+8
libiberty/ChangeLog: * testsuite/d-demangle-expected: Add test cases for simple special mangles.
2021-10-13Daily bump.GCC Administrator1-0/+5
2021-10-12[PATCH v2] libiberty: d-demangle: remove parenthesis where it is not neededLuís Ferreira1-6/+6
libiberty/ * d-demangle.c (dlang_parse_qualified): Remove redudant parenthesis around lhs and rhs of assignments.
2021-10-02Daily bump.GCC Administrator1-0/+4
2021-10-01libiberty: testsuite: add missing format on d-demangle-expectedLuís Ferreira1-0/+1
libiberty * testsuite/d-demangle-expected: Add missing format for new test
2021-09-24Daily bump.GCC Administrator1-0/+10
2021-09-23libiberty: prevent null dereferencing on dlang_typeLuís Ferreira2-2/+5
libiberty/ * d-demangle.c (dlang_Type): Validate MANGLED is nonnull. * testsuite/d-demangle-expected: New test.
2021-09-23libiberty: prevent buffer overflow when decoding user inputLuís Ferreira1-1/+1
libiberty/ * d-demangle.c (dlang_symbol_backref): Ensure strlen of string is less than length computed by dlang_number.
2021-09-02Daily bump.GCC Administrator1-0/+7
2021-09-01libiberty, configure, Darwin: Avoid detecting deprecated sbrk.Iain Sandoe3-25/+35
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-08-30Daily bump.GCC Administrator1-0/+20
2021-08-30libiberty: Add support for demangling local D template declarationsIain Buclaw2-0/+43
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-30libiberty: Add support for demangling D function literals as template value ↵Iain Buclaw2-13/+31
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-30libiberty: Add support for D `typeof(*null)' typesIain Buclaw2-3/+15
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-24Daily bump.GCC Administrator1-0/+5
2021-08-23libiberty, Darwin: Fix a build warning.Iain Sandoe1-1/+1
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-19Daily bump.GCC Administrator1-0/+5
2021-08-18libiberty, Darwin : Fix simple-object LTO table for cross-endian case.Iain Sandoe1-0/+5
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-07-01Daily bump.GCC Administrator1-0/+5
2021-07-01libiberty: No longer use /usr/tmpGerald Pfeifer1-4/+1
/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-06-29Daily bump.GCC Administrator1-0/+12
2021-06-28libiberty: copy over .BTF section when using LTOIndu Bhagat1-0/+3
libiberty/ChangeLog: * simple-object.c (handle_lto_debug_sections): Copy over .BTF section.
2021-06-28CTF/BTF debug formatsIndu Bhagat1-0/+3
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-06Daily bump.GCC Administrator1-0/+7
2021-06-05Use libiberty snprintf and vsnprintf on hppa*-*-hpux*.John David Anglin2-6/+42
libiberty/ChangeLog: PR target/100734 * configure.ac: Use libiberty snprintf and vsnprintf on hppa*-*-hpux*. * configure: Regenerate.
2021-05-07Daily bump.GCC Administrator1-0/+4
2021-05-06libiberty: add htab_eq_stringTom Tromey1-0/+7
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-05Daily bump.GCC Administrator1-0/+5
2021-05-04Fix libiberty link failures in LTO mode for MinGWEric Botcazou2-3/+3
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-04Daily bump.GCC Administrator1-0/+5
2021-05-03GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPsH.J. Lu1-0/+29
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-04-22Daily bump.GCC Administrator1-0/+6
2021-04-21Fix endian bug in rust demanglerAndreas Schwab1-3/+6
libiberty/ PR demangler/100177 * rust-demangle.c (demangle_const_char): Properly print the character value.
2021-04-01Daily bump.GCC Administrator1-0/+11
2021-03-30c++: Adjust mangling of __alignof__ [PR88115]Patrick Palka2-22/+29
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-17Daily bump.GCC Administrator1-0/+4
2021-03-16Fix potentially undefined behaviour when computing a sha1 value.Nick Clifton1-1/+1
libiberty/ * sha1.c (sha1_process_bytes): Use memmove in place of memcpy.
2021-02-21Daily bump.GCC Administrator1-0/+11
2021-02-20libiberty: autogenerate aclocal.m4Mike Frysinger4-183/+215
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-20Daily bump.GCC Administrator1-0/+4
2021-02-18[PATCH v2] libiberty(argv.c): Fix memory leak in expandargvAyush Mittal1-1/+4
libiberty: * argv.c (expandargv): free allocated buffer if read fails.
2021-02-02Daily bump.GCC Administrator1-0/+5
2021-02-01Avoid -Wstringop-truncation.Martin Sebor1-1/+1
libiberty/ChangeLog: * dyn-string.c (dyn_string_insert_cstr): Use memcpy instead of strncpy to avoid -Wstringop-truncation.
2021-01-05Daily bump.GCC Administrator1-0/+4