gcc/libgcc
Alexandre Oliva f908368d2c strub: enable conditional support
Targets that don't expose callee stacks to callers, such as nvptx, as
well as -fsplit-stack compilations, violate fundamental assumptions of
the current strub implementation.  This patch enables targets to
disable strub, and disables it when -fsplit-stack is enabled.

When strub support is disabled, the testsuite will now skip strub
tests, and libgcc will not build the strub runtime components.


for  gcc/ChangeLog

	* target.def (have_strub_support_for): New hook.
	* doc/tm.texi.in: Document it.
	* doc/tm.texi: Rebuild.
	* ipa-strub.cc: Include target.h.
	(strub_target_support_p): New.
	(can_strub_p): Call it.  Test for no flag_split_stack.
	(pass_ipa_strub::adjust_at_calls_call): Check for target
	support.
	* config/nvptx/nvptx.cc (TARGET_HAVE_STRUB_SUPPORT_FOR):
	Disable.
	* doc/sourcebuild.texi (strub): Document new effective
	target.

for  gcc/testsuite/ChangeLog

	* c-c++-common/strub-split-stack.c: New.
	* c-c++-common/strub-unsupported.c: New.
	* c-c++-common/strub-unsupported-2.c: New.
	* c-c++-common/strub-unsupported-3.c: New.
	* lib/target-supports.exp (check_effective_target_strub): New.
	* c-c++-common/strub-O0.c: Require effective target strub.
	* c-c++-common/strub-O1.c: Likewise.
	* c-c++-common/strub-O2.c: Likewise.
	* c-c++-common/strub-O2fni.c: Likewise.
	* c-c++-common/strub-O3.c: Likewise.
	* c-c++-common/strub-O3fni.c: Likewise.
	* c-c++-common/strub-Og.c: Likewise.
	* c-c++-common/strub-Os.c: Likewise.
	* c-c++-common/strub-all1.c: Likewise.
	* c-c++-common/strub-all2.c: Likewise.
	* c-c++-common/strub-apply1.c: Likewise.
	* c-c++-common/strub-apply2.c: Likewise.
	* c-c++-common/strub-apply3.c: Likewise.
	* c-c++-common/strub-apply4.c: Likewise.
	* c-c++-common/strub-at-calls1.c: Likewise.
	* c-c++-common/strub-at-calls2.c: Likewise.
	* c-c++-common/strub-defer-O1.c: Likewise.
	* c-c++-common/strub-defer-O2.c: Likewise.
	* c-c++-common/strub-defer-O3.c: Likewise.
	* c-c++-common/strub-defer-Os.c: Likewise.
	* c-c++-common/strub-internal1.c: Likewise.
	* c-c++-common/strub-internal2.c: Likewise.
	* c-c++-common/strub-parms1.c: Likewise.
	* c-c++-common/strub-parms2.c: Likewise.
	* c-c++-common/strub-parms3.c: Likewise.
	* c-c++-common/strub-relaxed1.c: Likewise.
	* c-c++-common/strub-relaxed2.c: Likewise.
	* c-c++-common/strub-short-O0-exc.c: Likewise.
	* c-c++-common/strub-short-O0.c: Likewise.
	* c-c++-common/strub-short-O1.c: Likewise.
	* c-c++-common/strub-short-O2.c: Likewise.
	* c-c++-common/strub-short-O3.c: Likewise.
	* c-c++-common/strub-short-Os.c: Likewise.
	* c-c++-common/strub-strict1.c: Likewise.
	* c-c++-common/strub-strict2.c: Likewise.
	* c-c++-common/strub-tail-O1.c: Likewise.
	* c-c++-common/strub-tail-O2.c: Likewise.
	* c-c++-common/strub-var1.c: Likewise.
	* c-c++-common/torture/strub-callable1.c: Likewise.
	* c-c++-common/torture/strub-callable2.c: Likewise.
	* c-c++-common/torture/strub-const1.c: Likewise.
	* c-c++-common/torture/strub-const2.c: Likewise.
	* c-c++-common/torture/strub-const3.c: Likewise.
	* c-c++-common/torture/strub-const4.c: Likewise.
	* c-c++-common/torture/strub-data1.c: Likewise.
	* c-c++-common/torture/strub-data2.c: Likewise.
	* c-c++-common/torture/strub-data3.c: Likewise.
	* c-c++-common/torture/strub-data4.c: Likewise.
	* c-c++-common/torture/strub-data5.c: Likewise.
	* c-c++-common/torture/strub-indcall1.c: Likewise.
	* c-c++-common/torture/strub-indcall2.c: Likewise.
	* c-c++-common/torture/strub-indcall3.c: Likewise.
	* c-c++-common/torture/strub-inlinable1.c: Likewise.
	* c-c++-common/torture/strub-inlinable2.c: Likewise.
	* c-c++-common/torture/strub-ptrfn1.c: Likewise.
	* c-c++-common/torture/strub-ptrfn2.c: Likewise.
	* c-c++-common/torture/strub-ptrfn3.c: Likewise.
	* c-c++-common/torture/strub-ptrfn4.c: Likewise.
	* c-c++-common/torture/strub-pure1.c: Likewise.
	* c-c++-common/torture/strub-pure2.c: Likewise.
	* c-c++-common/torture/strub-pure3.c: Likewise.
	* c-c++-common/torture/strub-pure4.c: Likewise.
	* c-c++-common/torture/strub-run1.c: Likewise.
	* c-c++-common/torture/strub-run2.c: Likewise.
	* c-c++-common/torture/strub-run3.c: Likewise.
	* c-c++-common/torture/strub-run4.c: Likewise.
	* c-c++-common/torture/strub-run4c.c: Likewise.
	* c-c++-common/torture/strub-run4d.c: Likewise.
	* c-c++-common/torture/strub-run4i.c: Likewise.
	* g++.dg/strub-run1.C: Likewise.
	* g++.dg/torture/strub-init1.C: Likewise.
	* g++.dg/torture/strub-init2.C: Likewise.
	* g++.dg/torture/strub-init3.C: Likewise.
	* gnat.dg/strub_attr.adb: Likewise.
	* gnat.dg/strub_ind.adb: Likewise.
	* gnat.dg/strub_access.adb: Likewise.
	* gnat.dg/strub_access1.adb: Likewise.
	* gnat.dg/strub_disp.adb: Likewise.
	* gnat.dg/strub_disp1.adb: Likewise.
	* gnat.dg/strub_ind1.adb: Likewise.
	* gnat.dg/strub_ind2.adb: Likewise.
	* gnat.dg/strub_intf.adb: Likewise.
	* gnat.dg/strub_intf1.adb: Likewise.
	* gnat.dg/strub_intf2.adb: Likewise.
	* gnat.dg/strub_renm.adb: Likewise.
	* gnat.dg/strub_renm1.adb: Likewise.
	* gnat.dg/strub_renm2.adb: Likewise.
	* gnat.dg/strub_var.adb: Likewise.
	* gnat.dg/strub_var1.adb: Likewise.

