aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.in
AgeCommit message (Collapse)AuthorFilesLines
2022-01-12aix: handle 64bit inodes for include directoriesClément Chigot1-0/+12
On AIX, stat will store inodes in 32bit even when using LARGE_FILES. If the inode is larger, it will return -1 in st_ino. Thus, in incpath.c when comparing include directories, if several of them have 64bit inodes, they will be considered as duplicated. gcc/ChangeLog: 2022-01-12 Clément Chigot <clement.chigot@atos.net> * configure.ac: Check sizeof ino_t and dev_t. (HOST_STAT_FOR_64BIT_INODES): New AC_DEFINE to provide stat syscall being able to handle 64bit inodes. * config.in: Regenerate. * configure: Regenerate. * incpath.c (HOST_STAT_FOR_64BIT_INODES): New define. (remove_duplicates): Use it. libcpp/ChangeLog: 2022-01-12 Clément Chigot <clement.chigot@atos.net> * configure.ac: Check sizeof ino_t and dev_t. * config.in: Regenerate. * configure: Regenerate. * include/cpplib.h (INO_T_CPP): Change for AIX. (DEV_T_CPP): New macro. (struct cpp_dir): Use it.
2021-11-15configure, Darwin: Check ld64 support for -platform-version.Iain Sandoe1-0/+6
Newer versions of ld64 allow specifiying the OS target (e.g. macos or ios) the version and the SDK version all in a single command. This checks the availability of the command for the current toolchain. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/ChangeLog: * config.in: Regenerate. * configure: Regenerate. * configure.ac: Test ld64 for -platform-version support.
2021-10-07amdgcn: Support LLVM 13 assembler syntaxAndrew Stubbs1-4/+40
The LLVM devs have changed the assembler architecture attribute names on both CLI and in the ".amdgcn_target" directive, and changed the attribute syntax inside the directive, without keeping any backwards compatibility. :-( This patch improves our configure tests to detect what dialect to use, what attributes are valid, and adjusts the specs to match. gcc/ChangeLog: * config.in: Regenerate. * config/gcn/gcn-hsa.h (X_FIJI): New macro. (X_900): New macro. (X_906): New macro. (X_908): New macro. (A_FIJI): Rename to ... (S_FIJI): ... this. (A_900): Rename to ... (S_900): ... this. (A_906): Rename to ... (S_906): ... this. (A_908): Rename to ... (S_908): ... this. (SRAMOPT): New macro. (ASM_SPEC): Adjust xnack option usage. * config/gcn/gcn.c (output_file_start): Adjust amdgcn_target usage. * configure: Regenerate. * configure.ac: Detect LLVM assembler dialect.
2021-09-21arm: pass architecture extensions to assembler if supportedRichard Earnshaw1-0/+7
When I originally added the new extended architecture features support to GCC, the assembler was unable to parse the new feature lists on the command-line and would throw an error. This has now been fixed in GAS and the behaviour is the same as GCC. So this patch adds a configure-time test for the assembler in use to detect that it is recent enough to support this behaviour and then enables passing the architecture extensions to the assembler when this is the case. Although the assembly output generated by GCC does not rely on this, this should ease some issues when using GCC as a driver for compiling source written directly in assembly language when the programmer was expecting the appropriate options to be passed on the command line. gcc/ChangeLog: * configure.ac: Detect when the assembler supports new-style architecture extensions. * common/config/arm/arm-common.c (arm_rewrite_mcpu): Return the full CPU string if the assembler can grok it. (arm_rewrite_march): Likewise but for the architecture. * config.in: Regenerate. * configure: Regenerate.
2021-08-17Darwin, X86, config: Adjust 'as' command lines [PR100340].Iain Sandoe1-0/+7
Versions of the assembler using clang from XCode 12.5/12.5.1 have a bug which produces different code layout between debug and non-debug input, leading to a compare fail for default configure parameters. This is a workaround fix to disable the optimisation that is responsible for the bug. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> PR target/100340 - Bootstrap fails with Clang 12.0.5 (XCode 12.5) PR target/100340 gcc/ChangeLog: * config.in: Regenerate. * config/i386/darwin.h (EXTRA_ASM_OPTS): New (ASM_SPEC): Pass options to disable branch shortening where needed. * configure: Regenerate. * configure.ac: Detect versions of 'as' that support the optimisation which has the bug.
2021-08-12Make -no-pie option work for native WindowsEric Botcazou1-0/+6
Binutils 2.36/2.37 generate PIE executables by default on native Windows (because --dynamicbase is the default) so it makes sense to have a simple way to counter that and -no-pie seems appropriate, all the more so that it is automatically passed when building the compiler itself. gcc/ * configure.ac (PE linker --disable-dynamicbase support): New check. * configure: Regenerate. * config.in: Likewise. * config/i386/mingw32.h (LINK_SPEC_DISABLE_DYNAMICBASE): New define. (LINK_SPEC): Use it. * config/i386/mingw-w64.h (LINK_SPEC_DISABLE_DYNAMICBASE): Likewise. (LINK_SPEC): Likewise.
2021-07-28amdgcn: Fix attributes for LLVM-12 [PR 100208]Andrew Stubbs1-0/+24
This should work for a wider range of LLVM 12 variants now. More work required for LLVM 13 though. gcc/ChangeLog: PR target/100208 * config.in: Regenerate. * config/gcn/gcn-hsa.h (A_FIJI): New define. (A_900): New define. (A_906): New define. (A_908): New define. (ASM_SPEC): Use A_FIJI, A_900, A_906 and A_908. * config/gcn/gcn.c (output_file_start): Adjust attributes according to the assembler capabilities. * config/gcn/mkoffload.c (main): Likewise. * configure: Regenerate. * configure.ac: Add tests for LLVM assembler attribute features.
2021-07-05Darwin, configury : Allow for specification and detection of dsymutil.Iain Sandoe1-0/+12
In order to enable DWARF versions > 2 we need a sufficiently modern version of dsymutil (in addition to the assembler / linker). This allows the user to configure a different path from the installed one. In addition, there are several sources of dsymutil so we differentiate these in order to be get accurate version information. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/ChangeLog: * configure.ac: Handle --with-dsymutil in the same way as we do for the assembler and linker. (DEFAULT_DSYMUTIL): New. Extract the type and version for the dsymutil configured or found by the default searches. * config.in: Regenerated. * configure: Regenerated. * collect2.c (do_dsymutil): Handle locating dsymutil in the same way as for the assembler and linker. * config/darwin.h (DSYMUTIL): Delete. * gcc.c: Report a configured dsymutil correctly. * exec-tool.in: Allow for dsymutil. ChangeLog: * Makefile.def: Add dsymutil defs. * Makefile.in: Regenerated. * Makefile.tpl: Add dsymutil to flags. * configure: Regenerated. * configure.ac: Add dsymutil to target and build recipes.
2021-06-18gcc/configure.ac: fix register issue for global_load assembler functionsMarcel Vollweiler1-0/+6
gcc/ChangeLog: * config.in: Regenerate. * config/gcn/gcn.c (print_operand_address): Fix for global_load assembler functions. * configure: Regenerate. * configure.ac: Fix for global_load assembler functions.
2021-04-29Add parallelism support to gcov for MinGW platformsEric Botcazou1-0/+12
If you attempt a profiled bootstrap on the MinGW platforms with -jN, N > 1, it miserably fails because of profile mismatches all over the place, the reason being that gcov has no support for parallelism on these platforms. libgcc/ * libgcov.h: For the target, define GCOV_LOCKED_WITH_LOCKING if __MSVCRT__ and, for the host, define it if HOST_HAS_LK_LOCK. * libgcov-driver.c: Add directives if GCOV_LOCKED_WITH_LOCKING. gcc/ * configure.ac: Check for the presence of sys/locking.h header and for whether _LK_LOCK is supported by _locking. * configure: Regenerate. * config.in: Likewise. * gcov-io.h: Define GCOV_LOCKED_WITH_LOCKING if HOST_HAS_LK_LOCK. * gcov-io.c (gcov_open): Add support for GCOV_LOCKED_WITH_LOCKING. * system.h: Include <sys/locking.h> if HAVE_SYS_LOCKING_H.
2021-04-28offload-defaulted: Config option to silently ignore uninstalled offload ↵Tobias Burnus1-0/+6
compilers If configured with --enable-offload-defaulted, configured but not installed offload compilers and libgomp plugins are silently ignored. Useful for distribution compilers where those are in separate optional packages. 2021-04-28 Jakub Jelinek <jakub@redhat.com> Tobias Burnus <tobias@codesourcery.com> ChangeLog: * configure.ac (--enable-offload-defaulted): New. * configure: Regenerate. gcc/ChangeLog: * configure.ac (OFFLOAD_DEFAULTED): AC_DEFINE if offload-defaulted. * gcc.c (process_command): New variable. (driver::maybe_putenv_OFFLOAD_TARGETS): If OFFLOAD_DEFAULTED, set it if -foffload is defaulted. * lto-wrapper.c (OFFLOAD_TARGET_DEFAULT_ENV): Define. (compile_offload_image): If OFFLOAD_DEFAULTED and OFFLOAD_TARGET_DEFAULT is in the environment, don't fail if corresponding mkoffload can't be found. (compile_images_for_offload_targets): Likewise. Free and clear offload_names if no valid offload is found. * config.in: Regenerate. * configure: Regenerate. libgomp/ChangeLog: * configure.ac (OFFLOAD_DEFAULTED): AC_DEFINE if offload-defaulted. * target.c (gomp_load_plugin_for_device): If set and if a plugin can't be dlopened, silently assume it has no devices. * Makefile.in: Regenerate. * config.h.in: Regenerate. * configure: Regenerate.
2021-03-31i386, debug: Default to -gdwarf-4 on Windows targets with broken ld.bfd ↵Jakub Jelinek1-0/+6
[PR98860] As mentioned in the PR, before the https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba6eb62ff0ea9843a018cfd7cd06777bd66ae0a0 fix from March 1st, PECOFF ld.bfd didn't know about .debug_loclists, .debug_rnglists and other debug sections new in DWARF 5. Unfortunately, unlike for ELF linkers, that means the sections were placed in wrong ordering with wrong VMA/LMA, so the resulting executables are apparently unusable. As that is pretty new change, newer than 2.35.2 or 2.36 binutils releases, the following patch adds a workaround that turns -gdwarf-4 by default instead of -gdwarf-5 if a broken linker is found at configure time. Users can still explicitly play with -gdwarf-5 and either use a non-broken linker or use custom linker scripts for the broken one, but at least by default it should work. 2021-03-31 Jakub Jelinek <jakub@redhat.com> PR bootstrap/98860 * configure.ac (HAVE_LD_BROKEN_PE_DWARF5): New AC_DEFINE if PECOFF linker doesn't support DWARF sections new in DWARF5. * config/i386/i386-options.c (ix86_option_override_internal): Default to dwarf_version 4 if HAVE_LD_BROKEN_PE_DWARF5 for TARGET_PECOFF targets. * config.in: Regenerated. * configure: Regenerated.
2020-12-24C++ : Add the -stdlib= option.Iain Sandoe1-0/+6
This option allows the user to specifiy alternate C++ runtime libraries, for example when a platform uses libc++ as the installed C++ runtime. We introduce the command line option: -stdlib= which is the user-facing mechanism to select the C++ runtime to be used when compiling and linking code. This is the same option spelling as that used by clang to allow the use of libstdc++. The availability (and thus function) of the option are a configure-time choice using the configuration control: --with-gxx-libcxx-include-dir= Specification of the path for the libc++ headers, enables the -stdlib= option (using the path as given), default values are set when the path is unconfigured. If --with-gxx-libcxx-include-dir is given together with --with-sysroot=, then we test to see if the include path starts with the sysroot and, if so, record the sysroot-relative component as the local path. At runtime, we prepend the sysroot that is actually active. At link time, we use the C++ runtime in force and (if that is libc++) also append the libc++abi ABI library. As for other cases, if a target sets the name pointer for the ABI library to NULL the G++ driver will omit it from the link line. gcc/ChangeLog: * configure.ac: Add gxx-libcxx-include-dir handled in the same way as the regular cxx header directory. * Makefile.in: Regenerated. * config.in: Likewise. * configure: Likewise. * cppdefault.c: Pick up libc++ headers if the option is enabled. * cppdefault.h (struct default_include): Amend comments to reflect the extended use of the cplusplus field. * incpath.c (add_standard_paths): Allow for multiple c++ header include path variants. * doc/invoke.texi: Document the -stdlib= option. gcc/c-family/ChangeLog: * c.opt: Add -stdlib= option and enumerations for libstdc++ and libc++. gcc/cp/ChangeLog: * g++spec.c (LIBCXX, LIBCXX_PROFILE, LIBCXX_STATIC): New. (LIBCXXABI, LIBCXXABI_PROFILE, LIBCXXABI_STATIC): New. (enum stdcxxlib_kind): New. (lang_specific_driver): Allow selection amongst multiple c++ runtime libraries.
2020-12-02Use the section flag 'o' for __patchable_function_entriesH.J. Lu1-0/+6
This commit in GNU binutils 2.35: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=b7d072167715829eed0622616f6ae0182900de3e added the section flag 'o' to .section directive: .section __patchable_function_entries,"awo",@progbits,foo which specifies the symbol name which the section references. Assembler creates a unique __patchable_function_entries section with the section, where foo is defined, as its linked-to section. Linker keeps a section if its linked-to section is kept during garbage collection. This patch checks assembler support for the section flag 'o' and uses it to implement __patchable_function_entries section. Since Solaris may use GNU assembler with Solairs ld. Even if GNU assembler supports the section flag 'o', it doesn't mean that Solairs ld supports it. This feature is disabled for Solairs targets. gcc/ PR middle-end/93195 PR middle-end/93197 * configure.ac (HAVE_GAS_SECTION_LINK_ORDER): New. Define 1 if the assembler supports the section flag 'o' for specifying section with link-order. * output.h (SECTION_LINK_ORDER): New. Defined to 0x8000000. (SECTION_MACH_DEP): Changed from 0x8000000 to 0x10000000. * targhooks.c (default_print_patchable_function_entry): Pass SECTION_LINK_ORDER to switch_to_section if the section flag 'o' works. Pass current_function_decl to switch_to_section. * varasm.c (default_elf_asm_named_section): Use 'o' flag for SECTION_LINK_ORDER if assembler supports it. * config.in: Regenerated. * configure: Likewise. * doc/sourcebuild.texi: Document o_flag_in_section. gcc/testsuite/ PR middle-end/93195 * g++.dg/pr93195a.C: New test. * g++.dg/pr93195b.C: Likewise. * lib/target-supports.exp (check_effective_target_o_flag_in_section): New proc.
2020-12-01Use SHF_GNU_RETAIN to preserve symbol definitionsH.J. Lu1-0/+7
In assemly code, the section flag 'R' sets the SHF_GNU_RETAIN flag to indicate that the section must be preserved by the linker. Add SECTION_RETAIN to indicate a section should be retained by the linker and set SECTION_RETAIN on section for the preserved symbol if assembler supports SHF_GNU_RETAIN. All retained symbols are placed in separate sections with .section .data.rel.local.preserved_symbol,"awR" preserved_symbol: ... .section .data.rel.local,"aw" not_preserved_symbol: ... to avoid .section .data.rel.local,"awR" preserved_symbol: ... not_preserved_symbol: ... which places not_preserved_symbol definition in the SHF_GNU_RETAIN section. gcc/ 2020-12-01 H.J. Lu <hjl.tools@gmail.com> * configure.ac (HAVE_GAS_SHF_GNU_RETAIN): New. Define 1 if the assembler supports marking sections with SHF_GNU_RETAIN flag. * output.h (SECTION_RETAIN): New. Defined as 0x4000000. (SECTION_MACH_DEP): Changed from 0x4000000 to 0x8000000. (default_unique_section): Add a bool argument. * varasm.c (get_section): Set SECTION_RETAIN for the preserved symbol with HAVE_GAS_SHF_GNU_RETAIN. (resolve_unique_section): Used named section for the preserved symbol if assembler supports SHF_GNU_RETAIN. (get_variable_section): Handle the preserved common symbol with HAVE_GAS_SHF_GNU_RETAIN. (default_elf_asm_named_section): Require the full declaration and use the 'R' flag for SECTION_RETAIN. * config.in: Regenerated. * configure: Likewise. * doc/sourcebuild.texi: Document R_flag_in_section. gcc/testsuite/ 2020-12-01 H.J. Lu <hjl.tools@gmail.com> Jozef Lawrynowicz <jozef.l@mittosystems.com> * c-c++-common/attr-used.c: Check the 'R' flag. * c-c++-common/attr-used-2.c: Likewise. * c-c++-common/attr-used-3.c: New test. * c-c++-common/attr-used-4.c: Likewise. * gcc.c-torture/compile/attr-used-retain-1.c: Likewise. * gcc.c-torture/compile/attr-used-retain-2.c: Likewise. * lib/target-supports.exp (check_effective_target_R_flag_in_section): New proc.
2020-12-01IBM Z: Configure excess precision for float at compile-timeMarius Hillenbrand1-0/+4
Historically, float_t has been defined as double on s390 and gcc would emit double precision insns for evaluating float expressions when in standard-compliant mode. Configure that behavior at compile-time as prep for changes in glibc: When glibc ties float_t to double, keep the old behavior; when glibc derives float_t from FLT_EVAL_METHOD (as on most other archs), revert to the default behavior (i.e., FLT_EVAL_METHOD_PROMOTE_TO_FLOAT). Provide a configure option --enable-s390-excess-float-precision to override the check. gcc/ChangeLog: 2020-12-01 Marius Hillenbrand <mhillen@linux.ibm.com> * configure.ac: Add configure option --enable-s390-excess-float-precision and check to derive default from glibc. * config/s390/s390.c: Guard s390_excess_precision with an ifdef for ENABLE_S390_EXCESS_FLOAT_PRECISION. * doc/install.texi: Document --enable-s390-excess-float-precision. * configure: Regenerate. * config.in: Regenerate.
2020-11-19config: Add tests for modules-desired featuresNathan Sidwell1-12/+48
this adds configure tests for features that modules can take advantage of -- and if they are not present has reduced or fallback functionality. gcc/ * configure.ac: Add tests for fstatat, sighandler_t, O_CLOEXEC, unix-domain and ipv6 sockets. * config.in: Rebuilt. * configure: Rebuilt.
2020-11-18RISC-V: Support version controling for ISA standard extensionsKito Cheng1-0/+12
- New option -misa-spec support: -misa-spec=[2.2|20190608|20191213] and corresponding configuration option --with-isa-spec. - Current default ISA spec set to 2.2, but we intend to bump this to 20191213 or later in next release. gcc/ChangeLog: * common/config/riscv/riscv-common.c (riscv_ext_version): New. (riscv_ext_version_table): Ditto. (get_default_version): Ditto. (riscv_subset_t::implied_p): New field. (riscv_subset_t::riscv_subset_t): Init implied_p. (riscv_subset_list::add): New. (riscv_subset_list::handle_implied_ext): Pass riscv_subset_t instead of separated argument. (riscv_subset_list::to_string): Handle zifencei and zicsr, and omit version if version is unknown. (riscv_subset_list::parsing_subset_version): New argument `ext`, remove default_major_version and default_minor_version, get default version info via get_default_version. (riscv_subset_list::parse_std_ext): Update argument for parsing_subset_version calls. Handle 2.2 ISA spec, always enable zicsr and zifencei, they are included in baseline ISA in that time. (riscv_subset_list::parse_multiletter_ext): Update argument for `parsing_subset_version` and `add` calls. (riscv_subset_list::parse): Adjust argument for riscv_subset_list::handle_implied_ext call. * config.gcc (riscv*-*-*): Handle --with-isa-spec=. * config.in (HAVE_AS_MISA_SPEC): New. (HAVE_AS_MARCH_ZIFENCEI): Ditto. * config/riscv/riscv-opts.h (riscv_isa_spec_class): New. (riscv_isa_spec): Ditto. * config/riscv/riscv.h (HAVE_AS_MISA_SPEC): New. (ASM_SPEC): Pass -misa-spec if gas supported. * config/riscv/riscv.opt (riscv_isa_spec_class) New. * configure.ac (HAVE_AS_MARCH_ZIFENCEI): New test. (HAVE_AS_MISA_SPEC): Ditto. * configure: Regen. gcc/testsuite/ChangeLog: * gcc.target/riscv/arch-9.c: New. * gcc.target/riscv/arch-10.c: Ditto. * gcc.target/riscv/arch-11.c: Ditto. * gcc.target/riscv/attribute-6.c: Remove, we don't support G with version anymore. * gcc.target/riscv/attribute-8.c: Reorder arch string to fit canonical ordering. * gcc.target/riscv/attribute-9.c: We don't emit version for unknown extensions now. * gcc.target/riscv/attribute-11.c: Add -misa-spec=2.2 flags. * gcc.target/riscv/attribute-12.c: Ditto. * gcc.target/riscv/attribute-13.c: Ditto. * gcc.target/riscv/attribute-14.c: Ditto. * gcc.target/riscv/attribute-15.c: New. * gcc.target/riscv/attribute-16.c: Ditto. * gcc.target/riscv/attribute-17.c: Ditto.
2020-10-24Update check for working assembler --gdwarf-4 optionH.J. Lu1-3/+3
Rename HAVE_AS_WORKING_DWARF_4_FLAG to HAVE_AS_WORKING_DWARF_N_FLAG Don't set HAVE_AS_WORKING_DWARF_N_FLAG if --gdwarf-5/--gdwarf-4 generate an extra assembly input file in debug info from compiler generated .debug_line or fail with the APP marker: https://sourceware.org/bugzilla/show_bug.cgi?id=25878 https://sourceware.org/bugzilla/show_bug.cgi?id=26740 https://sourceware.org/bugzilla/show_bug.cgi?id=26778 Also replace success with dwarf4_success in the 32-bit --gdwarf-4 check. PR bootstrap/97451 * configure.ac (HAVE_AS_WORKING_DWARF_4_FLAG): Renamed to ... (HAVE_AS_WORKING_DWARF_N_FLAG): This. Don't define if there is an extra assembly input file in debug info. Replace success with dwarf4_success in the 32-bit --gdwarf-4 check. * dwarf2out.c (asm_outputs_debug_line_str): Check HAVE_AS_WORKING_DWARF_N_FLAG instead of HAVE_AS_WORKING_DWARF_4_FLAG. * gcc.c (ASM_DEBUG_SPEC): Likewise. (ASM_DEBUG_OPTION_SPEC): Likewise. * config.in: Regenerated. * configure: Likewise.
2020-10-07debug: Pass --gdwarf-N to assembler if fixed gas is detected during configureJakub Jelinek1-0/+13
> > As for the test assembly, I'd say we should take > > #define F void foo (void) {} > > F > > compile it with > > gcc -S -O2 -g1 -dA -gno-as-loc-support -fno-merge-debug-strings > > remove .cfi_* directives, remove the ret instruction, change @function > > and @progbits to %function and %progbits, change .uleb128 to just .byte, > > I think all the values should be small enough, maybe change .value to > > .2byte and .long to .4byte (whatever is most portable across different > > arches and gas versions), simplify (shorten) strings and adjust > > sizes, and do something with the .quad directives, that is dependent on > > the address size, perhaps just take those attributes out and adjust > > .debug_abbrev? Finally, remove all comments (emit them in the first case > > just to better understand the debug info). > > I'm afraid it is hard to avoid the .quad or .8byte. > Here is a 64-bit address version that assembles fine by both x86_64 and > aarch64 as. > Unfortunately doesn't fail with broken gas versions with -gdwarf-2 without > the nop, so we'll need at least a nop in there. > Fortunately gcc/configure.ac already determines the right nop insn for the > target, in $insn. > So I guess what we want next is have the 32-bit version of this with .4byte > instead of .8byte and just let's try to assemble both versions, first > without -gdwarf-2 and the one that succeeds assemble again with -gdwarf-2 > and check for the duplicate .debug_line sections error. Ok, here it is in patch form. I've briefly tested it, with the older binutils I have around (no --gdwarf-N support), with latest gas (--gdwarf-N that can be passed to as even when compiling C/C++ etc. code and emitting .debug_line) and latest gas with Mark's fix reverted (--gdwarf-N support, but can only pass it to as when assembling user .s/.S files, not when compiling C/C++ etc.). 2020-10-07 Jakub Jelinek <jakub@redhat.com> * configure.ac (HAVE_AS_GDWARF_5_DEBUG_FLAG, HAVE_AS_WORKING_DWARF_4_FLAG): New tests. * gcc.c (ASM_DEBUG_DWARF_OPTION): Define. (ASM_DEBUG_SPEC): Use ASM_DEBUG_DWARF_OPTION instead of "--gdwarf2". Use %{cond:opt1;:opt2} style. (ASM_DEBUG_OPTION_DWARF_OPT): Define. (ASM_DEBUG_OPTION_SPEC): Define. (asm_debug_option): New variable. (asm_options): Add "%(asm_debug_option)". (static_specs): Add asm_debug_option entry. (static_spec_functions): Add dwarf-version-gt. (debug_level_greater_than_spec_func): New function. * config/darwin.h (ASM_DEBUG_OPTION_SPEC): Define. * config/darwin9.h (ASM_DEBUG_OPTION_SPEC): Redefine. * config.in: Regenerated. * configure: Regenerated.
2020-09-21Fix fallout from Support new mallinfo2 function.Jakub Jelinek1-1/+2
2020-09-21 Jakub Jelinek <jakub@redhat.com> * configure.ac: Use mallinfo mallinfo2 as first operand of gcc_AC_CHECK_DECLS rather than [mallinfo, mallinfo2]. * configure: Regenerated. * config.in: Regenerated.
2020-09-21Support new mallinfo2 function.Martin Liska1-2/+14
gcc/ChangeLog: * config.in: Regenerate. * configure: Likewise. * configure.ac: Detect for mallinfo2. * ggc-common.c (defined): Use it. * system.h: Handle also HAVE_MALLINFO2.
2020-08-03Removal of HSA offloading from gcc and libgompMartin Jambor1-6/+0
This patch removes the generation of HSAIL from the compiler, the HSA offloading plugin from libgomp and the associated testsuite tests and infrastructure bits from the respective testsuites. Apart from removal of the obvious files, I removed bits that I found by searching for HSA related terms and by re-tracing my steps and looking at the patches that introduced HSA in the first place. I did not remove everything these patches brought in, for example: - the mechanism to pass offload-target specific info from the application to the offloading plugin - but the same mechanism is also used to communicate number of teams and the thread limit to all offload targets. - run_func hook in gomp_device_descr stays too, although now it is not used. If some future offload target would like the ability to refuse to offload some functions, it can use it. It is easy to remove as a follow-up if it is considered clutter, though. - configure options --with-hsa-runtime=PATH, -with-hsa-runtime-include=PATH and --with-hsa-runtime-lib=PATH rmeain because GCN uses them too. - Surprisingly, GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES (a constant from gomp-constants.h) appears in the source of the amdgcn libgomp plugin, although I tend to think that code path is not ever used and this patch certainly removes it from the compiler. Nevertheless, it seems it has potential value beyond HSAIL and so I've kept it, it can of course always be easily removed in the future of GCN folk abandon it too. - I assume constants OFFLOAD_TARGET_TYPE_HSA and GOMP_DEVICE_HSA need to stay indefinitely too just so that no future offload target picks that number. - I have kept dg-require-effective-target offload_device_nonshared_as requirement of thests which have it. It is quite probable I missed some small HSA artifacts but those should be easy to remove later as we find them. include/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * gomp-constants.h (GOMP_VERSION_HSA): Remove. gcc/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * hsa-brig-format.h: Moved to brig/brigfrontend. * hsa-brig.c: Removed. * hsa-builtins.def: Likewise. * hsa-common.c: Likewise. * hsa-common.h: Likewise. * hsa-dump.c: Likewise. * hsa-gen.c: Likewise. * hsa-regalloc.c: Likewise. * ipa-hsa.c: Likewise. * omp-grid.c: Likewise. * omp-grid.h: Likewise. * Makefile.in (BUILTINS_DEF): Remove hsa-builtins.def. (OBJS): Remove hsa-common.o, hsa-gen.o, hsa-regalloc.o, hsa-brig.o, hsa-dump.o, ipa-hsa.c and omp-grid.o. (GTFILES): Removed hsa-common.c and omp-expand.c. * builtins.def: Remove processing of hsa-builtins.def. (DEF_HSA_BUILTIN): Remove. * common.opt (flag_disable_hsa): Remove. (-Whsa): Ignore. * config.in (ENABLE_HSA): Removed. * configure.ac: Removed handling configuration for hsa offloading. (ENABLE_HSA): Removed. * configure: Regenerated. * doc/install.texi (--enable-offload-targets): Remove hsa from the example. (--with-hsa-runtime): Reword to reference any HSA run-time, not specifically HSA offloading. * doc/invoke.texi (Option Summary): Remove -Whsa. (Warning Options): Likewise. (Optimize Options): Remove hsa-gen-debug-stores. * doc/passes.texi (Regular IPA passes): Remove section on IPA HSA pass. * gimple-low.c (lower_stmt): Remove GIMPLE_OMP_GRID_BODY case. * gimple-pretty-print.c (dump_gimple_omp_for): Likewise. (dump_gimple_omp_block): Likewise. (pp_gimple_stmt_1): Likewise. * gimple-walk.c (walk_gimple_stmt): Likewise. * gimple.c (gimple_build_omp_grid_body): Removed function. (gimple_copy): Remove GIMPLE_OMP_GRID_BODY case. * gimple.def (GIMPLE_OMP_GRID_BODY): Removed. * gimple.h (gf_mask): Removed GF_OMP_PARALLEL_GRID_PHONY, OMP_FOR_KIND_GRID_LOOP, GF_OMP_FOR_GRID_PHONY, GF_OMP_FOR_GRID_INTRA_GROUP, GF_OMP_FOR_GRID_GROUP_ITER and GF_OMP_TEAMS_GRID_PHONY. Renumbered GF_OMP_FOR_KIND_SIMD and GF_OMP_TEAMS_HOST. (gimple_build_omp_grid_body): Removed declaration. (gimple_has_substatements): Remove GIMPLE_OMP_GRID_BODY case. (gimple_omp_for_grid_phony): Removed. (gimple_omp_for_set_grid_phony): Likewise. (gimple_omp_for_grid_intra_group): Likewise. (gimple_omp_for_grid_intra_group): Likewise. (gimple_omp_for_grid_group_iter): Likewise. (gimple_omp_for_set_grid_group_iter): Likewise. (gimple_omp_parallel_grid_phony): Likewise. (gimple_omp_parallel_set_grid_phony): Likewise. (gimple_omp_teams_grid_phony): Likewise. (gimple_omp_teams_set_grid_phony): Likewise. (CASE_GIMPLE_OMP): Remove GIMPLE_OMP_GRID_BODY case. * lto-section-in.c (lto_section_name): Removed hsa. * lto-streamer.h (lto_section_type): Removed LTO_section_ipa_hsa. * lto-wrapper.c (compile_images_for_offload_targets): Remove special handling of hsa. * omp-expand.c: Do not include hsa-common.h and gt-omp-expand.h. (parallel_needs_hsa_kernel_p): Removed. (grid_launch_attributes_trees): Likewise. (grid_launch_attributes_trees): Likewise. (grid_create_kernel_launch_attr_types): Likewise. (grid_insert_store_range_dim): Likewise. (grid_get_kernel_launch_attributes): Likewise. (get_target_arguments): Remove code passing HSA grid sizes. (grid_expand_omp_for_loop): Remove. (grid_arg_decl_map): Likewise. (grid_remap_kernel_arg_accesses): Likewise. (grid_expand_target_grid_body): Likewise. (expand_omp): Remove call to grid_expand_target_grid_body. (omp_make_gimple_edges): Remove GIMPLE_OMP_GRID_BODY case. * omp-general.c: Do not include hsa-common.h. (omp_maybe_offloaded): Do not check for HSA offloading. (omp_context_selector_matches): Likewise. * omp-low.c: Do not include hsa-common.h and omp-grid.h. (build_outer_var_ref): Remove handling of GIMPLE_OMP_GRID_BODY. (scan_sharing_clauses): Remove handling of OMP_CLAUSE__GRIDDIM_. (scan_omp_parallel): Remove handling of the phoney variant. (check_omp_nesting_restrictions): Remove handling of GIMPLE_OMP_GRID_BODY and GF_OMP_FOR_KIND_GRID_LOOP. (scan_omp_1_stmt): Remove handling of GIMPLE_OMP_GRID_BODY. (lower_omp_for_lastprivate): Remove handling of gridified loops. (lower_omp_for): Remove phony loop handling. (lower_omp_taskreg): Remove phony construct handling. (lower_omp_teams): Likewise. (lower_omp_grid_body): Removed. (lower_omp_1): Remove GIMPLE_OMP_GRID_BODY case. (execute_lower_omp): Do not call omp_grid_gridify_all_targets. * opts.c (common_handle_option): Do not handle hsa when processing OPT_foffload_. * params.opt (hsa-gen-debug-stores): Remove. * passes.def: Remove pass_ipa_hsa and pass_gen_hsail. * timevar.def: Remove TV_IPA_HSA. * toplev.c: Do not include hsa-common.h. (compile_file): Do not call hsa_output_brig. * tree-core.h (enum omp_clause_code): Remove OMP_CLAUSE__GRIDDIM_. (tree_omp_clause): Remove union field dimension. * tree-nested.c (convert_nonlocal_omp_clauses): Remove the OMP_CLAUSE__GRIDDIM_ case. (convert_local_omp_clauses): Likewise. * tree-pass.h (make_pass_gen_hsail): Remove declaration. (make_pass_ipa_hsa): Likewise. * tree-pretty-print.c (dump_omp_clause): Remove GIMPLE_OMP_GRID_BODY case. * tree.c (omp_clause_num_ops): Remove the element corresponding to OMP_CLAUSE__GRIDDIM_. (omp_clause_code_name): Likewise. (walk_tree_1): Remove GIMPLE_OMP_GRID_BODY case. * tree.h (OMP_CLAUSE__GRIDDIM__DIMENSION): Remove. (OMP_CLAUSE__GRIDDIM__SIZE): Likewise. (OMP_CLAUSE__GRIDDIM__GROUP): Likewise. gcc/fortran/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * f95-lang.c (gfc_init_builtin_functions): Remove processing of hsa-builtins.def. gcc/brig/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * brigfrontend/brig-util.h (hsa_type_packed_p): Declared. * brigfrontend/brig-util.cc (hsa_type_packed_p): Moved here from removed gcc/hsa-common.c. libgomp/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * plugin/Makefrag.am: Remove configuration of HSA plugin. * aclocal.m4: Regenerated. * Makefile.in: Regenerated. * config.h.in: Regenerated. * configure: Regenerated. * plugin/configfrag.ac: Likewise. * plugin/hsa_ext_finalize.h: Removed. * plugin/plugin-hsa.c: Likewise. * testsuite/Makefile.in: Regenerated. * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type): Remove hsa case. (check_effective_target_hsa_offloading_selected_nocache): Removed (check_effective_target_hsa_offloading_selected): Likewise. (libgomp_init): Do not add -Wno-hsa to additional_flags. * testsuite/libgomp.hsa.c/alloca-1.c: Removed test. * testsuite/libgomp.hsa.c/bitfield-1.c: Likewise. * testsuite/libgomp.hsa.c/bits-insns.c: Likewise. * testsuite/libgomp.hsa.c/builtins-1.c: Likewise. * testsuite/libgomp.hsa.c/c.exp: Likewise. * testsuite/libgomp.hsa.c/complex-1.c: Likewise. * testsuite/libgomp.hsa.c/complex-align-2.c: Likewise. * testsuite/libgomp.hsa.c/formal-actual-args-1.c: Likewise. * testsuite/libgomp.hsa.c/function-call-1.c: Likewise. * testsuite/libgomp.hsa.c/get-level-1.c: Likewise. * testsuite/libgomp.hsa.c/gridify-1.c: Likewise. * testsuite/libgomp.hsa.c/gridify-2.c: Likewise. * testsuite/libgomp.hsa.c/gridify-3.c: Likewise. * testsuite/libgomp.hsa.c/gridify-4.c: Likewise. * testsuite/libgomp.hsa.c/memory-operations-1.c: Likewise. * testsuite/libgomp.hsa.c/pr69568.c: Likewise. * testsuite/libgomp.hsa.c/pr82416.c: Likewise. * testsuite/libgomp.hsa.c/rotate-1.c: Likewise. * testsuite/libgomp.hsa.c/staticvar.c: Likewise. * testsuite/libgomp.hsa.c/switch-1.c: Likewise. * testsuite/libgomp.hsa.c/switch-branch-1.c: Likewise. * testsuite/libgomp.hsa.c/switch-sbr-2.c: Likewise. * testsuite/libgomp.hsa.c/tiling-1.c: Likewise. * testsuite/libgomp.hsa.c/tiling-2.c: Likewise. gcc/testsuite/ChangeLog: 2020-07-24 Martin Jambor <mjambor@suse.cz> * lib/target-supports.exp (check_effective_target_offload_hsa): Removed. * c-c++-common/gomp/gridify-1.c: Removed test. * c-c++-common/gomp/gridify-2.c: Likewise. * c-c++-common/gomp/gridify-3.c: Likewise. * c-c++-common/gomp/hsa-indirect-call-1.c: Likewise. * gfortran.dg/gomp/gridify-1.f90: Likewise. * gcc.dg/gomp/gomp.exp: Do not pass -Wno-hsa to tests. * g++.dg/gomp/gomp.exp: Likewise. * gfortran.dg/gomp/gomp.exp: Likewise.
2020-06-16S/390: Emit vector alignment hints for z13 if AS accepts themStefan Schulze Frielinghaus1-0/+7
Since 87cb9423add vector alignment hints are emitted for target z13, too. This patch changes this behaviour in the sense that alignment hints are only emitted for target z13 if the assembler accepts them. gcc/ChangeLog: * config.in: Regenerate. * config/s390/s390.c (print_operand): Emit vector alignment hints for target z13, if AS accepts them. For other targets the logic stays the same. * config/s390/s390.h (TARGET_VECTOR_LOADSTORE_ALIGNMENT_HINTS): Define macro. * configure: Regenerate. * configure.ac: Check HAVE_AS_VECTOR_LOADSTORE_ALIGNMENT_HINTS_ON_Z13.
2020-04-30--with-{documentation,changes}-root-url tweaksJakub Jelinek1-0/+12
> , CHANGES_URL ("gcc-10/changes.html#empty_base"); > > where the macro would just use preprocessor string concatenation? Ok, the following patch implements it (doesn't introduce a separate macro and just uses CHANGES_ROOT_URL "gcc-10/changes.html#empty_base"), in addition adds the documentation Joseph requested. 2020-04-30 Jakub Jelinek <jakub@redhat.com> * configure.ac (--with-documentation-root-url, --with-changes-root-url): Diagnose URL not ending with /, use AC_DEFINE_UNQUOTED instead of AC_SUBST. * opts.h (get_changes_url): Remove. * opts.c (get_changes_url): Remove. * Makefile.in (CFLAGS-opts.o): Don't add -DDOCUMENTATION_ROOT_URL or -DCHANGES_ROOT_URL. * doc/install.texi (--with-documentation-root-url, --with-changes-root-url): Document. * config/arm/arm.c (aapcs_vfp_is_call_or_return_candidate): Don't call get_changes_url and free, change url variable type to const char * and set it to CHANGES_ROOT_URL "gcc-10/changes.html#empty_base". * config/s390/s390.c (s390_function_arg_vector, s390_function_arg_float): Likewise. * config/aarch64/aarch64.c (aarch64_vfp_is_call_or_return_candidate): Likewise. * config/rs6000/rs6000-call.c (rs6000_discover_homogeneous_aggregate): Likewise. * config.in: Regenerate. * configure: Regenerate.
2020-02-15PR 87488: Add --with-diagnostics-urls configuration optionBernd Edlinger1-0/+6
2020-02-15 David Malcolm <dmalcolm@redhat.com> Bernd Edlinger <bernd.edlinger@hotmail.de> PR 87488 PR other/93168 * config.in (DIAGNOSTICS_URLS_DEFAULT): New define. * configure.ac (--with-diagnostics-urls): New configuration option, based on --with-diagnostics-color. (DIAGNOSTICS_URLS_DEFAULT): New define. * config.h: Regenerate. * configure: Regenerate. * diagnostic.c (diagnostic_urls_init): Handle -1 for DIAGNOSTICS_URLS_DEFAULT from configure-time --with-diagnostics-urls=auto-if-env by querying for a GCC_URLS and TERM_URLS environment variable. * diagnostic-url.h (diagnostic_url_format): New enum type. (diagnostic_urls_enabled_p): rename to... (determine_url_format): ... this, and change return type. * diagnostic-color.c (parse_env_vars_for_urls): New helper function. (auto_enable_urls): Disable URLs on xfce4-terminal, gnome-terminal, the linux console, and mingw. (diagnostic_urls_enabled_p): rename to... (determine_url_format): ... this, and adjust. * pretty-print.h (pretty_printer::show_urls): rename to... (pretty_printer::url_format): ... this, and change to enum. * pretty-print.c (pretty_printer::pretty_printer, pp_begin_url, pp_end_url, test_urls): Adjust. * doc/install.texi (--with-diagnostics-urls): Document the new configuration option. (--with-diagnostics-color): Document the existing interaction with GCC_COLORS better. * doc/invoke.texi (-fdiagnostics-urls): Add GCC_URLS and TERM_URLS vindex reference. Update description of defaults based on the above. (-fdiagnostics-color): Update description of how -fdiagnostics-color interacts with GCC_COLORS.
2020-01-31nios2: Support for GOT-relative DW_EH_PE_datarel encoding.Sandra Loosemore1-0/+6
On nios2-linux-gnu, there has been a long-standing bug in C++ exception handling that sometimes resulted in link errors like ../nios2-linux-gnu/bin/ld: FDE encoding in /tmp/cccfpQ2l.o(.eh_frame) prevents .eh_frame_hdr table being created when building some shared libraries or PIE executables. The root of the problem is that GCC was incorrectly emitting an absolute encoding in EH tables for PIC. This patch changes it to use either DW_EH_PE_indirect (for global) or DW_EH_PE_datarel (for local), and fixes libgcc so it can find the address of the GOT as the base address for DW_EH_PE_datarel. Complicating matters somewhat, GAS was missing support for %gotoff(symbol) relocation syntax. I have just pushed a fix for that, but I've added a configure check to test for presence of the binutils support and fall back to the current absolute encoding (which works most of the time) if it is not available. Once the fix makes it into an official binutils release it might be appropriate to make this error out instead. Since this is a wrong-code bug and affects only nios2 target, I think this is appropriate for Stage 4. I regression-tested on both nios2-linux-gnu and nios2-elf, with and without the binutils support present, before committing this. 2020-01-31 Sandra Loosemore <sandra@codesourcery.com> gcc/ * configure.ac [nios2-*-*]: Check HAVE_AS_NIOS2_GOTOFF_RELOCATION. * config.in: Regenerated. * configure: Regenerated. * config/nios2/nios2.h (ASM_PREFERRED_EH_DATA_FORMAT): Fix handling for PIC when HAVE_AS_NIOS2_GOTOFF_RELOCATION. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): New. gcc/testsuite/ * g++.target/nios2/hello-pie.C: New. * g++.target/nios2/nios2.exp: New. libgcc/ * config.host [nios2-*-linux*] (tmake_file, tm_file): Adjust. * config/nios2-elf-lib.h: New. * unwind-dw2-fde-dip.c (_Unwind_IteratePhdrCallback): Use existing code for finding GOT base for nios2.
2020-01-30Regenerate configure for 54b3d52Dragan Mladjenovic1-0/+6
Commit 54b3d52 ("Emit .note.GNU-stack for hard-float linux targets.") was missing generated files. Add them now. gcc/ChangeLog: 2020-01-30 Dragan Mladjenovic <dmladjenovic@wavecomp.com> * config.in: Regenerated. * configure: Regenerated.
2020-01-14Initial commit of analyzerDavid Malcolm1-0/+6
This patch adds a static analysis pass to the middle-end, focusing for this release on C code, and malloc/free issues in particular. See: https://gcc.gnu.org/wiki/DavidMalcolm/StaticAnalyzer gcc/ChangeLog: * Makefile.in (lang_opt_files): Add analyzer.opt. (ANALYZER_OBJS): New. (OBJS): Add digraph.o, graphviz.o, ordered-hash-map-tests.o, tristate.o and ANALYZER_OBJS. (TEXI_GCCINT_FILES): Add analyzer.texi. * common.opt (-fanalyzer): New driver option. * config.in: Regenerate. * configure: Regenerate. * configure.ac (--disable-analyzer, ENABLE_ANALYZER): New option. (gccdepdir): Also create depdir for "analyzer" subdir. * digraph.cc: New file. * digraph.h: New file. * doc/analyzer.texi: New file. * doc/gccint.texi ("Static Analyzer") New menu item. (analyzer.texi): Include it. * doc/invoke.texi ("Static Analyzer Options"): New list and new section. ("Warning Options"): Add static analysis warnings to the list. (-Wno-analyzer-double-fclose): New option. (-Wno-analyzer-double-free): New option. (-Wno-analyzer-exposure-through-output-file): New option. (-Wno-analyzer-file-leak): New option. (-Wno-analyzer-free-of-non-heap): New option. (-Wno-analyzer-malloc-leak): New option. (-Wno-analyzer-possible-null-argument): New option. (-Wno-analyzer-possible-null-dereference): New option. (-Wno-analyzer-null-argument): New option. (-Wno-analyzer-null-dereference): New option. (-Wno-analyzer-stale-setjmp-buffer): New option. (-Wno-analyzer-tainted-array-index): New option. (-Wno-analyzer-use-after-free): New option. (-Wno-analyzer-use-of-pointer-in-stale-stack-frame): New option. (-Wno-analyzer-use-of-uninitialized-value): New option. (-Wanalyzer-too-complex): New option. (-fanalyzer-call-summaries): New warning. (-fanalyzer-checker=): New warning. (-fanalyzer-fine-grained): New warning. (-fno-analyzer-state-merge): New warning. (-fno-analyzer-state-purge): New warning. (-fanalyzer-transitivity): New warning. (-fanalyzer-verbose-edges): New warning. (-fanalyzer-verbose-state-changes): New warning. (-fanalyzer-verbosity=): New warning. (-fdump-analyzer): New warning. (-fdump-analyzer-callgraph): New warning. (-fdump-analyzer-exploded-graph): New warning. (-fdump-analyzer-exploded-nodes): New warning. (-fdump-analyzer-exploded-nodes-2): New warning. (-fdump-analyzer-exploded-nodes-3): New warning. (-fdump-analyzer-supergraph): New warning. * doc/sourcebuild.texi (dg-require-dot): New. (dg-check-dot): New. * gdbinit.in (break-on-saved-diagnostic): New command. * graphviz.cc: New file. * graphviz.h: New file. * ordered-hash-map-tests.cc: New file. * ordered-hash-map.h: New file. * passes.def (pass_analyzer): Add before pass_ipa_whole_program_visibility. * selftest-run-tests.c (selftest::run_tests): Call selftest::ordered_hash_map_tests_cc_tests. * selftest.h (selftest::ordered_hash_map_tests_cc_tests): New decl. * shortest-paths.h: New file. * timevar.def (TV_ANALYZER): New timevar. (TV_ANALYZER_SUPERGRAPH): Likewise. (TV_ANALYZER_STATE_PURGE): Likewise. (TV_ANALYZER_PLAN): Likewise. (TV_ANALYZER_SCC): Likewise. (TV_ANALYZER_WORKLIST): Likewise. (TV_ANALYZER_DUMP): Likewise. (TV_ANALYZER_DIAGNOSTICS): Likewise. (TV_ANALYZER_SHORTEST_PATHS): Likewise. * tree-pass.h (make_pass_analyzer): New decl. * tristate.cc: New file. * tristate.h: New file. gcc/analyzer/ChangeLog: * ChangeLog: New file. * analyzer-selftests.cc: New file. * analyzer-selftests.h: New file. * analyzer.opt: New file. * analysis-plan.cc: New file. * analysis-plan.h: New file. * analyzer-logging.cc: New file. * analyzer-logging.h: New file. * analyzer-pass.cc: New file. * analyzer.cc: New file. * analyzer.h: New file. * call-string.cc: New file. * call-string.h: New file. * checker-path.cc: New file. * checker-path.h: New file. * constraint-manager.cc: New file. * constraint-manager.h: New file. * diagnostic-manager.cc: New file. * diagnostic-manager.h: New file. * engine.cc: New file. * engine.h: New file. * exploded-graph.h: New file. * pending-diagnostic.cc: New file. * pending-diagnostic.h: New file. * program-point.cc: New file. * program-point.h: New file. * program-state.cc: New file. * program-state.h: New file. * region-model.cc: New file. * region-model.h: New file. * sm-file.cc: New file. * sm-malloc.cc: New file. * sm-malloc.dot: New file. * sm-pattern-test.cc: New file. * sm-sensitive.cc: New file. * sm-signal.cc: New file. * sm-taint.cc: New file. * sm.cc: New file. * sm.h: New file. * state-purge.cc: New file. * state-purge.h: New file. * supergraph.cc: New file. * supergraph.h: New file. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/CVE-2005-1689-minimal.c: New test. * gcc.dg/analyzer/abort.c: New test. * gcc.dg/analyzer/alloca-leak.c: New test. * gcc.dg/analyzer/analyzer-decls.h: New header. * gcc.dg/analyzer/analyzer-verbosity-0.c: New test. * gcc.dg/analyzer/analyzer-verbosity-1.c: New test. * gcc.dg/analyzer/analyzer-verbosity-2.c: New test. * gcc.dg/analyzer/analyzer.exp: New suite. * gcc.dg/analyzer/attribute-nonnull.c: New test. * gcc.dg/analyzer/call-summaries-1.c: New test. * gcc.dg/analyzer/conditionals-2.c: New test. * gcc.dg/analyzer/conditionals-3.c: New test. * gcc.dg/analyzer/conditionals-notrans.c: New test. * gcc.dg/analyzer/conditionals-trans.c: New test. * gcc.dg/analyzer/data-model-1.c: New test. * gcc.dg/analyzer/data-model-2.c: New test. * gcc.dg/analyzer/data-model-3.c: New test. * gcc.dg/analyzer/data-model-4.c: New test. * gcc.dg/analyzer/data-model-5.c: New test. * gcc.dg/analyzer/data-model-5b.c: New test. * gcc.dg/analyzer/data-model-5c.c: New test. * gcc.dg/analyzer/data-model-5d.c: New test. * gcc.dg/analyzer/data-model-6.c: New test. * gcc.dg/analyzer/data-model-7.c: New test. * gcc.dg/analyzer/data-model-8.c: New test. * gcc.dg/analyzer/data-model-9.c: New test. * gcc.dg/analyzer/data-model-11.c: New test. * gcc.dg/analyzer/data-model-12.c: New test. * gcc.dg/analyzer/data-model-13.c: New test. * gcc.dg/analyzer/data-model-14.c: New test. * gcc.dg/analyzer/data-model-15.c: New test. * gcc.dg/analyzer/data-model-16.c: New test. * gcc.dg/analyzer/data-model-17.c: New test. * gcc.dg/analyzer/data-model-18.c: New test. * gcc.dg/analyzer/data-model-19.c: New test. * gcc.dg/analyzer/data-model-path-1.c: New test. * gcc.dg/analyzer/disabling.c: New test. * gcc.dg/analyzer/dot-output.c: New test. * gcc.dg/analyzer/double-free-lto-1-a.c: New test. * gcc.dg/analyzer/double-free-lto-1-b.c: New test. * gcc.dg/analyzer/double-free-lto-1.h: New header. * gcc.dg/analyzer/equivalence.c: New test. * gcc.dg/analyzer/explode-1.c: New test. * gcc.dg/analyzer/explode-2.c: New test. * gcc.dg/analyzer/factorial.c: New test. * gcc.dg/analyzer/fibonacci.c: New test. * gcc.dg/analyzer/fields.c: New test. * gcc.dg/analyzer/file-1.c: New test. * gcc.dg/analyzer/file-2.c: New test. * gcc.dg/analyzer/function-ptr-1.c: New test. * gcc.dg/analyzer/function-ptr-2.c: New test. * gcc.dg/analyzer/function-ptr-3.c: New test. * gcc.dg/analyzer/gzio-2.c: New test. * gcc.dg/analyzer/gzio-3.c: New test. * gcc.dg/analyzer/gzio-3a.c: New test. * gcc.dg/analyzer/gzio.c: New test. * gcc.dg/analyzer/infinite-recursion.c: New test. * gcc.dg/analyzer/loop-2.c: New test. * gcc.dg/analyzer/loop-2a.c: New test. * gcc.dg/analyzer/loop-3.c: New test. * gcc.dg/analyzer/loop-4.c: New test. * gcc.dg/analyzer/loop.c: New test. * gcc.dg/analyzer/malloc-1.c: New test. * gcc.dg/analyzer/malloc-2.c: New test. * gcc.dg/analyzer/malloc-3.c: New test. * gcc.dg/analyzer/malloc-callbacks.c: New test. * gcc.dg/analyzer/malloc-dce.c: New test. * gcc.dg/analyzer/malloc-dedupe-1.c: New test. * gcc.dg/analyzer/malloc-ipa-1.c: New test. * gcc.dg/analyzer/malloc-ipa-10.c: New test. * gcc.dg/analyzer/malloc-ipa-11.c: New test. * gcc.dg/analyzer/malloc-ipa-12.c: New test. * gcc.dg/analyzer/malloc-ipa-13.c: New test. * gcc.dg/analyzer/malloc-ipa-2.c: New test. * gcc.dg/analyzer/malloc-ipa-3.c: New test. * gcc.dg/analyzer/malloc-ipa-4.c: New test. * gcc.dg/analyzer/malloc-ipa-5.c: New test. * gcc.dg/analyzer/malloc-ipa-6.c: New test. * gcc.dg/analyzer/malloc-ipa-7.c: New test. * gcc.dg/analyzer/malloc-ipa-8-double-free.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto-a.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto-b.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto-c.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto.h: New test. * gcc.dg/analyzer/malloc-ipa-8-unchecked.c: New test. * gcc.dg/analyzer/malloc-ipa-9.c: New test. * gcc.dg/analyzer/malloc-macro-inline-events.c: New test. * gcc.dg/analyzer/malloc-macro-separate-events.c: New test. * gcc.dg/analyzer/malloc-macro.h: New header. * gcc.dg/analyzer/malloc-many-paths-1.c: New test. * gcc.dg/analyzer/malloc-many-paths-2.c: New test. * gcc.dg/analyzer/malloc-many-paths-3.c: New test. * gcc.dg/analyzer/malloc-paths-1.c: New test. * gcc.dg/analyzer/malloc-paths-10.c: New test. * gcc.dg/analyzer/malloc-paths-2.c: New test. * gcc.dg/analyzer/malloc-paths-3.c: New test. * gcc.dg/analyzer/malloc-paths-4.c: New test. * gcc.dg/analyzer/malloc-paths-5.c: New test. * gcc.dg/analyzer/malloc-paths-6.c: New test. * gcc.dg/analyzer/malloc-paths-7.c: New test. * gcc.dg/analyzer/malloc-paths-8.c: New test. * gcc.dg/analyzer/malloc-paths-9.c: New test. * gcc.dg/analyzer/malloc-vs-local-1a.c: New test. * gcc.dg/analyzer/malloc-vs-local-1b.c: New test. * gcc.dg/analyzer/malloc-vs-local-2.c: New test. * gcc.dg/analyzer/malloc-vs-local-3.c: New test. * gcc.dg/analyzer/malloc-vs-local-4.c: New test. * gcc.dg/analyzer/operations.c: New test. * gcc.dg/analyzer/params-2.c: New test. * gcc.dg/analyzer/params.c: New test. * gcc.dg/analyzer/paths-1.c: New test. * gcc.dg/analyzer/paths-1a.c: New test. * gcc.dg/analyzer/paths-2.c: New test. * gcc.dg/analyzer/paths-3.c: New test. * gcc.dg/analyzer/paths-4.c: New test. * gcc.dg/analyzer/paths-5.c: New test. * gcc.dg/analyzer/paths-6.c: New test. * gcc.dg/analyzer/paths-7.c: New test. * gcc.dg/analyzer/pattern-test-1.c: New test. * gcc.dg/analyzer/pattern-test-2.c: New test. * gcc.dg/analyzer/pointer-merging.c: New test. * gcc.dg/analyzer/pr61861.c: New test. * gcc.dg/analyzer/pragma-1.c: New test. * gcc.dg/analyzer/scope-1.c: New test. * gcc.dg/analyzer/sensitive-1.c: New test. * gcc.dg/analyzer/setjmp-1.c: New test. * gcc.dg/analyzer/setjmp-2.c: New test. * gcc.dg/analyzer/setjmp-3.c: New test. * gcc.dg/analyzer/setjmp-4.c: New test. * gcc.dg/analyzer/setjmp-5.c: New test. * gcc.dg/analyzer/setjmp-6.c: New test. * gcc.dg/analyzer/setjmp-7.c: New test. * gcc.dg/analyzer/setjmp-7a.c: New test. * gcc.dg/analyzer/setjmp-8.c: New test. * gcc.dg/analyzer/setjmp-9.c: New test. * gcc.dg/analyzer/signal-1.c: New test. * gcc.dg/analyzer/signal-2.c: New test. * gcc.dg/analyzer/signal-3.c: New test. * gcc.dg/analyzer/signal-4a.c: New test. * gcc.dg/analyzer/signal-4b.c: New test. * gcc.dg/analyzer/strcmp-1.c: New test. * gcc.dg/analyzer/switch.c: New test. * gcc.dg/analyzer/taint-1.c: New test. * gcc.dg/analyzer/zlib-1.c: New test. * gcc.dg/analyzer/zlib-2.c: New test. * gcc.dg/analyzer/zlib-3.c: New test. * gcc.dg/analyzer/zlib-4.c: New test. * gcc.dg/analyzer/zlib-5.c: New test. * gcc.dg/analyzer/zlib-6.c: New test. * lib/gcc-defs.exp (dg-check-dot): New procedure. * lib/target-supports.exp (check_dot_available): New procedure. (check_effective_target_analyzer): New. * lib/target-supports-dg.exp (dg-require-dot): New procedure.
2019-11-12[RS6000] Remove TARGET_TLS_MARKERS and require binutils 2.20Alan Modra1-6/+0
This patch removes !TARGET_TLS_MARKERS support. -mtls-markers (and -mno-tls-markers) disappear as valid options too, because I figure they haven't been used too much except by people testing the compiler. * config/rs6000/rs6000.opt (mtls-markers): Delete. * config/rs6000/rs6000.h (TARGET_TLS_MARKERS): Don't define. (IS_NOMARK_TLSGETADDR): Likewise. * config/rs6000/rs6000-protos.h (rs6000_output_tlsargs): Delete. * config/rs6000/rs6000.c (rs6000_output_tlsargs): Delete. (rs6000_legitimize_tls_address): Remove !TARGET_TLS_MARKERS code. (rs6000_call_template_1): Delete TARGET_TLS_MARKERS test and allow other UNSPECs besides UNSPEC_TLSGD and UNSPEC_TLSLD. (rs6000_indirect_call_template_1): Likewise. (rs6000_pltseq_template): Likewise. (rs6000_opt_vars): Remove "tls-markers" entry. * config/rs6000/rs6000.md (tls_gd<bits>): Replace TARGET_TLS_MARKERS with TARGET_ELF. (tls_gd_high<bits>, tls_gd_low<bits>): Likewise. (tls_ld<bits>, tls_ld_high<bits>, tls_ld_low<bits>): Likewise. (pltseq_plt_pcrel<mode>): Likewise. (call_value_local32): Remove IS_NOMARK_TLSGETADDR predicate test. (call_value_local64): Likewise. (call_value_indirect_nonlocal_sysv<mode>): Remove IS_NOMARK_TLSGETADDR output and length attribute sub-expression. (call_value_nonlocal_sysv<mode>), (call_value_nonlocal_sysv_secure<mode>), (call_value_local_aix<mode>, call_value_nonlocal_aix<mode>), (call_value_indirect_aix<mode>, call_value_indirect_elfv2<mode>), (call_value_indirect_pcrel<mode>): Likewise. * doc/install.texi (powerpc-*-*): Require binutils-2.20. * configure.ac (HAVE_AS_TLS_MARKERS): Delete test. * configure: Regenerate. * config.in: Regenerate. From-SVN: r278075
2019-11-04MSP430: Add -mtiny-printf optionJozef Lawrynowicz1-0/+7
2019-11-04 Jozef Lawrynowicz <jozef.l@mittosystems.com> gcc/ * config.in: Regenerate. * config/msp430/msp430.c (msp430_option_override): Emit an error if -mtiny-printf is used without GCC being configured with --enable-newlib-nano-formatted-io. * config/msp430/msp430.h (LINK_SPEC): Pass "--wrap puts --wrap printf" when -mtiny-printf is used. * config/msp430/msp430.opt: Document -mtiny-printf. * configure: Regenerate. * configure.ac: Enable --enable-newlib-nano-formatted-io flag. Define HAVE_NEWLIB_NANO_FORMATTED_IO if --enable-newlib-nano-formatted-io is passed. * doc/invoke.texi: Document -mtiny-printf. gcc/testsuite/ * gcc.target/msp430/tiny-printf.c: New test. From-SVN: r277774
2019-11-03config.in: Regenerate.Jan Hubicka1-0/+13
* config.in: Regenerate. * configure: Regenerate. * configure.ac: Check for mallinfo. * ggc-common.c: Include malloc.h if available; include options.h (report_heap_memory_use): New functoin. * ggc-page.c (ggc_grow): Do not print "start". * ggc.h (report_heap_memory_use): Declare. * pases.c (execute_one_pass): Report memory after IPA passes. (ipa_read_summaries_1): Likewise. (ipa_read_optimization_summaries_1): Likewise. * lto/lto-common.c (read_cgraph_and_symbols): Improve -Q reporting. * lto.c (lto_wpa_write_files): Likewise. From-SVN: r277753
2019-10-07MSP430: Don't generate 430X insns when handling data in the lower memory regionJozef Lawrynowicz1-0/+6
gcc/ChangeLog: 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config.in: Regenerate. * config/msp430/constraints.md: Fix docstring for "Ys" constraint. Add new "Yx" constraint. * config/msp430/driver-msp430.c (msp430_propagate_region_opt): New spec function. * config/msp430/msp430-protos.h (msp430_op_not_in_high_mem): New prototype. * config/msp430/msp430.c (msp430_option_override): Allow the lower code/data region to be selected in the small memory model. (msp430_section_attr): Don't warn if the "section" and "lower" attributes are used together. (msp430_handle_generic_attribute): Likewise. (msp430_var_in_low_mem): New function. (TARGET_ENCODE_SECTION_INFO): Define. (msp430_encode_section_info): New function. (gen_prefix): Return early in the small memory model. Require TARGET_USE_LOWER_REGION_PREFIX to be set before adding the ".lower" prefix if -m{code,data}-region=lower have been passed. (msp430_output_aligned_decl_common): Emit common symbols when -mdata-region=lower is passed unless TARGET_USE_LOWER_REGION_PREFIX is set. (TARGET_ASM_FILE_END): Define. (msp430_file_end): New function. (msp430_do_not_relax_short_jumps): Allow relaxation when function will be in the lower region. (msp430_op_not_in_high_mem): New function. (msp430_print_operand): Check "msp430_op_not_in_high_mem" for the 'X' operand selector. Clarify comment for 'x' operand selector. * config/msp430/msp430.h (LINK_SPEC): Propagate -m{code,data}-region to the linker via spec function msp430_propagate_region_opt. (msp430_propagate_region_opt): New prototype. (EXTRA_SPEC_FUNCTIONS): Add msp430_propagate_region_opt. (SYMBOL_FLAG_LOW_MEM): Define. * config/msp430/msp430.md (addsipsi3): Add missing "%X" operand selector. (zero_extendqihi2): Fix operand number used by "%X" selector. (zero_extendqisi2): Likewise. (zero_extendhisi2): Likewise. (movqi): Use "Yx" constraint in place of "%X" operand selector. (movhi): Likewise. (addqi3): Likewise. (addhi3): Likewise. (addsi3): Likewise. (addhi3_cy): Likewise. (addchi4_cy): Likewise. (subqi3): Likewise. (subhi3): Likewise. (subsi3): Likewise. (bic<mode>3): Likewise. (and<mode>3): Likewise. (ior<mode>3): Likewise. (xor<mode>3): Likewise. (slli_1): Add missing "%X" operand selector. (slll_1): Likewise. (slll_2): Likewise. (srai_1): Likewise. (sral_1): Likewise. (sral_2): Likewise. (srli_1): Likewise. (srll_1): Likewise. (cbranchqi4_real): Use "Yx" constraint in place of "%X" operand selector. (cbranchhi4_real): Likewise. (cbranchqi4_reversed): Likewise. (cbranchhi4_reversed): Likewise. (*bitbranch<mode>4): Likewise. (*bitbranch<mode>4_z): Remove unnecessary "%x" operand selector. * config/msp430/msp430.opt (mcode-region=): Set default to MSP430_REGION_LOWER. Improve docstring. (mdata-region=): Likewise. (muse-lower-region-prefix): New option. * config/msp430/t-msp430 (MULTILIB_OPTIONS): Add mdata-region=none multilib. (MULTILIB_MATCHES): Set mdata-region={upper,either} to match mdata-region=none multilib. MULTILIB_EXCEPTIONS: Remove. MULTILIB_REQUIRED: Define. * configure: Regenerate. * configure.ac: Define HAVE_AS_GNU_ATTRIBUTE and HAVE_AS_MSPABI_ATTRIBUTE if GAS version >= 2.33.50. * doc/extend.texi: Clarify comment for {upper,lower,either} function attributes. Add separate description for "lower" variable attribute. gcc/testsuite/ChangeLog: 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com> * gcc.target/msp430/430x-insns.c: New test. * gcc.target/msp430/data-attributes-2.c: Remove dg-warning directives for conflicts between the "section" and "lower" attributes. * gcc.target/msp430/msp430.exp (check_effective_target_msp430_region_not_lower): New. (check_effective_target_msp430_region_lower): New. * gcc.target/msp430/object-attributes-430.c: New test. * gcc.target/msp430/object-attributes-default.c: New test. * gcc.target/msp430/object-attributes-mlarge-any-region.c: New test. * gcc.target/msp430/object-attributes-mlarge.c: New test. From-SVN: r276665
2019-07-03Add zstd support for LTO bytecode compression.Martin Liska1-0/+6
2019-07-03 Martin Liska <mliska@suse.cz> * Makefile.in: Define ZSTD_LIB. * common.opt: Adjust compression level to support also zstd levels. * config.in: Regenerate. * configure: Likewise. * configure.ac: Add --with-zstd and --with-zstd-include options and detect ZSTD. * doc/install.texi: Mention zstd dependency. * gcc.c: Print supported LTO compression algorithms. * lto-compress.c (lto_normalized_zstd_level): Likewise. (lto_compression_zstd): Likewise. (lto_uncompression_zstd): Likewise. (lto_end_compression): Dispatch in between zlib and zstd. (lto_compression_zlib): Mark with ATTRIBUTE_UNUSED. (lto_uncompression_zlib): Make it static. * lto-compress.h (lto_end_uncompression): Fix GNU coding style. * lto-section-in.c (lto_get_section_data): Pass info about used compression. * lto-streamer-out.c: By default use zstd when possible. * timevar.def (TV_IPA_LTO_DECOMPRESS): Rename to decompression (TV_IPA_LTO_COMPRESS): Likewise for compression. From-SVN: r272996
2019-03-01RISC-V: Generalize -march support, add ELF attribute support.Kito Cheng1-0/+6
Kito Cheng <kito.cheng@gmail.com> Monk Chiang <sh.chiang04@gmail.com> gcc/ * common/config/riscv/riscv-common.c: Include sstream. (riscv_subset_list::to_string): New. (riscv_arch_str): Likewise. * config.gcc (riscv*-*-*): Handle --with-riscv-attribute= * config.in: Regen. * config/riscv/riscv-protos.h (riscv_arch_str): New. * config/riscv/riscv.c (INCLUDE_STRING): Defined. (riscv_emit_attribute): New. (riscv_file_start): Emit attribute if needed. (riscv_option_override): Init riscv_emit_attribute_p. * config/riscv/riscv.opt (mriscv-attribute): New option. * configure.ac (riscv*-*-*): Check binutils is supporting ELF * configure: Regen. * doc/install.texi: Document --with-riscv-attribute. * doc/invoke.texi: Document -mriscv-attribute. * common/config/riscv/riscv-common.c: Include config/riscv/riscv-protos.h. (INCLUDE_STRING): Defined. (RISCV_DONT_CARE_VERSION): Defined. (riscv_subset_t): Declare. (riscv_subset_t::riscv_subset_t): New. (riscv_subset_list): Declare. (riscv_subset_list::riscv_subset_list): New. (riscv_subset_list::~riscv_subset_list): Likewise. (riscv_subset_list::parsing_subset_version): Likewise. (riscv_subset_list::parse_std_ext): Likewise. (riscv_subset_list::parse_sv_or_non_std_ext): Likewise. (riscv_subset_list::add): Likewise. (riscv_subset_list::lookup): Likewise. (riscv_subset_list::xlen): Likewise. (riscv_subset_list::parse): Likewise. (riscv_supported_std_ext): Likewise. (current_subset_list): Likewise. (riscv_parse_arch_string): Using riscv_subset_list::parse to parse. gcc/testsuite/ * gcc.target/riscv/attribute-1.c: New. * gcc.target/riscv/attribute-2.c: Likewise. * gcc.target/riscv/attribute-3.c: Likewise. * gcc.target/riscv/attribute-4.c: Likewise. * gcc.target/riscv/attribute-5.c: Likewise. * gcc.target/riscv/attribute-6.c: Likewise. * gcc.target/riscv/attribute-7.c: Likewise. * gcc.target/riscv/attribute-8.c: Likewise. * gcc.target/riscv/attribute-9.c: Likewise. * gcc.target/riscv/arch-1.c: New. * gcc.target/riscv/arch-2.c: Likewise. * gcc.target/riscv/arch-3.c: Likewise. * gcc.target/riscv/arch-4.c: Likewise. Co-Authored-By: Monk Chiang <sh.chiang04@gmail.com> From-SVN: r269337
2018-11-29[RS6000] inline plt call sequencesAlan Modra1-0/+6
Finally, the point of the previous patches in this series, support for inline PLT calls, keyed off -fno-plt. This emits code using new relocations that tie all insns in the sequence together, so that the linker can edit the sequence back to a direct call should the call target turn out to be local. An example of ELFv2 code to call puts is as follows: .reloc .,R_PPC64_PLTSEQ,puts std 2,24(1) .reloc .,R_PPC64_PLT16_HA,puts addis 12,2,0 .reloc .,R_PPC64_PLT16_LO_DS,puts ld 12,0(12) .reloc .,R_PPC64_PLTSEQ,puts mtctr 12 .reloc .,R_PPC64_PLTCALL,puts bctrl ld 2,24(1) "addis 12,2,puts@plt@ha" and "ld 12,puts@plt@l(12)" are also supported by the assembler. gcc instead uses the explicit R_PPC64_PLT16_HA and R_PPC64_PLT16_LO_DS relocs because when the call is to __tls_get_addr an extra reloc is emitted at every place where one is shown above, to specify the __tls_get_addr arg. The linker expects the extra reloc to come first. .reloc enforces that ordering. The patch also changes code emitted for longcalls if the assembler supports the new marker relocs, so that these too can be edited. One side effect of longcalls using PLT16 relocs is that they can now be resolved lazily by ld.so. I don't support lazy inline PLT calls for ELFv1, because ELFv1 would need barriers to reliably load both the function address and toc pointer from the PLT. ELFv1 -fno-plt uses the longcall sequence instead, which isn't edited by GNU ld. * config.in (HAVE_AS_PLTSEQ): Add. * config/rs6000/predicates.md (indirect_call_operand): New. * config/rs6000/rs6000-protos.h (rs6000_pltseq_template), (rs6000_sibcall_sysv): Declare. * config/rs6000/rs6000.c (init_cumulative_args): Set cookie CALL_LONG for -fno-plt. (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ. (rs6000_indirect_call_template_1): Emit .reloc directives for UNSPEC_PLTSEQ calls. (rs6000_pltseq_template): New function. (rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if relocs supported by assembler. Move SYMBOL_REF test to callers. (rs6000_call_aix): Adjust rs6000_longcall_ref call. Package insns in UNSPEC_PLTSEQ, preserving original func_desc. (rs6000_call_sysv): Likewise. (rs6000_sibcall_sysv): New function. * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default. * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA, UNSPEC_PLT16_LO): New. (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New. (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero cookie in constraints. Test explicitly for flags in length attr. Handle unspec operand 1. (call_value_indirect_nonlocal_sysv): Likewise. (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1. (call_indirect_elfv2, call_value_indirect_elfv2): Likewise. (sibcall, sibcall_value): Use rs6000_sibcall_sysv. (sibcall_indirect_nonlocal_sysv): New pattern. (sibcall_value_indirect_nonlocal_sysv): Likewise. (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect call alternatives. * configure.ac: Check for gas plt sequence marker support. * configure: Regenerate. From-SVN: r266605
2018-11-21S/390: Support vector load/store alignment hintsAndreas Krebbel1-0/+7
The IBM z14 POP adds an optional alignment operand to the vl, vst, vlm, and vstm instruction (vector loads and stores). Vectors residing on 8 or 16 byte boundaries might get loaded or stored faster on some models given the instruction uses the proper hint operand. A wrong hint will hurt performance though. The attached testcase align-1 currently fails due to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88085 gcc/ChangeLog: 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com> * configure.ac: Add check for Binutils to determine whether vector load/store alignments hints are being supported. * config.in: Regenerate. * configure: Regenerate. * config/s390/s390.c (print_operand): Support new output modifier A. * config/s390/s390.md ("movti"): Append alignment hint output using the new output modifier 'A'. * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf") ("*vec_ti_to_v1ti"): Likewise. gcc/testsuite/ChangeLog: 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com> * gcc.target/s390/vector/align-1.c: New test. * gcc.target/s390/vector/align-2.c: New test. From-SVN: r266336
2018-11-02Remove SPARC HAVE_AS_REGISTER_PSEUDO_OPRainer Orth1-6/+0
* configure.ac (gcc_cv_as_sparc_register_op): Remove. * configure: Regenerate. * config.in: Regenerate. * config/sparc/sparc.c (sparc_output_scratch_registers): Remove HAVE_AS_REGISTER_PSEUDO_OP guard. * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove !HAVE_AS_REGISTER_PSEUDO_OP support. (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP guard. From-SVN: r265743
2018-10-31Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).Joseph Myers1-0/+5
This patch updates GCC to use autoconf 2.69 and automake 1.15.1. (That's not the latest automake version, but it's the one used by binutils-gdb, with which consistency is desirable, and in any case seems a useful incremental update that should make a future update to 1.16.1 easier.) The changes are generally similar to the binutils-gdb ones, and are copied from there where shared files and directories are involved (there are some further changes to such shared directories, however, which I'd expect to apply to binutils-gdb once this patch is in GCC). Largely, obsolete AC_PREREQ calls are removed, while many AC_LANG_SOURCE calls are added to avoid warnings from aclocal and autoconf. Multilib support is no longer included in core automake, meaning that multilib.am needs copying from automake's contrib directory into the GCC source tree. Autoconf 2.69 has Go support, so local copies of that support are removed. I hope the D support will soon be submitted to upstream autoconf so the local copy of that can be removed in a future update. Changes to how automake generates runtest calls mean quotes are removed from RUNTEST definitions in five lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm, libphobos, libvtv; some others have RUNTEST definitions without quotes, which are still OK); libgo and libphobos also get -Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST do not generate automake warnings. Note that the regeneration did not include regeneration of fixincludes/config.h.in (attempting such regeneration resulted in all the USED_FOR_TARGET conditionals disappearing; and I don't see anything in the fixincludes/ directory that would result in such conditionals being generated, unlike in the gcc/ directory). Also note that libvtv/testsuite/other-tests/Makefile.in was not regenerated; that directory is not listed as a subdirectory for which Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm not sure how it's meant to be regenerated. While I mostly fixed warnings should running aclocal / automake / autoconf, there were various such warnings from automake in the libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos directories that I did not fix, preferring to leave those to the relevant subsystem maintainers. Specifically, most of those warnings were of the following form (example from libgfortran): Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory, Makefile.am:48: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. I think it's best for the relevant maintainers to add subdir-objects and do any other associated Makefile.am changes needed. In some cases the paths in the warnings involved ../; I don't know if that adds any extra complications to the use of subdir-objects. I've tested this with native, cross and Canadian cross builds. The risk of any OS-specific issues should I hope be rather lower than if a libtool upgrade were included (we *should* do such an upgrade at some point, but it's more complicated - it involves identifying all our local libtool changes to see if any aren't included in the upstream version we update to, and reverting an upstream libtool patch that's inappropriate for use in GCC); I think it would be better to get this update into GCC so that people can test in different configurations and we can fix any issues found, rather than to try to get more and more testing done before it goes in. top level: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * multilib.am: New file. From automake. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE. * ar-lib: New file. * test-driver: New file. * configure: Re-generate. config: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * math.m4, tls.m4: Use AC_LANG_SOURCE. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69. fixincludes: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, configure: Regenerate. gcc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single line for second argument of AC_DEFINE_UNQUOTED. * doc/install.texi (Tools/packages necessary for modifying GCC): Update to autoconf 2.69 and automake 1.15.1. * aclocal.m4, config.in, configure: Regenerate. gnattools: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. gotools: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * config/go.m4: Remove file. * Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config. * configure.ac: Remove AC_PREREQ. Do not include config/go.m4. * Makefile.in, aclocal.m4, configure: Regenerate. intl: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ. * configure: Re-generate. * config.h.in: Re-generate. * aclocal.m4: Re-generate. libada: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. libatomic: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * acinclude.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libbacktrace: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libcc1: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libcpp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * aclocal.m4, config.in, configure: Regenerate. libdecnumber: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * aclocal.m4. libffi: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove doc/libffi.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, fficonfig.h.in, include/Makefile.in, man/Makefile.in, testsuite/Makefile.in: Regenerate. libgcc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * configure: Regenerate. libgfortran: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libgo [logically part of this change but omitted from the commit]: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * config/go.m4: Remove file. * config/libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use -Wno-override in AM_INIT_AUTOMAKE call. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libgomp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libgomp.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libhsail-rt: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libiberty: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * config.in: Re-generate. libitm: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libitm.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libobjc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, config.h.in, configure: Regenerate. liboffloadmic: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * plugin/Makefile.am: Include multilib.am. * plugin/configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, plugin/Makefile.in, plugin/aclocal.m4, plugin/configure: Regenerate. libphobos: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use -Wno-override in AM_INIT_AUTOMAKE call. * m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call. * m4/druntime/os.m4: Use AC_LANG_SOURCE. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in, src/Makefile.in, testsuite/Makefile.in: Regenerate. libquadmath: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.8. Add info-in-builddir. (all-local): Define outside conditional code. (CLEANFILES): Remove libquadmath.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libsanitizer: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, asan/Makefile.in, configure, interception/Makefile.in, libbacktrace/Makefile.in, lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in, ubsan/Makefile.in: Regenerate. libssp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.9.5. * configure.ac: Remove AC_PREREQ. Quote argument to AC_RUN_IFELSE. * Makefile.in, aclocal.m4, configure: Regenerate. libstdc++-v3: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, doc/Makefile.in, include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in, src/c++17/Makefile.in, src/c++98/Makefile.in, src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate. libvtv: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. lto-plugin: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. zlib: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Modernize AC_INIT call, remove AC_PREREQ. * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * configure: Re-generate. From-SVN: r265695
2018-10-24Disable string merging with alignment > 1 before Solaris 11.4/SPARCRainer Orth1-9/+9
* configure.ac (gcc_cv_ld_aligned_shf_merge): New test. * configure: Regenerate. * config.in: Regenerate. * varasm.c (mergeable_string_section): Use readonly_data_section if linker doesn't support SHF_MERGE with alignment > 8. (mergeable_constant_section): Likewise. From-SVN: r265456
2018-10-12introduce --enable-large-address-awareAlexandre Oliva1-0/+12
Add a configure knob for mingw32 and 64 toolchains to default passing --large-address-aware to the linker, when creating 32-bit binaries. -Wl,--disable-large-address-aware can still reverse its effects. for gcc/ChangeLog * configure.ac: Introduce --enable-large-address-aware to define MINGW_DEFAULT_LARGE_ADDR_AWARE. * doc/install.texi: Document it. * configure, config.in: Rebuilt. * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define, based on MINGW_DEFAULT_LARGE_ADDR_AWARE. (LINK_SPEC): Insert it. * config/i386/mingw-264.h: Likewise. From-SVN: r265130
2018-10-01Allow setting of stack-clash via configure options.Tamar Christina1-0/+7
This patch defines a configure option to allow the setting of the default guard size via configure flags when building the target. The new flag is: * --with-stack-clash-protection-guard-size=<num> The patch defines a new macro DEFAULT_STK_CLASH_GUARD_SIZE which targets need to use explicitly is they want to support this configure flag and values that users may have set. gcc/ PR target/86486 * configure.ac: Add stack-clash-protection-guard-size. * doc/install.texi: Document it. * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New. * params.def: Update comment for guard-size. (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE, PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description. * configure: Regenerate. From-SVN: r264752
2018-09-29rs6000: Delete HAVE_AS_DCISegher Boessenkool1-6/+0
Every supported assembler supports these instructions. Committing. * config.in: Delete HAVE_AS_DCI. * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true. * config/rs6000/rs6000.h: Ditto. * configure.ac: Delete HAVE_AS_DCI. * configure: Regenerate. From-SVN: r264703
2018-09-28rs6000: Delete HAVE_AS_LWSYNC and TARGET_LWSYNC_INSTRUCTIONSegher Boessenkool1-6/+0
All supported assemblers know lwsync, so we never need to generate this instruction using the .long escape hatch. * config.in (HAVE_AS_LWSYNC): Delete. * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete. * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never do it as a .long . * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete. * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it as a .long . * configure.ac: Delete HAVE_AS_LWSYNC. * configure: Regenerate. From-SVN: r264702
2018-09-27rs6000: Delete many HAVE_AS_* (PR87149)Segher Boessenkool1-48/+0
This deletes most HAVE_AS_* that determine if the assembler supports some ISA level (and also HAVE_AS_MFPGPR and HAVE_AS_DFP). These are not useful: we will only generate an instruction that requires some newer ISA if the user specifically asked for it (with -mcpu=, say). If the assembler cannot handle that, it is fine if it gives an error. They also hurt: it increases the number of possible situations that all need handling and all need testing. We do not handle all cases, and obviously do not test all either. This patch removes: HAVE_AS_POPCNTB (power5, 2.02) HAVE_AS_FPRND (power5+, 2.04) HAVE_AS_CMPB (power6, 2.05) HAVE_AS_POPCNTD (power7, 2.06) HAVE_AS_POWER8 (power8, 2.07) HAVE_AS_POWER9 (power9, 3.0) HAVE_AS_DFP (power6, 2.05, server) HAVE_AS_MFPGPR (power6x but not later, not arch) PR target/87149 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR, HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9): Delete, always treat as true. * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal): Ditto. Simplify remaining code. * config/powerpcspe/powerpcspe.h: Ditto. * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto. Simplify remaining code. (rs6000_expand_builtin): Ditto. * config/rs6000/rs6000.h: Ditto. * configure.ac: Ditto. * configure: Regenerate. From-SVN: r264675
2018-09-20[PR87013] check for .loc is_stmt support in the assemblerAlexandre Oliva1-0/+6
Back when we had the logic to output is_stmt but never exercised it, it didn't matter that we didn't test for assembler support for it. But there are still assemblers out there that do not support it, so now that we enable the formerly latent is_stmt logic, we'd better make sure the assembler can deal with it. for gcc/ChangeLog PR bootstrap/87013 * configure.ac: Check for .loc is_stmt support. * configure, config.in: Rebuilt. * dwarf2out.c (dwarf2out_source_line): Skip is_stmt if not supported. From-SVN: r264449
2018-05-25Support SHF_EXCLUDE on non-x86 and with Solaris asRainer Orth1-1/+1
* configure.ac (gcc_cv_as_section_has_e): Move to common section. Rename to... (gcc_cv_as_section_exclude): ... this. Try Solaris as #exclude syntax. * configure: Regenerate. * config.in: Regenerate. * config/i386/i386.c (i386_solaris_elf_named_section): Handle SECTION_EXCLUDE. * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section) [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE. * varasm.c (default_elf_asm_named_section): Don't check if HAVE_GAS_SECTION_EXCLUDE is defined. From-SVN: r260708
2018-02-09[LVU] Introduce location viewsAlexandre Oliva1-0/+6
This patch introduces an option to enable the generation of location views along with location lists. The exact format depends on the DWARF version: it can be a separate attribute (DW_AT_GNU_locviews) or (DW_LLE_view_pair) entries in DWARF5+ loclists. Line number tables are also affected. If the assembler is found, at compiler build time, to support .loc views, we use them and assembler-computed view labels, otherwise we output compiler-generated line number programs with conservatively-computed view labels. In either case, we output view information next to line number changes when verbose assembly output is requested. This patch requires an LVU patch that modifies the exported API of final_scan_insn. It also expects the entire SFN patchset to be installed first, although SFN is not a requirement for LVU. for include/ChangeLog * dwarf2.def (DW_AT_GNU_locviews): New. * dwarf2.h (enum dwarf_location_list_entry_type): Add DW_LLE_GNU_view_pair. (DW_LLE_view_pair): Define. for gcc/ChangeLog * common.opt (gvariable-location-views): New. (gvariable-location-views=incompat5): New. * config.in: Rebuilt. * configure: Rebuilt. * configure.ac: Test assembler for view support. * dwarf2asm.c (dw2_asm_output_symname_uleb128): New. * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare. * dwarf2out.c (var_loc_view): New typedef. (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend. (dwarf2out_locviews_in_attribute): New. (dwarf2out_locviews_in_loclist): New. (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists. (enum dw_line_info_opcode): Add LI_adv_address. (struct dw_line_info_table): Add view. (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros. (DWARF2_ASM_VIEW_DEBUG_INFO): Define default. (zero_view_p): New variable. (ZERO_VIEW_P): New macro. (output_asm_line_debug_info): New. (struct var_loc_node): Add view. (add_AT_view_list, AT_loc_list): New. (add_var_loc_to_decl): Add view param. Test it against last. (new_loc_list): Add view params. Record them. (AT_loc_list_ptr): Handle loc and view lists. (view_list_to_loc_list_val_node): New. (print_dw_val): Handle dw_val_class_view_list. (size_of_die): Likewise. (value_format): Likewise. (loc_list_has_views): New. (gen_llsym): Set vl_symbol too. (maybe_gen_llsym, skip_loc_list_entry): New. (dwarf2out_maybe_output_loclist_view_pair): New. (output_loc_list): Output view list or entries too. (output_view_list_offset): New. (output_die): Handle dw_val_class_view_list. (output_dwarf_version): New. (output_compilation_unit_header): Use it. (output_skeleton_debug_sections): Likewise. (output_rnglists, output_line_info): Likewise. (output_pubnames, output_aranges): Update version comments. (output_one_line_info_table): Output view numbers in asm comments. (dw_loc_list): Determine current endview, pass it to new_loc_list. Call maybe_gen_llsym. (loc_list_from_tree_1): Adjust. (add_AT_location_description): Create view list attribute if needed, check it's absent otherwise. (convert_cfa_to_fb_loc_list): Adjust. (maybe_emit_file): Call output_asm_line_debug_info for test. (dwarf2out_var_location): Reset views as needed. Precompute add_var_loc_to_decl args. Call get_attr_min_length only if we have the attribute. Set view. (new_line_info_table): Reset next view. (set_cur_line_info_table): Call output_asm_line_debug_info for test. (dwarf2out_source_line): Likewise. Output view resets and labels to the assembler, or select appropriate line info opcodes. (prune_unused_types_walk_attribs): Handle dw_val_class_view_list. (optimize_string_length): Catch it. Adjust. (resolve_addr): Copy vl_symbol along with ll_symbol. Handle dw_val_class_view_list, and remove it if no longer needed. (hash_loc_list): Hash view numbers. (loc_list_hasher::equal): Compare them. (optimize_location_lists): Check whether a view list symbol is needed, and whether the locview attribute is present, and whether they match. Remove the locview attribute if no longer needed. (index_location_lists): Call skip_loc_list_entry for test. (dwarf2out_finish): Call output_asm_line_debug_info for test. Use output_dwarf_version. * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list. (struct dw_val_node): Add val_view_list. * final.c (SEEN_NEXT_VIEW): New. (set_next_view_needed): New. (clear_next_view_needed): New. (maybe_output_next_view): New. (final_start_function): Rename to... (final_start_function_1): ... this. Take pointer to FIRST, add SEEN parameter. Emit param bindings in the initial view. (final_start_function): Reintroduce SEEN-less interface. (final): Rename to... (final_1): ... this. Take SEEN parameter. Output final pending next view at the end. (final): Reintroduce seen-less interface. (final_scan_insn): Output pending next view before switching sections or ending a block. Mark the next view as needed when outputting variable locations. Notify debug backend of section changes, and of location view changes. (rest_of_handle_final): Adjust. * toplev.c (process_options): Autodetect value for debug variable location views option. Warn on incompat5 without -gdwarf-5. * doc/invoke.texi (gvariable-location-views): New. (gvariable-location-views=incompat5): New. (gno-variable-location-views): New. From-SVN: r257510
2018-01-26Configure USE_HIDDEN_LINKONCE on Solaris/x86Rainer Orth1-0/+6
gcc/testsuite: * gcc.target/i386/mcount_pic.c: Only xfail get_pc_thunk scan on Solaris 10. * gcc.target/i386/pr63620.c: Likewise. gcc: * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove. * configure.ac (hidden_linkonce): New test. * configure: Regenerate. * config.in: Regenerate. From-SVN: r257076
2017-10-26Use -xbrace_comment=no with recent Solaris/x86 asRainer Orth1-0/+6
* configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler supports -xbrace_comment option. * configure: Regenerate. * config.in: Regenerate. * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define. (ASM_CPU_SPEC): Use it. From-SVN: r254103