2154 Commits

Author SHA1 Message Date
GCC Administrator
4a641781ce Daily bump. 2026-05-05 00:16:31 +00:00
Iain Buclaw
94ec11b5e5 m32c: Remove all support for M32C target.
m32c target support in GCC was deprecated in GCC 16 as the target had no
maintainer since GCC 9.

contrib/ChangeLog:

	* compare-all-tests: Remove references to m32c.
	* config-list.mk: Likewise.

gcc/ChangeLog:

	* config/m32c/*: Delete entire directory.
	* attr-urls.def: Remove references to m32c.
	* config.gcc: Likewise.
	* config/msp430/msp430.cc (msp430_expand_epilogue): Likewise.
	* configure: Regenerate.
	* configure.ac: Remove references to m32c.
	* doc/extend.texi: Likewise.
	* doc/install.texi: Likewise.
	* doc/invoke.texi: Likewise.
	* doc/md.texi: Likewise.
	* explow.cc (promote_mode): Likewise.
	* regenerate-opt-urls.py: Likewise.
	* config/microblaze/microblaze.opt.urls: Regenerate.
	* config/msp430/msp430.opt.urls: Regenerate.
	* config/nds32/nds32.opt.urls: Regenerate.
	* config/rl78/rl78.opt.urls: Regenerate.
	* config/rs6000/sysv4.opt.urls: Regenerate.
	* config/rx/elf.opt.urls: Regenerate.
	* config/stormy16/stormy16.opt.urls: Regenerate.
	* config/visium/visium.opt.urls: Regenerate.

libgcc/ChangeLog:

	* config/m32c/*: Delete entire directory.
	* config.host: Remove references to m32c.
	* config/rl78/lib2div.c (C3): Likewise.

gcc/testsuite/ChangeLog:

	* gcc.c-torture/compile/20000804-1.c: Remove references to m32c.
	* gcc.c-torture/compile/20001226-1.c: Likewise.
	* gcc.c-torture/compile/limits-stringlit.c: Likewise.
	* gcc.c-torture/execute/20020404-1.c: Likewise.
	* gcc.dg/20020312-2.c: Likewise.
	* gcc.dg/max-1.c: Likewise.
	* gcc.dg/torture/pr26565.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-32.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-33.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-34.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-35.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-36.c: Likewise.
	* gcc.dg/utf-array-short-wchar.c: Likewise.
	* gcc.dg/utf-array.c: Likewise.
	* lib/target-supports.exp: Likewise.
2026-05-04 23:01:33 +02:00
GCC Administrator
f28e24d91b Daily bump. 2026-04-24 00:16:27 +00:00
Eric Botcazou
0636b7763d libgcc: Honor LDFLAGS_FOR_TARGET for shared libgcc on Windows
Unlike for other targets, LDFLAGS_FOR_TARGET is not honored on Windows when
the shared libgcc is built.

libgcc/
	* config/i386/t-slibgcc-cygming (SHLIB_LINK): Add $(LDFLAGS).
2026-04-23 09:29:46 +02:00
GCC Administrator
439467e1b3 Daily bump. 2026-04-18 00:16:31 +00:00
Andre Vieira
5919b5e6c0 arm, bitint: Add support for FP_HANDLE_EXCEPTIONS and FP_ROUNDMODE with hard float abi
This patch adds support for FP_HANDLE_EXCEPTIONS when using hard float abi.
This is used by _BitInt software emulation for floating point conversions to
throw an exception.

This patch also adds support for FP_ROUNDMODE with hard float abi, which is
also used by _BitInt floating point emulation.

libgcc/ChangeLog:

	* config/arm/sfp-exceptions.c: New file.
	* config/arm/sfp-machine.h: Define FP_HANDLE_EXCEPTIONS, FP_EX_*
	MACROs, _FP_DECL_EX, FP_ROUNDMODE, FP_INIT_ROUNDMODE, FP_RND_* MACROs
	and declare __sfp_handle_exceptions.
	* config/arm/t-softfp: Add sfp-exceptions.c to LIB2ADD.
2026-04-17 11:13:07 +01:00
GCC Administrator
b1fb215760 Daily bump. 2026-04-15 08:16:45 +00:00
Torbjörn SVENSSON
496cfc4897 gcov: return failure if malloc fails
Don't assume that malloc always returns a non-null pointer.

xmalloc is sometimes an alias for malloc due to this in libgcc/libgcov.h:

  /* work around the poisoned malloc/calloc in system.h.  */
  #ifndef xmalloc
  #define xmalloc malloc
  #endif