for  libgcc/ChangeLog

	* configure.ac: Check for strub support.
	* configure: Rebuilt.
	* Makefile.in: Compile strub.c conditionally.
2023-12-07 12:58:20 -03:00
..
config [committed] Fix rx build failure in libgcc 2023-12-02 22:07:59 -07:00
soft-fp libgcc: Add {unsigned ,}__int128 <-> _Decimal{32,64,128} conversion support [PR65833] 2023-11-09 09:14:07 +01:00
ChangeLog Daily bump. 2023-12-07 00:17:06 +00:00
config.host arm: libgcc: provide implementations of __sync_synchronize 2023-11-24 14:15:26 +00:00
config.in gcov: use mmap pools for KVP. 2021-03-03 14:21:45 +01:00
configure strub: enable conditional support 2023-12-07 12:58:20 -03:00
configure.ac strub: enable conditional support 2023-12-07 12:58:20 -03:00
crtstuff.c Update copyright years. 2023-01-16 11:52:17 +01:00
dfp-bit.c Update copyright years. 2023-01-16 11:52:17 +01:00
dfp-bit.h Update copyright years. 2023-01-16 11:52:17 +01:00
divmod.c Update copyright years. 2023-01-16 11:52:17 +01:00
emutls.c libgcc: Avoid -Wbuiltin-declaration-mismatch warnings in emutls.c 2023-12-06 12:27:12 +01:00
enable-execute-stack-empty.c
enable-execute-stack-mprotect.c Update copyright years. 2023-01-16 11:52:17 +01:00
find-symver.awk Update copyright years. 2023-01-16 11:52:17 +01:00
fixed-bit.c Update copyright years. 2023-01-16 11:52:17 +01:00
fixed-bit.h Update copyright years. 2023-01-16 11:52:17 +01:00
fixed-obj.mk
floatunsidf.c
floatunsisf.c
floatunsitf.c
floatunsixf.c
fp-bit.c Update copyright years. 2023-01-16 11:52:17 +01:00
fp-bit.h Update copyright years. 2023-01-16 11:52:17 +01:00
gbl-ctors.h Update copyright years. 2023-01-16 11:52:17 +01:00
gcov.h Update copyright years. 2023-01-16 11:52:17 +01:00
gen-fixed.sh
generic-morestack-thread.c Update copyright years. 2023-01-16 11:52:17 +01:00
generic-morestack.c Update copyright years. 2023-01-16 11:52:17 +01:00
generic-morestack.h Update copyright years. 2023-01-16 11:52:17 +01:00
gstdint.h
gthr-posix.h Update copyright years. 2023-01-16 11:52:17 +01:00
gthr-single.h Update copyright years. 2023-01-16 11:52:17 +01:00
gthr.h Update copyright years. 2023-01-16 11:52:17 +01:00
hardcfr.c libgcc: mark __hardcfr_check_fail as always_inline 2023-11-23 17:31:40 +01:00
libgcc-std.ver.in Introduce strub: machine-independent stack scrubbing 2023-12-05 21:07:36 -03:00
libgcc2.c libgcc _BitInt helper documentation [PR102989] 2023-09-06 17:42:37 +02:00
libgcc2.h Introduce strub: machine-independent stack scrubbing 2023-12-05 21:07:36 -03:00
libgcov-driver-system.c Update copyright years. 2023-01-16 11:52:17 +01:00
libgcov-driver.c Update copyright years. 2023-01-16 11:52:17 +01:00
libgcov-interface.c Update copyright years. 2023-01-16 11:52:17 +01:00
libgcov-merge.c Update copyright years. 2023-01-16 11:52:17 +01:00
libgcov-profiler.c Update copyright years. 2023-01-16 11:52:17 +01:00
libgcov-util.c Update copyright years. 2023-01-16 11:52:17 +01:00
libgcov.h gcov: Fix use of __LIBGCC_HAVE_LIBATOMIC 2023-12-01 09:54:24 +01:00
Makefile.in strub: enable conditional support 2023-12-07 12:58:20 -03:00
memcmp.c
memcpy.c
memmove.c
memset.c
mkheader.sh Update copyright years. 2023-01-16 11:52:17 +01:00
mkmap-flat.awk Update copyright years. 2023-01-16 11:52:17 +01:00
mkmap-symver.awk Update copyright years. 2023-01-16 11:52:17 +01:00
offloadstuff.c openmp: Add support for the 'indirect' clause in C/C++ 2023-11-07 15:44:50 +00:00
shared-object.mk
siditi-object.mk
static-object.mk
strub.c Introduce strub: machine-independent stack scrubbing 2023-12-05 21:07:36 -03:00
sync.c Update copyright years. 2023-01-16 11:52:17 +01:00
udivhi3.c Update copyright years. 2023-01-16 11:52:17 +01:00
udivmod.c Update copyright years. 2023-01-16 11:52:17 +01:00
udivmodhi4.c Update copyright years. 2023-01-16 11:52:17 +01:00
udivmodsi4.c Update copyright years. 2023-01-16 11:52:17 +01:00
unwind-arm-common.inc Update copyright years. 2023-01-16 11:52:17 +01:00
unwind-c.c Update copyright years. 2023-01-16 11:52:17 +01:00
unwind-compat.c Update copyright years. 2023-01-16 11:52:17 +01:00
unwind-compat.h Update copyright years. 2023-01-16 11:52:17 +01:00
unwind-dw2-btree.h Update copyright years. 2023-01-16 11:52:17 +01:00
unwind-dw2-execute_cfa.h libgcc: Fix uninitialized RA signing on AArch64 [PR107678] 2023-01-18 12:20:35 +00:00
unwind-dw2-fde-compat.c Update copyright years. 2023-01-16 11:52:17 +01:00
unwind-dw2-fde-dip.c libgcc: Fix -Wint-conversion warning in find_fde_tail 2023-07-11 06:19:39 +02:00
unwind-dw2-fde.c preserve base pointer for __deregister_frame [PR110956] 2023-08-11 09:20:27 -06:00
unwind-dw2-fde.h Update copyright years. 2023-01-16 11:52:17 +01:00
unwind-dw2.c libgcc: Fix uninitialized RA signing on AArch64 [PR107678] 2023-01-18 12:20:35 +00:00
unwind-dw2.h libgcc: Fix uninitialized RA signing on AArch64 [PR107678] 2023-01-18 12:20:35 +00:00
unwind-generic.h Update copyright years. 2023-01-16 11:52:17 +01:00
unwind-pe.h [committed] Fix build of libgcc on ports using FDPIC 2023-12-02 22:45:48 -07:00
unwind-seh.c Update copyright years. 2023-01-16 11:52:17 +01:00
unwind-sjlj.c Update copyright years. 2023-01-16 11:52:17 +01:00
unwind.inc Update copyright years. 2023-01-16 11:52:17 +01:00
vtv_end.c Update copyright years. 2023-01-16 11:52:17 +01:00
vtv_end_preinit.c Update copyright years. 2023-01-16 11:52:17 +01:00
vtv_start.c Update copyright years. 2023-01-16 11:52:17 +01:00
vtv_start_preinit.c Update copyright years. 2023-01-16 11:52:17 +01:00