aboutsummaryrefslogtreecommitdiff
path: root/libgcc
AgeCommit message (Collapse)AuthorFilesLines
2022-02-25Daily bump.GCC Administrator1-0/+11
2022-02-25libgcc: fix a warning calling find_fde_tailXi Ruoyao1-1/+1
The third parameter of find_fde_tail is an _Unwind_Ptr (which is an integer type instead of a pointer), but we are passing NULL to it. This causes a -Wint-conversion warning. libgcc/ * unwind-dw2-fde-dip.c (_Unwind_Find_FDE): Call find_fde_tail with 0 instead of NULL.
2022-02-24bpf: do not --enable-gcov for bpf-*-* targetsJose E. Marchesi2-17/+31
This patch changes the build machinery in order to disable the build of GCOV (both compiler and libgcc) in bpf-*-* targets. The reason for this change is that BPF is (currently) too restricted in order to support the coverage instrumentalization. Tested in bpf-unknown-none and x86_64-linux-gnu targets. 2022-02-23 Jose E. Marchesi <jose.marchesi@oracle.com> gcc/ChangeLog PR target/104656 * configure.ac: --disable-gcov if targetting bpf-*. * configure: Regenerate. libgcc/ChangeLog PR target/104656 * configure.ac: --disable-gcov if targetting bpf-*. * configure: Regenerate.
2022-01-26Daily bump.GCC Administrator1-0/+5
2022-01-25libgcc: Fix _Unwind_Find_FDE for missing unwind data with glibc 2.35Florian Weimer1-1/+1
_dl_find_object returns success even if no unwind information has been found, and dlfo_eh_frame is NULL. libgcc/ChangeLog: PR libgcc/104207 * unwind-dw2-fde-dip.c (_Unwind_Find_FDE): Add NULL check.
2022-01-18Daily bump.GCC Administrator1-0/+4
2022-01-17Manual changes for .cc renaming.Martin Liska1-1/+1
gcc/ChangeLog: * Makefile.in: Rename .c names to .cc. * config.gcc: Likewise. * configure: Regenerate. Likewise. * configure.ac: Likewise. * gengtype.cc (set_gc_used): Likewise. (source_dot_c_frul): Likewise. (source_dot_cc_frul): Likewise. (struct file_rule_st): Likewise. (close_output_files): Likewise. * config/avr/t-avr: Use CXXFLAGS_* and CXX_FOR_BUILD. gcc/ada/ChangeLog: * Makefile.rtl: Rename .c names to .cc. * gcc-interface/Make-lang.in: Likewise. * gcc-interface/Makefile.in: Likewise. libgcc/ChangeLog: * libgcov-driver.c: Rename .c names to .cc. libcpp/ChangeLog: * Makefile.in: Rename .c names to .cc.
2022-01-16Daily bump.GCC Administrator1-0/+7
2022-01-15libgcc: Fix __gthr_i486_lock_cmp_xchg clobber for WindowsJonathan Yong2-23/+2
2022-01-14 David <gccbugzilla@limegreensocks.com> libgcc/ * config/i386/gthr-win32.c (__gthr_i486_lock_cmp_xchg): Remove inlined version, Windows 95 is no longer relevant. * config/i386/gthr-win32.h (__GTHREAD_I486_INLINE_LOCK_PRIMITIVES): unset.
2022-01-15Daily bump.GCC Administrator1-0/+5
2022-01-14arc: Add DWARF2 alternate CFA column.Claudiu Zissulescu1-4/+5
Add DWARF 2 CFA column which tracks the return address from a signal handler context. This value must not correspond to a hard register and must be out of the range of DWARF_FRAME_REGNUM(). gcc/ * config/arc/arc.h (DWARF_FRAME_REGNUM): Update definition. (DWARF_FRAME_RETURN_COLUMN): Use RETURN_ADDR_REGNUM macro. (INCOMING_RETURN_ADDR_RTX): Likewise. (DWARF_ALT_FRAME_RETURN_COLUMN): Define. gcc/testsuite/ * gcc.target/arc/cancel-1.c: New file. libgcc/ * config/arc/linux-unwind.h (arc_fallback_frame_state): Use DWARF_ALT_FRAME_RETURN_COLUMN macro. Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
2022-01-05Daily bump.GCC Administrator1-0/+5
2022-01-04libgcc: Use _dl_find_object in _Unwind_Find_FDEFlorian Weimer1-0/+18
libgcc/ChangeLog: * unwind-dw2-fde-dip.c (_Unwind_Find_FDE): Call _dl_find_object if available.
2022-01-03Update copyright years.Jakub Jelinek1064-1064/+1064
2022-01-03Update Copyright in ChangeLog filesJakub Jelinek2-2/+2
Do this separately from all other Copyright updates, as ChangeLog files can be modified only separately.
2022-01-03Daily bump.GCC Administrator1-0/+7
2022-01-02Generate illegal instruction fault if LWS syscall returns -EFAULT.John David Anglin1-0/+6
2022-01-02 John David Anglin <danglin@gcc.gnu.org> libgcc/ChangeLog: * config/pa/linux-atomic.c (_ASM_EFAULT): Define. (__kernel_cmpxchg): Nullify illegal iitlbp instruction if error return is not equal _ASM_EFAULT. (__kernel_cmpxchg2): Likewise.
2021-12-18Daily bump.GCC Administrator1-0/+11
2021-12-17libgcc, Darwin: Add missing build dependencies.Iain Sandoe4-7/+12
There was a race condition where the link for the new shared EH library (only used on earlier Darwin) could fail because the new crts had not been copied to the gcc directory. This can cause a build failure (although currently only seen on powerpc-darwin). Fixed by adding specific dependency on the crts and on the multi target. We also add the declaration header for the Darwin10 unwinder shim to the powerpc cases, since we build that there for Rosetta use. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libgcc/ChangeLog: * config.host: Add shim declaration header to powerpc*-darwin builds. * config/rs6000/t-darwin-ehs: Remove dependency on the powerpc end file. * config/t-darwin-ehs: Add dependencies to the shared unwinder objects. * config/t-slibgcc-darwin: Add extra_parts to the dependencies for the shared EH lib. Add all-multi to the dependencies for the libgcc_s.1.dylib redirections.
2021-12-14Daily bump.GCC Administrator1-0/+33
2021-12-13Remove ppc*-vxworks7* inadequate libgcc Makefile fragmentsOlivier Hainque1-1/+1
t-linux assigns .so version numbers to a set of symbols, some of which aren't included the VxWorks libgcc on powerpc (from ibm-ldouble.c, in particular). t-slibgcc-libgcc yields a kind of .so file that the default loader can't handle. This sort of extension to tmake_file for shared libs will be better handled in a grouped fashion for all targets anyway. 2021-12-13 Olivier Hainque <hainque@adacore.com> * config.host (powerpc*-*-vxworks7*): Remove rs6000/t-linux and t-slibgcc-libgcc from tmake_file.
2021-12-13Remove special case for arm-vxworks on the use of vxcrtstuffOlivier Hainque1-4/+1
Not needed any more after the recent cleanups issued for the support of shared libraries. 2021-12-13 Olivier Hainque <hainque@adacore.com> libgcc/ * config.host (*vxworks*): Remove special case for arm on the use of vxcrtstuff.
2021-12-13Tigthen libc_internal and crtstuff for VxWorks shared objectsFrederic Konrad2-5/+81
This change tightens and documents the use of libc_internal, then strengthens the VxWorks crtstuff objects for the support of shared libraries. In particular: - Define __dso_handle, which libstdc++.so requires, - Provide _init and _fini functions to run through the init/fini arrays for shared libs in configurations which HAVE_INITFINI_ARRAY_SUPPORT. The init/fini functions are provided by libc_internal.a for static links but with slightly different names and we don't want to risk dragging other libc_internal contents in the closure accidentally so make sure we don't link with it. As for the !vxworks crtstuff, the new shared libs specific bits are conditioned by a CRTSTUFFS_O macro, for which we provide new Makefile fragment. The bits to actually use the fragment and the shared objects will be added by a forthcoming change, as part of a more general configury update for shared libs. The change also adds guards the eh table registration code in vxcrtstuff so the objects can be used for either init/fini or eh tables independently. 2021-12-07 Fred Konrad <konrad@adacore.com> Olivier Hainque <hainque@adacore.com> gcc/ * config/vxworks.h (VXWORKS_BASE_LIBS_RTP): Guard -lc_internal on !shared+!non-static and document. (VXWORKS_LIB_SPEC): Remove the bits intended to drag the init/fini functions from libc_internal in the shared lib case. (VX_CRTBEGIN_SPEC/VX_CRTEND_SPEC): Use vxcrtstuff objects also in configurations with shared lib and INITFINI_ARRAY support. libgcc/ * config/t-vxcrtstuffS: New Makefile fragment. * config/vxcrtstuff.c: Provide __dso_handle. Provide _init/_fini functions for INITFINI_ARRAY support in shared libs and guard the definition of eh table registration functions on conditions indicating they are needed.
2021-12-13Preserve cpu specific CRTSTUFF_T_CFLAGS on powerpc-vxworks7Olivier Hainque2-2/+5
The unconditional assignment performed in t-vxworks to handle include flags currently overrides what specific cpu ports had for the regular (!vxworks) crtstuff objects. This was not done on purpose and the proposed change adjusts the configuration bits to apply the vxworks specific flags on top of the cpu ones instead. 2021-12-07 Olivier Hainque <hainque@adacore.com> * config.host (powerpc*-wrs-vxworks7*): Place t-crtstuff ahead of the other files in tmake_files. * config/t-vxworks: Add to CRTSTUFF_T_CFLAGS instead of overriding it.
2021-12-13Leverage sysroot for VxWorksOlivier Hainque3-29/+3
The build of a VxWorks toolchain relies a lot on system headers and VxWorks has a few very specific features that require special processing. For example, different sets of headers for the kernel vs the rtp modes, which the compiler knows about by way of -mrtp on the command line. If we manage to avoid the need for fixincludes on recent versions of VxWorks (>= 7), we still need to handle at least VxWorks 6.9 at this stage. We sort of get away with locating the correct headers at run-time thanks to environment variables and various tests for -mrtp in cpp specs, but getting fixincludes to work for old configurations has always been tricky and getting a toolchain to build with c++/libstdc++ support gets trickier with every move to a more recent release. sysroot_headers_suffix_spec is a pretty powerful device to help address such issues, and this patch introduces changes that let us get advantage of it. The general idea is to leverage the assumption that compilations occur with --sysroot=$VSB_DIR on vx7 or --sysroot=$WIND_BASE/target prior to that. For the toolchains we build, this is achieved with a few configure options like: --with-sysroot --with-build-sysroot=${WIND_BASE}/target --with-specs=%{!sysroot=*:--sysroot=%:getenv(WIND_BASE /target)} This also allows simplifying the libgcc compilation flags control and we take the opportunity to merge t-vxworks7 into t-vxworks as the two files were differing only on the libgcc2 flags part. 2021-12-09 Olivier Hainque <hainque@adacore.com> gcc/ * config/t-vxworks: Clear NATIVE_SYSTEM_HEADER_DIR. * config/vxworks.h (SYSROOT_HEADERS_SUFFIX_SPEC): Define, for VxWorks 7 and earlier. (VXWORKS_ADDITIONAL_CPP_SPEC): Simplify accordingly. (STARTFILE_PREFIX_SPEC): Adjust accordingly. * config/rs6000/vxworks.h (STARTFILE_PREFIX_SPEC): Adjust. libgcc/ * config/t-vxworks (LIBGCC2_INCLUDES): Simplify and handle both VxWorks7 and earlier. * config/t-vxworks7: Remove. * config.host: Remove special case for vxworks7.
2021-12-12Daily bump.GCC Administrator1-0/+10
2021-12-11libgcc: vxcrtstuff.c: make ctor/dtor functions staticRasmus Villemoes1-3/+7
When the translation unit itself creates pointers to the ctors/dtors in a specific section handled by the linker (whether .init_array or .ctors.*), there's no reason for the functions to have external linkage. That ends up polluting the symbol table in the running kernel. This makes vxcrtstuff.c on par with the generic crtstuff.c which also defines e.g. frame_dummy and __do_global_dtors_aux static. libgcc/ * config/vxcrtstuff.c: Make constructor and destructor functions static when possible.
2021-12-11libgcc: vxcrtstuff.c: remove ctor/dtor declarationsRasmus Villemoes1-3/+0
These declarations prevent the priority given in the constructor/destructor attributes from taking effect, thus emitting the function pointers in the ordinary (lowest-priority) .init_array/.fini_array sections. libgcc/ * config/vxcrtstuff.c: Remove constructor/destructor declarations.
2021-12-11Daily bump.GCC Administrator1-0/+11
2021-12-10libgcc, Darwin: Update darwin10 unwinder shim dependencies.Iain Sandoe1-1/+1
We include libgcc_tm.h to provide a prototype for this shim so add that to the make dependencies. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libgcc/ChangeLog: * config/t-darwin: Add libgcc_tm.h to the dependencies for darwin10-unwind-find-enc-func.
2021-12-10Replace t-ppccomm by t-vxworks in libgcc/config/rs6000Rasmus Villemoes2-2/+3
This removes ibm-ldouble.c and a few eabi crt files from the build closure, which were producing objects we don't use anyway. 2021-12-07 Rasmus Villemoes <rv@rasmusvillemoes.dk> libgcc/ * config/rs6000/t-vxworks: New file. * config.host (powerpc*-*-vxworks*): Use it instead of t-ppccomm.
2021-12-10Daily bump.GCC Administrator1-0/+12
2021-12-09Fix path to t-ppc64-fp for ppc*-vxworks7* libgcc tmake_fileFrederic Konrad1-1/+1
This fixes a basic mistake in the relative path used to reference a rs6000 specific Makefile fragment in the libgcc configuration bits for powerpc*-vxworks7. 2021-01-14 Fred Konrad <konrad@adacore.com> libgcc/ * config.host (powerpc*-wrs-vxworks7*): Fix path to rs6000/t-ppc64-fp, relative to config/ not libgcc/.
2021-12-09Provide vxworks alternate stdint.h during the buildOlivier Hainque2-0/+4
This change arranges to provide the vxworks alternate stdint.h at build time instead of at install time, so it is used instead of the system one while building the libraries. This is a lot more consistent and helps the build on configurations where the system does not come with stdint.h at all. The change uses a similar mechanism as the one previsouly introduced for glimits.h and takes the opportunity to simplify the glimits.h command to use an automatic variable. This introduces an indirect dependency on the VxWorks version.h for vxcrtstuff objects, for which we then need to apply the same tricks as for libgcc2 regarding include paths (to select the system header instead of the gcc one). 2021-02-12 Olivier Hainque <hainque@adacore.com> Rasmus Villemoes <rv@rasmusvillemoes.dk> gcc/ * Makefile.in (T_STDINT_GCC_H): New variable, path to stdint-gcc.h that a target configuration may override when use_gcc_stdint is "provide". (stmp-int-hdrs): Depend on it and copy that for USE_GCC_INT=provide. * config.gcc (vxworks): Revert to use_gcc_stdint=provide. * config/t-vxworks (T_STDINT_GCC_H): Define, as vxw-stdint-gcc.h. (vxw-stdint-gcc.h): New target, produced from the original stdint-gcc.h. (vxw-glimits.h): Use an automatic variable to designate the first and only prerequisite. * config/vxworks/stdint.h: Remove. libgcc/ * config/t-vxworks: Set CRTSTUFF_T_CFLAGS to $(LIBGCC2_INCLUDES). * config/t-vxworks7: Likewise.
2021-12-09Daily bump.GCC Administrator1-0/+15
2021-12-08libgcc, Darwin: Build a libgcc_s.1 for backwards compatibility.Iain Sandoe9-25/+186
In order to reslve a long-standing issue with inter-operation with libSystem, we have bumped the SO name for libgcc_s. Distributions might wish to install this new version into a structure where exisiting code is already linked with the compiler-local libgcc_s.1 (providing symbols exported by the now-retired libgcc_ext.10.x shims). The replacement libgcc_s.1 forwards the symbols from the new SO. In order to support DYLD_LIBRARY_PATH on systems (where it works) we forward the libSystem unwinder symbols from 10.7+ and a compiler-local version of the libgcc unwinder on earlier. For macOS 10.4 to 10.6 this is 'bug-compatible' with existing uses. For 10.7+ the behaviour will now actually be correct. This should be squashed with the initial libgcc changes for PR80556 in any backport (r12-5418-gd4943ce939d) libgcc/ChangeLog: * config.host (*-*-darwin*): Add logic to build a shared unwinder library for Darwin8-10. * config/i386/t-darwin: Build legacy libgcc_s.1. * config/rs6000/t-darwin: Likewise. * config/t-darwin: Reorganise the EH fragments to place them for inclusion in a shared EH lib. * config/t-slibgcc-darwin: Build a legacy libgcc_s.1 and the supporting pieces (all FAT libs). * config/t-darwin-noeh: Removed. * config/darwin-unwind.ver: New file. * config/rs6000/t-darwin-ehs: New file. * config/t-darwin-ehs: New file.
2021-12-07Daily bump.GCC Administrator1-0/+7
2021-12-06RISC-V: jal cannot refer to a default visibility symbol for shared object.Nelson Chu2-7/+14
This is the original binutils bugzilla report, https://sourceware.org/bugzilla/show_bug.cgi?id=28509 And this is the first version of the proposed binutils patch, https://sourceware.org/pipermail/binutils/2021-November/118398.html After applying the binutils patch, I get the the unexpected error when building libgcc, /scratch/nelsonc/riscv-gnu-toolchain/riscv-gcc/libgcc/config/riscv/div.S:42: /scratch/nelsonc/build-upstream/rv64gc-linux/build-install/riscv64-unknown-linux-gnu/bin/ld: relocation R_RISCV_JAL against `__udivdi3' which may bind externally can not be used when making a shared object; recompile with -fPIC Therefore, this patch add an extra hidden alias symbol for __udivdi3, and then use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead. The solution is similar to glibc as follows, https://sourceware.org/git/?p=glibc.git;a=commit;h=68389203832ab39dd0dbaabbc4059e7fff51c29b libgcc/ChangeLog: * config/riscv/div.S: Add the hidden alias symbol for __udivdi3, and then use HIDDEN_JUMPTARGET to target it since it is non-preemptible. * config/riscv/riscv-asm.h: Added new macros HIDDEN_JUMPTARGET and HIDDEN_DEF.
2021-12-01Daily bump.GCC Administrator1-0/+5
2021-11-30libgcc: vxcrtstuff.c: add a few undefsRasmus Villemoes1-0/+8
When vxcrtstuff.c was created, the set of #includes was copied from crtstuff.c. But crtstuff.c also has a bunch of #undefs after the first #include, because, as the comment says, including auto-host.h when building objects that are meant for target is technically not correct. This manifests when I try do do a canadian cross, with build=linux, host=windows and target=vxworks, in that we pick up a #define caddr_t char * from auto-host.h, which then of course creates a problem when we later include a target header that has typedef char * caddr_t; I assume that the #undefs in crtstuff.c have been added for similar reasons. These potentially problematic #defines all seem to be guarded by #ifndef USED_FOR_TARGET, which tconfig.h defines before including auto-host.h. So at first, it seems that one could avoid the problem by simply removing the initial include of auto-host.h. Unfortunately, we do need some of the things defined in auto-host.h within such an ifndef USED_FOR_TARGET, namely the define of HAVE_INITFINI_ARRAY_SUPPORT, which is what later causes initfini-array.h to define USE_INITFINI_ARRAY. So as the next best fix, just copy the #undefs from crtstuff.c. libgcc/ * config/vxcrtstuff.c: Undefine caddr_t, pid_t, rlim_t, ssize_t and vfork after including auto-host.h.
2021-11-30Daily bump.GCC Administrator1-0/+5
2021-11-29libgcc: remove crt{begin,end}.o from powerpc-wrs-vxworks targetRasmus Villemoes1-1/+0
Since commit 78e49fb1bc (Introduce vxworks specific crtstuff support), the generic crtbegin.o/crtend.o have been unnecessary to build. So remove them from extra_parts. This is effectively a revert of commit 9a5b8df70 (libgcc: add crt{begin,end} for powerpc-wrs-vxworks target). libgcc/ * config.host (powerpc-wrs-vxworks): Do not add crtbegin.o and crtend.o to extra_parts.
2021-11-28Daily bump.GCC Administrator1-0/+4
2021-11-27Fix typo in t-dimodeJohn David Anglin1-1/+1
2021-11-27 John David Anglin <danglin@gcc.gnu.org> libgcc/ChangeLog: * config/pa/t-dimode (lib2difuncs): Fix typo.
2021-11-26Daily bump.GCC Administrator1-0/+9
2021-11-25libgcc: Split FDE search code from PT_GNU_EH_FRAME lookupFlorian Weimer1-42/+50
This allows switching to a different implementation for PT_GNU_EH_FRAME lookup in a subsequent commit. This moves some of the PT_GNU_EH_FRAME parsing out of the glibc loader lock that is implied by dl_iterate_phdr. However, the FDE is already parsed outside the lock before this change, so this does not introduce additional crashes in case of a concurrent dlclose. libgcc/ChangeLog: * unwind-dw2-fde-dip.c (struct unw_eh_callback_data): Add hdr. Remove func, ret. (find_fde_tail): New function. Split from _Unwind_IteratePhdrCallback. Move the result initialization from _Unwind_Find_FDE. (_Unwind_Find_FDE): Updated to call find_fde_tail.
2021-11-23Daily bump.GCC Administrator1-0/+17
2021-11-22libgcc: Remove dbase member from struct unw_eh_callback_data if NULLFlorian Weimer1-7/+39
Only bfin, frv, i386 and nios2 need this member at present. libgcc/ChangeLog * unwind-dw2-fde-dip.c (NEED_DBASE_MEMBER): Define. (struct unw_eh_callback_data): Make dbase member conditional. (unw_eh_callback_data_dbase): New function. (base_from_cb_data): Simplify for the non-dbase case. (_Unwind_IteratePhdrCallback): Adjust. (_Unwind_Find_FDE): Likewise.
2021-11-22libgcc: Remove tbase member from struct unw_eh_callback_dataFlorian Weimer1-5/+3
It is always a null pointer. libgcc/ChangeLog * unwind-dw2-fde-dip.c (struct unw_eh_callback_data): Remove tbase member. (base_from_cb_data): Adjust. (_Unwind_IteratePhdrCallback): Likewise. (_Unwind_Find_FDE): Likewise.
2021-11-20Daily bump.GCC Administrator1-0/+21