libgcc/ChangeLog:

	* libgcov-driver-system.c (gcov_exit_open_gcda_file): Handle
	potential NULL value from malloc.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2026-04-15 06:45:35 +02:00
GCC Administrator
bb91d2138e Daily bump. 2026-03-31 00:16:25 +00:00
Saurabh Jha
b95bfa1ff2 aarch64: mingw: Disable _Float128 emulation
The Windows ABI doesn't support _Float128:
https://learn.microsoft.com/en-us/cpp/build/ieee-floating-point-representation.

While it can be emulated for this target, the current implementation
prevents fortran from being built with this emulation.

This patch disables _Float128 emulation for aarch64-w64-mingw32 target.
This enables fortran to be built with no additional changes.

gcc/ChangeLog:

	* config/aarch64/aarch64.cc
	(aarch64_scalar_mode_supported_p): Only return true on TFmode if
	TARGET_LONG_DOUBLE_128 is set.

libgcc/ChangeLog:
	* config.host: Disable soft floating point.

Co-Authored-By: Evgeny Karpov <evgeny.karpov@arm.com>
2026-03-30 11:43:22 +00:00
GCC Administrator
449f6b1c76 Daily bump. 2026-03-29 00:16:23 +00:00
Alexandre Oliva
229c58121d libgcc: vxworks: work around warnings promoted to errors on aarch64
In RTP mode, defining TLS_DELETE_HOOK_ARG as NULL AKA 0 elicits a
warning, that casting it to TASK_ID avoids.

objLibP.h defines an inline function that, depending on the
configuration, will have unused parameters.  Allow warnings about
them.

vxTas calls are supposed to take __vx_tas_t, but upon passing it that
on aarch64, we get warnings about discarding volatile qualifiers, that
not even explicit type casts avoid.  So, allow the warnings.


for  libgcc/ChangeLog

	* config/gthr-vxworks-tls.c (TLS_DELETE_HOOK_ARG): Type-cast
	NULL constant to avoid warning.
	* config/t-vxworks (LIBGCC2_CFLAGS): Tolerate unused-parameter
	and discarded-qualifiers errors.
2026-03-27 23:56:40 -03:00
GCC Administrator
c6897e4c0a Daily bump. 2026-03-26 00:16:25 +00:00
Alexandre Oliva
aadc863a1f vxworks: fix gthr visibility issues
xtreme-header-8.C fails on VxWorks because various TU-local gthr
functions defined as static inline are referenced from libstdc++
symbols with global visibility.

C++ modules require those functions to be non-static inline, and other
gthr implementations adopt always_inline in C++.

Follow this practice in gthr-vxworks.h as well.


for  libgcc/ChangeLog

	* config/gthr-vxworks.h (__GTHREAD_ALWAYS_INLINE,
	__GTHREAD_INLINE): Copy from gthr-posix.h.  Replace static
	inline with __GTHREAD_INLINE.
2026-03-25 06:45:47 -03:00
Jakub Jelinek
e797ddb062 Update copyright years. 2026-03-14 19:31:10 +01:00
GCC Administrator
5a041f0c8a Daily bump. 2026-03-14 00:16:29 +00:00
Andre Vieira
e256eb478a arm: Add support for _BitInt(N)
This patch adds support for C23's _BitInt feature to the arm port.

gcc/ChangeLog:

	* config/arm/arm.cc (TARGET_C_BITINT_TYPE_INFO): New Macro.
	(arm_return_in_memory): Return true for any _BitInt(N) where N > 64.
	(arm_needs_doubleword_align): Return true for any _BitInt(N) where N > 32.
	(arm_bitint_type_info): New.
	* config/arm/arm-protos.h (arm_bitint_type_info): New declaration.

libgcc/ChangeLog:

	* config/arm/libgcc-bpabi.ver: Add new symbols.
	* config/arm/t-softfp: Enable use of floatbitinthf and pass necessary options to build fp16.
2026-03-13 19:19:10 +00:00
GCC Administrator
381af4e29b Daily bump. 2026-03-07 00:16:29 +00:00
Saurabh Jha
bef3d98610 aarch64: mingw: Fix regression in C++ support
Fixes regression in C++ support without exception handling by:
1. Moving Makefile fragment config/i386/t-seh-eh to
   config/mingw/t-seh-eh that handles C++ exception handling. This is
   sufficient to fix the regression even if the exception handling
   itself is not implemented yet.
2. Changing existing references of t-seh-eh in libgcc/config.host and
   add it for aarch64-*-mingw*.

With these changes, the compiler can now be built with C and C++.

This doesn't add support for Structured Exception Handling (SEH)
which will be done separately.

libgcc/ChangeLog:

	* config.host: Set tmake_eh_file for aarch64-*-mingw* and update
	it for x86_64-*-mingw* and x86_64-*-cygwin*.
	* config/i386/t-seh-eh: Move to...
	* config/mingw/t-seh-eh: ...here.
	* config/aarch64/t-no-eh: Removed.

gcc/testsuite/ChangeLog:

	* gcc.target/aarch64/mingw/mingw.exp: Add support for C++ files.
	* gcc.target/aarch64/mingw/minimal_new_del.C: New test.

Co-Authored-By: Evgeny Karpov <evgeny.karpov@arm.com>
2026-03-06 17:42:33 +00:00
GCC Administrator
e0d9c5a23f Daily bump. 2026-03-06 00:16:27 +00:00
Alice Carlotti
e3d2277d51 aarch64 libgcc: Fix mingw build [PR124333]
Make __aarch64_cpu_features unconditionally available.  This permits the
unconditional use of this global inside __arm_get_current_vg, which was
introduced in r16-7637-g41b4a73f370116.

For now this global is only initialised when <sys/auxv.h> is available,
but we can extend this in future to support other ways of initialising
the bits used for SME support, and use this remove __aarch64_have_sme.
This approach was recently adopted by LLVM.

This patch does introduce an inconsistency with __aarch64_have_sme when
<sys/auxv.h> is unavailable.  However, this doesn't introduce any
regressions, because one of the following conditions will hold:

1. SVE is enabled at compile time whenever we use a streaming or
streaming compatible function.  In this case the compiler won't need to
use __arm_get_current_vg, so it doesn't matter if it gives the wrong
answer.

2. There is a use of a streaming or streaming compatible function when
we don't know whether SVE is enabled.  In order to get correct DWARF
unwind information, we then have to be able to test for SVE availability
at runtime.  This isn't possible until a working __arm_get_current_vg
implementation is available, so the configuration has never (yet) been
supported.

libgcc/ChangeLog:

	PR target/124333
	* config/aarch64/cpuinfo.c: Define __aarch64_cpu_features
	unconditionally.
2026-03-05 15:12:56 +00:00
GCC Administrator
9fd690d543 Daily bump. 2026-02-24 00:16:30 +00:00
Alice Carlotti
41b4a73f37 libgcc: aarch64: Add __arm_get_current_vg
AAPCS64* specifies several runtime support routines that must be
supported by any platform that supports SME.  Add __arm_get_current_vg
to libgcc to help meet this requirement.  This will be used to enable
support for SME without (non-streaming) SVE.

*https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst

libgcc/ChangeLog:

	* config/aarch64/libgcc-sme.ver: Add __arm_get_current_vg.
	* config/aarch64/t-aarch64: Add new source file.
	* config/aarch64/__arm_get_current_vg.S: New file.
2026-02-23 11:16:42 +00:00
GCC Administrator
7dda46111e Daily bump. 2026-02-07 00:16:36 +00:00
Torbjörn SVENSSON
bcb3b1eef1 libgcc: replace CONST_CAST2 macro
libgcc/ChangeLog:

	* config/i386/gthr-win32.h: Replace CONST_CAST2 with expanded
	expression where used.
	* config/pa/gthr-dce.h: Likewise.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2026-02-06 09:02:04 +01:00
GCC Administrator
5bfcdd5c59 Daily bump. 2026-01-25 00:16:27 +00:00
Xin Wang
022cfc9137 libgcc: Use UTItype with mode(TI) for 16-byte atomics
The use of UOItype with mode(OI) for 16-byte atomic operations is
non-standard. The OI mode is not defined in machmode.def and exists
only as an ad-hoc construct in libgcc/sync.c.

This patch replaces it with UTItype using mode(TI), which is the
standard GCC machine mode for 16-byte integers (Tetra Integer).
The size argument is also corrected from 8 to 16 to match the actual
operand width.

libgcc/ChangeLog:
	* sync.c: Replace UOItype with UTItype and use mode(TI) pass 16, not
	8, to DEFINE macro.

Signed-off-by: Xin Wang <wangxinw@hygon.cn>
2026-01-24 23:54:46 +00:00
GCC Administrator
460edeb8be Daily bump. 2026-01-14 00:16:30 +00:00
Jakub Jelinek
8a99fdb704 Use -latomic_asneeded or -lgcc_s_asneeded to workaround libtool issues [PR123396]
On Mon, Jan 12, 2026 at 12:13:35PM +0100, Florian Weimer wrote:
> One way to work around the libtool problem would be to stick the
> as-needed into an existing .so linker script, or create a new one under
> a different name (say libatomic_optional.so) that has AS_NEEDED in it,
> and link with -latomic_optional.  Then libtool would not have to be
> taught about --push-state/--pop-state etc.

That seems to work.

So far bootstrapped (c,c++,fortran,lto only) and make install tested
on x86_64-linux, tested on a small program without need to libatomic and
struct S { char a[25]; };
_Atomic struct S s;

int main () { struct S t = s; s = t; }
which does at -O0.
Before this patch I got
for i in `find x86_64-pc-linux-gnu/ -name lib\*.so.\*.\*`; do ldd -u $i 2>&1 | grep -q libatomic.so.1 && echo $i; done
x86_64-pc-linux-gnu/libsanitizer/ubsan/.libs/libubsan.so.1.0.0
x86_64-pc-linux-gnu/libsanitizer/asan/.libs/libasan.so.8.0.0
x86_64-pc-linux-gnu/libsanitizer/hwasan/.libs/libhwasan.so.0.0.0
x86_64-pc-linux-gnu/libsanitizer/lsan/.libs/liblsan.so.0.0.0
x86_64-pc-linux-gnu/libsanitizer/tsan/.libs/libtsan.so.2.0.0
x86_64-pc-linux-gnu/32/libsanitizer/ubsan/.libs/libubsan.so.1.0.0
x86_64-pc-linux-gnu/32/libsanitizer/asan/.libs/libasan.so.8.0.0
x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs/libstdc++.so.6.0.35
x86_64-pc-linux-gnu/libgcobol/.libs/libgcobol.so.2.0.0
x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.35
With this patch it prints nothing.

2026-01-13  Jakub Jelinek  <jakub@redhat.com>

	PR libstdc++/123396
gcc/
	* configure.ac (gcc_cv_ld_use_as_needed_ldscript): New test.
	(USE_LD_AS_NEEDED_LDSCRIPT): New AC_DEFINE.
	* gcc.cc (LINK_LIBATOMIC_SPEC): Use "-latomic_asneeded" instead
	of LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION
	if USE_LD_AS_NEEDED_LDSCRIPT is defined.
	(init_gcc_specs): Use "-lgcc_s_asneeded" instead of
	LD_AS_NEEDED_OPTION " -lgcc_s " LD_NO_AS_NEEDED_OPTION
	if USE_LD_AS_NEEDED_LDSCRIPT is defined.
	* config.in: Regenerate.
	* configure: Regenerate.
libatomic/
	* acinclude.m4 (LIBAT_BUILD_ASNEEDED_SOLINK): New AM_CONDITIONAL.
	* libatomic_asneeded.so: New file.
	* libatomic_asneeded.a: New file.
	* Makefile.am (toolexeclib_DATA): Set if LIBAT_BUILD_ASNEEDED_SOLINK.
	(all-local): Install those files into gcc subdir.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
libgcc/
	* config/t-slibgcc (SHLIB_ASNEEDED_SOLINK,
	SHLIB_MAKE_ASNEEDED_SOLINK, SHLIB_INSTALL_ASNEEDED_SOLINK): New
	vars.
	(SHLIB_LINK): Include $(SHLIB_MAKE_ASNEEDED_SOLINK).
	(SHLIB_INSTALL): Include $(SHLIB_INSTALL_ASNEEDED_SOLINK).
2026-01-13 10:06:47 +01:00
Kito Cheng
808b684172 RISC-V: Add support for _BitInt [PR117581]
This patch implements _BitInt support for RISC-V target by defining the
type layout and ABI requirements.  The limb mode selection is based on
the bit width, using appropriate integer modes from QImode to TImode.
The implementation also adds the necessary libgcc version symbols for
_BitInt runtime support functions.

Changes in v3:
- Require sync_char_short effective target for bitint-64.c, bitint-82.c
  and bitint-84.c tests since they use atomic operations.
- Add -fno-section-anchors to bitint-32-on-rv64.c and adjust expected
  assembly output patterns.

Changes in v2:
- limb_mode use up to XLEN when N > XLEN, which is different setting from
  the abi_limb_mode.
- Adding missing floatbitinthf in libgcc.

gcc/ChangeLog:

	PR target/117581
	* config/riscv/riscv.cc (riscv_bitint_type_info): New function.
	(TARGET_C_BITINT_TYPE_INFO): Define.

gcc/testsuite/ChangeLog:

	PR target/117581
	* gcc.dg/torture/bitint-64.c: Add sync_char_short effective target
	requirement.
	* gcc.dg/torture/bitint-82.c: Likewise.
	* gcc.dg/torture/bitint-84.c: Likewise.
	* gcc.target/riscv/bitint-32-on-rv64.c: New test.
	* gcc.target/riscv/bitint-alignments.c: New test.
	* gcc.target/riscv/bitint-args.c: New test.
	* gcc.target/riscv/bitint-sizes.c: New test.

libgcc/ChangeLog:

	PR target/117581
	* config/riscv/libgcc-riscv.ver: New file.
	* config/riscv/t-elf (SHLIB_MAPFILES): Add libgcc-riscv.ver.
	* config/riscv/t-softfp32 (softfp_extras): Add floatbitinttf and
	fixtfbitint.
2026-01-13 11:23:40 +08:00
GCC Administrator
5ac3a14842 Daily bump. 2026-01-12 00:16:27 +00:00
Jerome Guitton
2b9bbe4301 remove inclusion of tickLib.h from gthr-vxworks.h
This header is not used any more and its inclusion is problematic
when building against Helix Cert as it might end up dragging LLVM-specific
headers from spinLockLib.h.

libgcc/
	* config/gthr-vxworks.h: Remove #include of tickLib.h.
2026-01-11 11:41:38 +00:00
GCC Administrator
4b2cbb6fcc Daily bump. 2026-01-11 00:16:24 +00:00
Stefan Schulze Frielinghaus
5d6d56d837 s390: Add HF mode support
This patch adds support for _Float16.  As time of writing this, there is
no hardware _Float16 support on s390.  Therefore, _Float16 operations
have to be extended and truncated which is supported via soft-fp.

The ABI demands that _Float16 values are left aligned in FP registers
similar as it is already the case for 32-bit FP values.  If vector
extensions are available, copying between left-aligned FPRs and
right-aligned GPRs is natively supported.  Without vector extensions,
the alignment has to be taken care of manually.  For target z10,
instructions lgdr/ldgr can be used in conjunction with shifts.  Copying
via lgdr from an FPR into a GPR is the easy case since for the shift the
target GPR can be utilized.  However, copying via ldgr from a GPR into a
FPR requires a secondary reload register which is used for the shift
result and is then copied into the FPR.  Prior z10, there is no hardware
support in order to copy directly between FPRs and GPRs.  Therefore, in
order to copy from a GPR into an FPR we would require a secondary reload
register for the shift and secondary memory for copying the aligned
value.  Since this is not supported, _Float16 support starts with z10.
As a consequence, for all targets older than z10 test
libstdc++-abi/abi_check fails.

gcc/ChangeLog:

	* config/s390/s390-modes.def (FLOAT_MODE): Add HF mode.
	(VECTOR_MODE): Add V{1,2,4,8,16}HF modes.
	* config/s390/s390.cc (s390_scalar_mode_supported_p): For 64-bit
	targets z10 and newer support HF mode.
	(s390_vector_mode_supported_p): Add HF mode.
	(s390_register_move_cost): Keep HF mode operands in registers.
	(s390_legitimate_constant_p): Support zero constant.
	(s390_secondary_reload): For GPR to FPR moves a secondary reload
	register is required.
	(s390_secondary_memory_needed): GPR<->FPR moves don't require
	secondary memory.
	(s390_libgcc_floating_mode_supported_p): For 64-bit targets z10
	and newer support HF mode.
	(s390_hard_regno_mode_ok): Allow HF mode for FPRs and VRs.
	(s390_function_arg_float): Consider HF mode, too.
	(s390_excess_precision): For EXCESS_PRECISION_TYPE_FLOAT16
	return FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16.
	(TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define.
	* config/s390/s390.md (movhf): Define.
	(reload_half_gprtofpr_z10): Define.
	(signbithf2): Define.
	* config/s390/vector.md: Add new vector modes to various
	iterators.

libgcc/ChangeLog:

	* config.host: Include s390/t-float16.
	* config/s390/libgcc-glibc.ver: Export symbols
	__trunc{sf,df,tf}hf2, __extendhf{sf,df,tf}2, __fix{,uns}hfti,
	__float{,un}tihf, __floatbitinthf.
	* config/s390/t-softfp: Add to softfp_extras instead of setting
	it.
	* configure: Regenerate.
	* configure.ac: Support float16 only for 64-bit targets z10 and
	newer.
	* config/s390/_dpd_dd_to_hf.c: New file.
	* config/s390/_dpd_hf_to_dd.c: New file.
	* config/s390/_dpd_hf_to_sd.c: New file.
	* config/s390/_dpd_hf_to_td.c: New file.
	* config/s390/_dpd_sd_to_hf.c: New file.
	* config/s390/_dpd_td_to_hf.c: New file.
	* config/s390/t-float16: New file.

libstdc++-v3/ChangeLog:

	* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Add
	names {,P,K}DF16.

gcc/testsuite/ChangeLog:

	* g++.target/s390/float16-1.C: New test.
	* g++.target/s390/float16-2.C: New test.
	* gcc.target/s390/float16-1-2.h: New test.
	* gcc.target/s390/float16-1.c: New test.
	* gcc.target/s390/float16-10.c: New test.
	* gcc.target/s390/float16-2.c: New test.
	* gcc.target/s390/float16-3.c: New test.
	* gcc.target/s390/float16-4.c: New test.
	* gcc.target/s390/float16-5.c: New test.
	* gcc.target/s390/float16-6.c: New test.
	* gcc.target/s390/float16-7.c: New test.
	* gcc.target/s390/float16-8.c: New test.
	* gcc.target/s390/float16-9.c: New test.
	* gcc.target/s390/float16-signbit.h: New test.
	* gcc.target/s390/vector/vec-extract-4.c: New test.
	* gcc.target/s390/vector/vec-float16-1.c: New test.
2026-01-10 17:22:46 +01:00
GCC Administrator
e21d696e78 Daily bump. 2026-01-08 00:16:32 +00:00
Xinhui Yang
bb9cb9c7c0 [PATCH] ia64: properly include libunwind support during configuration
By using the test `with_system_libunwind', libgcc can use either
in-house implementation or reference external libunwind symbols.
However, this breaks the static libgcc.a library, as in t-linux it
references unwind-compat.c, which turns some _Unwind_* symbols into
references of the corresponding symbols in libunwind, but libunwind does
not exist in some conditions (e.g. bootstrapping a toolchain). The
linker complains about `missing version node for symbol', since it can
not find the symbol it is referring to.

The unwind-compat.c module should only exist, if system libunwind is
being used. Also GCC itself should add -lunwind only if this condition
is met, too.

Implementing better control for whether to embed unwind implementation
into libgcc to fix this issue.

gcc/
	* config.gcc: limit -lunwind usage by testing if the system
	libunwind is being used.

libgcc/
	* config.host (ia64): include unwind-compat only if the system
	libunwind is being used.

	* config/ia64/t-linux-libunwind: include libgcc symver definition
	for libgcc symbols, since it bears the same role as t-linux
	(except libunwind); Include fde-glibc.c since the unwind
	implementation requires _Unwind_FindTableEntry in this file.

	* config/ia64/unwind-ia64.c: protect _Unwind_FindTableEntry inside
	inihbit_libc ifndefs to allow it to build with newlib or
	without proper headers.
2026-01-07 08:59:34 -07:00
Vladimir Vishniakov
7d702dc92a [committed] Use compact form to update stack pointer in libgcc
libgcc/
	* config/v850/lib1funcs.S (__return_r26_r31): Use compact
	add form to adjust stack pointer.
	(__save_r27_r31): Likewise.
	(__save_r29_r31): Likewise.
	(__save_r31): Likewise.
	(__return_r27_r31): Likewise.
	(__return_r28_r31): Likewise.
	(__return_r29_r31): Likewise.
	(__return_r31): Likewise.
	(__return_r2_r31): Likewise.
2026-01-07 08:51:24 -07:00
Vladimir Vishniakov
1bfe9149f6 [committed] [PR target/123403] Fix base register and offsets for v850 libgcc
PR target/123403
libgcc/
	* config/v850/lib1funcs.S (__return_r25_r29): Fix ! __EP__ clause to
	use SP, not EP.
	(__return_r2_r31): Fix offsets to match store offsets.
2026-01-07 08:37:30 -07:00
Jakub Jelinek
254a858ae7 Update copyright years. 2026-01-02 09:56:11 +01:00
Jakub Jelinek
c715060dd6 Update Copyright year in ChangeLog files
2025 -> 2026
2026-01-01 18:58:28 +01:00
GCC Administrator
2f8283f79b Daily bump. 2025-12-16 00:16:36 +00:00
Peter Damianov
34762fba4c [PATCH] Remove score files in libgcc
This target was deleted in r5-3909-g3daa7bbf791203,
but a few files in libgcc were missed. Delete them.

libgcc/ChangeLog:

	* config/score/crti.S: Delete.
	* config/score/crtn.S: Delete.
	* config/score/sfp-machine.h: Delete.

Signed-off-by: Peter Damianov <peter0x44@disroot.org>
2025-12-14 20:08:06 -07:00
GCC Administrator
bcbb536551 Daily bump. 2025-12-13 00:16:34 +00:00
mengqinggang
a79d9b6dbf LoongArch: Add support for libgcc on LA32
LA32 does not support extreme code mode, change to medium code model on LA32.

libgcc/ChangeLog:

	* configure: Regenerate.
	* configure.ac:
	* config/loongarch/t-crtstuff-la32: New file.
	* config/loongarch/t-crtstuff: Rename to t-crtstuff-la64.

Reviewed-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Lulu Cheng <chenglulu@loongson.cn>
2025-12-12 15:56:47 +08:00
GCC Administrator
3b3e153da5 Daily bump. 2025-12-10 00:16:32 +00:00
John Ericson
9947930b7a libgcc: Dont use TARGET_SYSTEM_ROOT from gcc
Following Andrew Pinski's suggestions in
https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689683.html, just
use the output of:

   $(CC) -print-sysroot

It is just used in one spot, in an AIX code-path. I just made (within
make) a shell variable to use instead.

I don't have AIX on-hand to test this, however.

gcc/ChangeLog:

	* Makefile.in: No longer include TARGET_SYSTEM_ROOT in
	libgcc.mvars.

libgcc/ChangeLog:

	* config/rs6000/t-slibgcc-aix: Instead of using a
	TARGET_SYSTEM_ROOT make variable, just define a shell variable
	as part of the rule and use that.

Suggested-by: Andrew Pinski <quic_apinski@quicinc.com>
Signed-off-by: John Ericson <git@JohnEricson.me>
2025-12-09 22:06:52 +00:00
John Ericson
77144dd3b6 Move NO_PIE_CFLAGS logic from gcc to libgcc
My goal is to be able to build libgcc cleanly in isolation --- today one
needs to figure `make ...` misc things in the gcc subdir.

Following Andrew Pinski's suggestions in
https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689683.html, this
commit moves the NO_PIE_CFLAGS logic.

gcc/ChangeLog:

	* Makefile.in:: Remove NO_PIE_CFLAGS logic, since it is now in
	libgcc.
	* configure: Regenerate.
	* configure.ac: Remove the enable_default_pie substitution, since
	libgcc now has its own logic.

libgcc/ChangeLog:

	* Makefile.in: Define NO_PIE_CFLAGS make variable via autoconf
	substitution.
	* configure: Regenerate.
	* configure.ac: New configure check to define NO_PIE_CFLAGS
	using the algorithm Andrew asked for in the linked mail.

Suggested-by: Andrew Pinski <quic_apinski@quicinc.com>
Signed-off-by: John Ericson <git@JohnEricson.me>
2025-12-09 22:06:51 +00:00
John Ericson
e5d853bbe9 Factor out thread model detection with new GCC_AC_THREAD_MODEL macro
This macro deduplicates the

    $CC -v 2>&1 | sed -n 's/^Thread model: //p'

check that was occurring in various runtime libs.

Additionally, as a bit of an Easter egg, this also allows overriding
what the compiler would return by setting the
`gcc_cv_target_thread_file` cache variable first. I admit that it is in
fact this Easter egg that led me to write the patch. The use-case for it
is for making multilib builds where the library sets do not all share
the same thread model easier. See also `THREAD_MODEL_SPEC` for more
about the varying thread models use-case.

Arguably one could could try to define on `THREAD_MODEL_SPEC` on more
platforms (besides e.g. AIX) but the ramifications of this are a bit
unclear. Setting `gcc_cv_target_thread_file` directly is a "low tech"
solution that will work for now for sure. Of course, since setting a
cache variable like this a hacky trick, I will not expect this to be at
all stable/guaranteed to work, going forward.

Thanks to Arsen who on IRC discussed these things with me, including in
particular making it a cache var not `--with-model` flag, to not
prematurely foster expectations that this is stable.

Suggested-by: Arsen Arsenović <arsen@aarsen.me>

config/ChangeLog:

	* gthr.m4: Create new GCC_AC_THREAD_MODEL macro

libatomic/ChangeLog:

	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* configure.ac: Use GCC_AC_THREAD_MODEL instead of hand-rolled
	* testsuite/Makefile.in: Regenerate.

libgcc/ChangeLog:

	* configure: Regenerate.
	* configure.ac: Use GCC_AC_THREAD_MODEL instead of hand-rolled

libphobos/ChangeLog:

	* configure: Regenerate.
	* m4/druntime/os.m4: Use AC_MSG_ERROR, not private as_fn_error

libstdc++-v3/ChangeLog:

	* acinclude.m4: Use GCC_AC_THREAD_MODEL instead, via AC_REQUIRE
	* configure: Regenerate.
2025-12-09 22:06:48 +00:00
GCC Administrator
c64308e297 Daily bump. 2025-11-28 00:21:32 +00:00
Lulu Cheng
c3858c51a4 LoongArch: fmv: Fix compilation errors when using glibc versions earlier than 2.38.
The macros HWCAP_LOONGARCH_LSX and HWCAP_LOONGARCH_LASX were defined
in glibc 2.38.  However, r16-5155 uses these two macros directly
without checking whether they are defined.  This causes errors when
compiling libgcc with glibc versions earlier than 2.38.

gcc/ChangeLog:

	* doc/extend.texi: Remove the incorrect prompt message.

libgcc/ChangeLog:

	* config/loongarch/cpuinfo.c (HWCAP_LOONGARCH_LSX): Define
	it if it is not defined.
	(HWCAP_LOONGARCH_LASX): Likewise.
2025-11-27 09:49:52 +08:00