Commit Graph

309 Commits

Author SHA1 Message Date
Jozef Lawrynowicz a9046e9853 MSP430: Add -fno-exceptions multilib
ChangeLog:

2019-12-11  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* config-ml.in (msp430-*-*): Support --disable-no-exceptions configure
	flag.

gcc/ChangeLog:

2019-12-11  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* config/msp430/msp430.h (STARTFILE_SPEC) [!fexceptions]: Use
	crtbegin_no_eh.o if building for the C language.
	[fno-exceptions]: Use crtbegin_no_eh.o if building for any language
	except C.
	(ENDFILE_SPEC) [!fexceptions]: Use crtend_no_eh.o if building for 
	the C language.
	[fno-exceptions]: Use crtend_no_eh.o if building for any language
	except C.
	* config/msp430/t-msp430: Add -fno-exceptions multilib.
	* doc/install.texi: Document --disable-no-exceptions multilib configure
	option.
	* doc/sourcebuild.texi: Document exceptions_enabled effective target.

gcc/testsuite/ChangeLog:

2019-12-11  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* lib/gcc-dg.exp: Add dg-prune messages for when exception handling is
	disabled.
	* lib/target-supports.exp (check_effective_target_exceptions_enabled):
	New.

libgcc/ChangeLog:

2019-12-11  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* config.host: Add crt{begin,end}_no_eh.o to "extra_parts".
	* config.host (msp430*-*-elf): Add crt{begin,end}_no_eh.o to
	"extra_parts".

From-SVN: r279246
2019-12-11 19:19:50 +00:00
Szabolcs Nagy 3d3a96a26e musl: Don't use gthr weak refs in libgcc PR91737
The gthr weak reference based single thread detection is unsafe with
static linking and in case of dynamic linking it's ineffective on musl
since pthread symbols are defined in libc.so.

(Ideally this should be fixed for all targets, since glibc plans to move
libpthread.so into libc.so too and users want to static link to pthread
without --whole-archive: PR87189.)

For now we have to explicitly opt out from the broken behaviour in the
config machinery of each target lib and libgcc was previously missed.

libgcc/ChangeLog:

2019-11-18  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* config.host: Add t-gthr-noweak on *-*-musl*.
	* config/t-gthr-noweak: New file.

From-SVN: r278399
2019-11-18 12:08:18 +00:00
Jerome Lambourg 27204060db Update the arm-*-vxworks* support
2019-11-13  Jerome Lambourg  <lambourg@adacore.com>
            Doug Rupp <rupp@adacore.com>
            Olivier Hainque  <hainque@adacore.com>

	gcc/
	* config.gcc: Collapse the arm-vxworks entries into
	a single arm-wrs-vxworks7* one, bpabi based.  Update
	the default cpu from arm8 to armv7-a
	* config/arm/vxworks.h (CC1_SPEC): Simplify, knowing that
	we always use ARM_UNWIND_INFO.
	(DWARF2_UNWIND_INFO): Remove redefinition.
	(ARM_TARGET2_DWARF_FORMAT): Likewise.
	(VXWORKS_PERSONALITY): Define, to "llvm".
	(VXWORKS_EXTRA_LIBS_RTP): Define, to "-lllvm".

	libgcc/
	* config.host: Collapse the arm-vxworks entries into
	a single arm-wrs-vxworks7* one.
	* config/arm/unwind-arm-vxworks.c: Update comments.  Provide
	__gnu_Unwind_Find_exidx and a weak dummy __cxa_type_match for
	kernel modules, to be overriden by libstdc++ when we link with
	it.  Rely on externally provided __exidx_start/end.

Co-Authored-By: Doug Rupp <rupp@adacore.com>
Co-Authored-By: Olivier Hainque <hainque@adacore.com>

From-SVN: r278253
2019-11-14 16:11:30 +00:00
Doug Rupp 3004f893b4 Base support for vxworks 7 on aarch64
2019-11-14  Doug Rupp  <rupp@adacore.com>
           Olivier Hainque  <hainque@adacore.com>
           Jerome Lambourg  <lambourg@adacore.com>

       gcc/
       * config.gcc: Handle aarch64*-wrs-vxworks7*.
       * config/aarch64/aarch64-vxworks.h: New file.
       * config/aarch64/t-aarch64-vxworks: New file.

       libgcc/
       * config.host: Handle aarch64*-wrs-vxworks7*.

Co-Authored-By: Jerome Lambourg <lambourg@adacore.com>
Co-Authored-By: Olivier Hainque <hainque@adacore.com>

From-SVN: r278251
2019-11-14 16:05:08 +00:00
Olivier Hainque 36e5f4d4f3 Update the libgcc support for VxWorks AE/653
2019-11-12  Olivier Hainque  <hainque@adacore.com>

	libgcc/

        * config/t-gthr-vxworksae: New file, add all the gthr-vxworks
        sources except the cxx0x support to LIB2ADDEH.  We don't support
        cxx0x on AE/653.
        * config/t-vxworksae: New file.

        * config.host: Handle *-*-vxworksae: Add the two aforementioned
	Makefile fragment files at their expected position in the tmake_file
	list, in accordance with what is done for other VxWorks variants.

From-SVN: r278250
2019-11-14 16:00:55 +00:00
Corentin Gay 806dd0472f Improve the thread support for VxWorks
2019-11-12  Corentin Gay  <gay@adacore.com>
	    Jerome Lambourg  <lambourg@adacore.com>
	    Olivier Hainque  <hainque@adacore.com>

	libgcc/

	* config/t-gthr-vxworks: New file, add all the gthr-vxworks
	sources to LIB2ADDEH.
	* config/t-vxworks: Remove adjustments to LIB2ADDEH.
	* config/t-vxworks7: Likewise.

	* config.host: Append a block at the end of the file to add the
	t-gthr files to the tmake_file list for VxWorks after everything
	else.

	* config/vxlib.c: Rename as gthr-vxworks.c.
	* config/vxlib-tls.c: Rename as gthr-vxworks-tls.c.

	* config/gthr-vxworks.h: Simplify a few comments.  Expose a TAS
	API and a basic error checking API, both internal.  Simplify the
	__gthread_once_t type definition and initializers.  Add sections
	for condition variables support and for the C++0x thread support,
	conditioned against Vx653 for the latter.

	* config/gthr-vxworks.c (__gthread_once): Simplify comments and
	implementation, leveraging the TAS internal API.
	* config/gthr-vxworks-tls.c: Introduce an internal TLS data access
	API, leveraging the general availability of TLS services in VxWorks7
	post SR6xxx.
	(__gthread_setspecific, __gthread_setspecific): Use it.
	(tls_delete_hook): Likewise, and simplify the enter/leave dtor logic.
	* config/gthr-vxworks-cond.c: New file.  GTHREAD_COND variable
	support based on VxWorks primitives.
	* config/gthr-vxworks-thread.c: New file.  GTHREAD_CXX0X support
	based on VxWorks primitives.

Co-Authored-By: Jerome Lambourg <lambourg@adacore.com>
Co-Authored-By: Olivier Hainque <hainque@adacore.com>

From-SVN: r278249
2019-11-14 15:58:31 +00:00
Jerome Lambourg 78e49fb1bc Introduce vxworks specific crtstuff support
2019-11-06  Jerome Lambourg  <lambourg@adacore.com>
            Olivier Hainque  <hainque@adacore.com>

	libgcc/
	* config/vxcrtstuff.c: New file.
	* config/t-vxcrtstuff: New Makefile fragment.
	* config.host: Append t-vxcrtstuff to the tmake_file list
	on all VxWorks ports using dwarf for table based EH.

	gcc/
	* config/vx-common.h (USE_TM_CLONE_REGISTRY): Remove
	definition, pointless with a VxWorks specific version
	of crtstuff.
	(DWARF2_UNWIND_INFO): Conditionalize on !ARM_UNWIND_INFO.
	* config/vxworks.h (VX_CRTBEGIN_SPEC, VX_CRTEND_SPEC):
	New local macros, controlling the addition of vxworks specific
	crtstuff objects depending on the EH mechanism and kind of
	module being linked.
	(VXWORKS_STARTFILE_SPEC, VXWORKS_ENDFILE_SPEC): Use them.

Co-Authored-By: Olivier Hainque <hainque@adacore.com>

From-SVN: r278248
2019-11-14 15:53:23 +00:00
Georg-Johann Lay 29f3def308 Support 64-bit double and 64-bit long double configurations.
gcc/
	Support 64-bit double and 64-bit long double configurations.

	PR target/92055
	* config.gcc (tm_defines) [avr]: Set from --with-double=,
	--with-long-double=.
	* config/avr/t-multilib: Remove.
	* config/avr/t-avr: Output of genmultilib.awk is now fully
	dynamically generated and no more part of the repo.
	(HAVE_DOUBLE_MULTILIB, HAVE_LONG_DOUBLE_MULTILIB): New variables.
	Pass them down to...
	* config/avr/genmultilib.awk: ...here and handle them.
	* gcc/config/avr/avr.opt (-mdouble=, avr_double). New option and var.
	(-mlong-double=, avr_long_double). New option and var.
	* common/config/avr/avr-common.c (opts.h, diagnostic.h): Include.
	(TARGET_OPTION_OPTIMIZATION_TABLE) <-mdouble=, -mlong-double=>:
	Set default as requested by --with-double=
	(TARGET_HANDLE_OPTION): Define to this...
	(avr_handle_option): ...new hook worker.
	* config/avr/avr.h (DOUBLE_TYPE_SIZE): Define to avr_double.
	(LONG_DOUBLE_TYPE_SIZE): Define to avr_long_double.
	(avr_double_lib): New proto for spec function.
	(EXTRA_SPEC_FUNCTIONS) <double-lib>: Add.
	(DRIVER_SELF_SPECS): Call %:double-lib.
	* config/avr/avr.c (avr_option_override): Assert
	sizeof(long double) >= sizeof(double) for the target.
	* config/avr/avr-c.c (avr_cpu_cpp_builtins)
	[__HAVE_DOUBLE_MULTILIB__, __HAVE_LONG_DOUBLE_MULTILIB__]
	[__HAVE_DOUBLE64__, __HAVE_DOUBLE32__, __DEFAULT_DOUBLE__=]
	[__HAVE_LONG_DOUBLE64__, __HAVE_LONG_DOUBLE32__]
	[__HAVE_LONG_DOUBLE_IS_DOUBLE__, __DEFAULT_LONG_DOUBLE__=]:
	New built-in define depending on --with-double=, --with-long-double=.
	* config/avr/driver-avr.c (avr_double_lib): New spec function.
	* doc/invoke.tex (AVR Options) <-mdouble=,-mlong-double=>: Doc.
	* doc/install.texi (Cross-Compiler-Specific Options)
	<--with-double=, --with-long-double=>: Doc.

libgcc/
	Support 64-bit double and 64-bit long double configurations.

	PR target/92055
	* config/avr/t-avr (HOST_LIBGCC2_CFLAGS): Only add -DF=SF if
	long double is a 32-bit type.
	* config/avr/t-avrlibc: Copy double64 and long-double64
	multilib(s) from the vanilla one.
	* config/avr/t-copy-libgcc: New Makefile snip.

From-SVN: r277908
2019-11-07 09:19:31 +00:00
Richard Henderson 33befddcb8 aarch64: Add out-of-line functions for LSE atomics
This is the libgcc part of the interface -- providing the functions.
Rationale is provided at the top of libgcc/config/aarch64/lse.S.

	* config/aarch64/lse-init.c: New file.
	* config/aarch64/lse.S: New file.
	* config/aarch64/t-lse: New file.
	* config.host: Add t-lse to all aarch64 tuples.

From-SVN: r275967
2019-09-19 07:36:38 -07:00
Christophe Lyon b1e21e5a5d [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts
The new arm-uclinuxfdpiceabi target behaves pretty much like
arm-linux-gnueabi. In order to enable the same set of features, we
have to update several configure scripts that generally match targets
like *-*-linux*: in most places, we add *-uclinux* where there is
already *-linux*, or uclinux* when there is already linux*.

In gcc/config.gcc and libgcc/config.host we use *-*-uclinuxfdpiceabi
because there is already a different behaviour for *-*uclinux* target.

In libtool.m4, we use uclinuxfdpiceabi in cases where ELF shared
libraries support is required, as uclinux does not guarantee that.

2019-09-10  Christophe Lyon  <christophe.lyon@st.com>

	config/
	* futex.m4: Handle *-uclinux*.
	* tls.m4 (GCC_CHECK_TLS): Likewise.

	gcc/
	* config.gcc: Handle *-*-uclinuxfdpiceabi.

	libatomic/
	* configure.tgt: Handle arm*-*-uclinux*.
	* configure: Regenerate.

	libgcc/
	* config.host: Handle *-*-uclinuxfdpiceabi.

	libitm/
	* configure.tgt: Handle *-*-uclinux*.
	* configure: Regenerate.

	* libtool.m4: Handle uclinuxfdpiceabi.

From-SVN: r275564
2019-09-10 09:37:00 +02:00
Jose E. Marchesi 91dfef9610 GCC port for eBPF
This patch series introduces a port of GCC to eBPF, which is a virtual
machine that resides in the Linux kernel.  Initially intended for
user-level packet capture and filtering, eBPF is nowadays generalized
to serve as a general-purpose infrastructure also for non-networking
purposes.

The binutils support is already upstream.  See
https://sourceware.org/ml/binutils/2019-05/msg00306.html.

ChangeLog:

	* MAINTAINERS: Add myself as the maintainer of the eBPF port.
	Remove myself from Write After Approval section.
	* configure.ac: Support for bpf-*-* targets.
	* configure: Regenerate.

contrib/ChangeLog:

	* config-list.mk (LIST): Disable go in bpf-*-* targets.

gcc/ChangeLog:

	* doc/invoke.texi (Option Summary): Cover eBPF.
	(eBPF Options): New section.
	* doc/extend.texi (BPF Built-in Functions): Likewise.
	(BPF Kernel Helpers): Likewise.
	* config.gcc: Support for bpf-*-* targets.
	* common/config/bpf/bpf-common.c: New file.
	* config/bpf/t-bpf: Likewise.
	* config/bpf/predicates.md: Likewise.
	* config/bpf/constraints.md: Likewise.
	* config/bpf/bpf.opt: Likewise.
	* config/bpf/bpf.md: Likewise.
	* config/bpf/bpf.h: Likewise.
	* config/bpf/bpf.c: Likewise.
	* config/bpf/bpf-protos.h: Likewise.
	* config/bpf/bpf-opts.h: Likewise.
	* config/bpf/bpf-helpers.h: Likewise.
	* config/bpf/bpf-helpers.def: Likewise.

gcc/testsuite/ChangeLog:

	* gcc.dg/builtins-config.h: eBPF doesn't support C99 standard
	functions.
	* gcc.c-torture/compile/20101217-1.c: Add a function prototype for
	printf.
	* gcc.c-torture/compile/20000211-1.c: Skip if target bpf-*-*.
	* gcc.c-torture/compile/poor.c: Likewise.
	* gcc.c-torture/compile/pr25311.c: Likewise.
	* gcc.c-torture/compile/pr39928-1.c: Likewise.
	* gcc.c-torture/compile/pr70061.c: Likewise.
	* gcc.c-torture/compile/920501-7.c: Likewise.
	* gcc.c-torture/compile/20000403-1.c: Likewise.
	* gcc.c-torture/compile/20001226-1.c: Likewise.
	* gcc.c-torture/compile/20030903-1.c: Likewise.
	* gcc.c-torture/compile/20031125-1.c: Likewise.
	* gcc.c-torture/compile/20040101-1.c: Likewise.
	* gcc.c-torture/compile/20040317-2.c: Likewise.
	* gcc.c-torture/compile/20040726-1.c: Likewise.
	* gcc.c-torture/compile/20051216-1.c: Likewise.
	* gcc.c-torture/compile/900313-1.c: Likewise.
	* gcc.c-torture/compile/920625-1.c: Likewise.
	* gcc.c-torture/compile/930421-1.c: Likewise.
	* gcc.c-torture/compile/930623-1.c: Likewise.
	* gcc.c-torture/compile/961004-1.c: Likewise.
	* gcc.c-torture/compile/980504-1.c: Likewise.
	* gcc.c-torture/compile/980816-1.c: Likewise.
	* gcc.c-torture/compile/990625-1.c: Likewise.
	* gcc.c-torture/compile/DFcmp.c: Likewise.
	* gcc.c-torture/compile/HIcmp.c: Likewise.
	* gcc.c-torture/compile/HIset.c: Likewise.
	* gcc.c-torture/compile/QIcmp.c: Likewise.
	* gcc.c-torture/compile/QIset.c: Likewise.
	* gcc.c-torture/compile/SFset.c: Likewise.
	* gcc.c-torture/compile/SIcmp.c: Likewise.
	* gcc.c-torture/compile/SIset.c: Likewise.
	* gcc.c-torture/compile/UHIcmp.c: Likewise.
	* gcc.c-torture/compile/UQIcmp.c: Likewise.
	* gcc.c-torture/compile/USIcmp.c: Likewise.
	* gcc.c-torture/compile/consec.c: Likewise.
	* gcc.c-torture/compile/limits-fndefn.c: Likewise.
	* gcc.c-torture/compile/lll.c: Likewise.
	* gcc.c-torture/compile/parms.c: Likewise.
	* gcc.c-torture/compile/pass.c: Likewise.
	* gcc.c-torture/compile/pp.c: Likewise.
	* gcc.c-torture/compile/pr32399.c: Likewise.
	* gcc.c-torture/compile/pr34091.c: Likewise.
	* gcc.c-torture/compile/pr34688.c: Likewise.
	* gcc.c-torture/compile/pr37258.c: Likewise.
	* gcc.c-torture/compile/pr37327.c: Likewise.
	* gcc.c-torture/compile/pr37381.c: Likewise.
	* gcc.c-torture/compile/pr37669-2.c: Likewise.
	* gcc.c-torture/compile/pr37669.c: Likewise.
	* gcc.c-torture/compile/pr37742-3.c: Likewise.
	* gcc.c-torture/compile/pr44063.c: Likewise.
	* gcc.c-torture/compile/pr48596.c: Likewise.
	* gcc.c-torture/compile/pr51856.c: Likewise.
	* gcc.c-torture/compile/pr54428.c: Likewise.
	* gcc.c-torture/compile/pr54713-1.c: Likewise.
	* gcc.c-torture/compile/pr54713-2.c: Likewise.
	* gcc.c-torture/compile/pr54713-3.c: Likewise.
	* gcc.c-torture/compile/pr55921.c: Likewise.
	* gcc.c-torture/compile/pr70240.c: Likewise.
	* gcc.c-torture/compile/pr70355.c: Likewise.
	* gcc.c-torture/compile/pr82052.c: Likewise.
	* gcc.c-torture/compile/pr83487.c: Likewise.
	* gcc.c-torture/compile/pr86122.c: Likewise.
	* gcc.c-torture/compile/pret-arg.c: Likewise.
	* gcc.c-torture/compile/regs-arg-size.c: Likewise.
	* gcc.c-torture/compile/structret.c: Likewise.
	* gcc.c-torture/compile/uuarg.c: Likewise.
	* gcc.dg/20001009-1.c: Likewise.
	* gcc.dg/20020418-1.c: Likewise.
	* gcc.dg/20020426-2.c: Likewise.
	* gcc.dg/20020430-1.c: Likewise.
	* gcc.dg/20040306-1.c: Likewise.
	* gcc.dg/20040622-2.c: Likewise.
	* gcc.dg/20050603-2.c: Likewise.
	* gcc.dg/20050629-1.c: Likewise.
	* gcc.dg/20061026.c: Likewise.
	* gcc.dg/Warray-bounds-3.c: Likewise.
	* gcc.dg/Warray-bounds-30.c: Likewise.
	* gcc.dg/Wframe-larger-than-2.c: Likewise.
	* gcc.dg/Wframe-larger-than.c: Likewise.
	* gcc.dg/Wrestrict-11.c: Likewise.
	* gcc.c-torture/compile/20000804-1.c: Likewise.
	* lib/target-supports.exp (check_effective_target_trampolines):
	Adapt to eBPF.
	(check_effective_target_indirect_jumps): Likewise.
	(check_effective_target_nonlocal_goto): Likewise.
	(check_effective_target_global_constructor): Likewise.
	(check_effective_target_return_address): Likewise.
	* gcc.target/bpf/bpf.exp: New file.
	* gcc.target/bpf/builtin-load.c: Likewise.
	* cc.target/bpf/constant-calls.c: Likewise.
	* gcc.target/bpf/diag-funargs.c: Likewise.
	* gcc.target/bpf/diag-funargs-2.c: Likewise.
	* gcc.target/bpf/diag-funargs-3.c: Likewise.
	* gcc.target/bpf/diag-indcalls.c: Likewise.
	* gcc.target/bpf/helper-bind.c: Likewise.
	* gcc.target/bpf/helper-bpf-redirect.c: Likewise.
	* gcc.target/bpf/helper-clone-redirect.c: Likewise.
	* gcc.target/bpf/helper-csum-diff.c: Likewise.
	* gcc.target/bpf/helper-csum-update.c: Likewise.
	* gcc.target/bpf/helper-current-task-under-cgroup.c: Likewise.
	* gcc.target/bpf/helper-fib-lookup.c: Likewise.
	* gcc.target/bpf/helper-get-cgroup-classid.c: Likewise.
	* gcc.target/bpf/helper-get-current-cgroup-id.c: Likewise.
	* gcc.target/bpf/helper-get-current-comm.c: Likewise.
	* gcc.target/bpf/helper-get-current-pid-tgid.c: Likewise.
	* gcc.target/bpf/helper-get-current-task.c: Likewise.
	* gcc.target/bpf/helper-get-current-uid-gid.c: Likewise.
	* gcc.target/bpf/helper-get-hash-recalc.c: Likewise.
	* gcc.target/bpf/helper-get-listener-sock.c: Likewise.
	* gcc.target/bpf/helper-get-local-storage.c: Likewise.
	* gcc.target/bpf/helper-get-numa-node-id.c: Likewise.
	* gcc.target/bpf/helper-get-prandom-u32.c: Likewise.
	* gcc.target/bpf/helper-get-route-realm.c: Likewise.
	* gcc.target/bpf/helper-get-smp-processor-id.c: Likewise.
	* gcc.target/bpf/helper-get-socket-cookie.c: Likewise.
	* gcc.target/bpf/helper-get-socket-uid.c: Likewise.
	* gcc.target/bpf/helper-getsockopt.c: Likewise.
	* gcc.target/bpf/helper-get-stack.c: Likewise.
	* gcc.target/bpf/helper-get-stackid.c: Likewise.
	* gcc.target/bpf/helper-ktime-get-ns.c: Likewise.
	* gcc.target/bpf/helper-l3-csum-replace.c: Likewise.
	* gcc.target/bpf/helper-l4-csum-replace.c: Likewise.
	* gcc.target/bpf/helper-lwt-push-encap.c: Likewise.
	* gcc.target/bpf/helper-lwt-seg6-action.c: Likewise.
	* gcc.target/bpf/helper-lwt-seg6-adjust-srh.c: Likewise.
	* gcc.target/bpf/helper-lwt-seg6-store-bytes.c: Likewise.
	* gcc.target/bpf/helper-map-delete-elem.c: Likewise.
	* gcc.target/bpf/helper-map-lookup-elem.c: Likewise.
	* gcc.target/bpf/helper-map-peek-elem.c: Likewise.
	* gcc.target/bpf/helper-map-pop-elem.c: Likewise.
	* gcc.target/bpf/helper-map-push-elem.c: Likewise.
	* gcc.target/bpf/helper-map-update-elem.c: Likewise.
	* gcc.target/bpf/helper-msg-apply-bytes.c: Likewise.
	* gcc.target/bpf/helper-msg-cork-bytes.c: Likewise.
	* gcc.target/bpf/helper-msg-pop-data.c: Likewise.
	* gcc.target/bpf/helper-msg-pull-data.c: Likewise.
	* gcc.target/bpf/helper-msg-push-data.c: Likewise.
	* gcc.target/bpf/helper-msg-redirect-hash.c: Likewise.
	* gcc.target/bpf/helper-msg-redirect-map.c: Likewise.
	* gcc.target/bpf/helper-override-return.c: Likewise.
	* gcc.target/bpf/helper-perf-event-output.c: Likewise.
	* gcc.target/bpf/helper-perf-event-read.c: Likewise.
	* gcc.target/bpf/helper-perf-event-read-value.c: Likewise.
	* gcc.target/bpf/helper-perf-prog-read-value.c: Likewise.
	* gcc.target/bpf/helper-probe-read.c: Likewise.
	* gcc.target/bpf/helper-probe-read-str.c: Likewise.
	* gcc.target/bpf/helper-probe-write-user.c: Likewise.
	* gcc.target/bpf/helper-rc-keydown.c: Likewise.
	* gcc.target/bpf/helper-rc-pointer-rel.c: Likewise.
	* gcc.target/bpf/helper-rc-repeat.c: Likewise.
	* gcc.target/bpf/helper-redirect-map.c: Likewise.
	* gcc.target/bpf/helper-set-hash.c: Likewise.
	* gcc.target/bpf/helper-set-hash-invalid.c: Likewise.
	* gcc.target/bpf/helper-setsockopt.c: Likewise.
	* gcc.target/bpf/helper-skb-adjust-room.c: Likewise.
	* gcc.target/bpf/helper-skb-cgroup-id.c: Likewise.
	* gcc.target/bpf/helper-skb-change-head.c: Likewise.
	* gcc.target/bpf/helper-skb-change-proto.c: Likewise.
	* gcc.target/bpf/helper-skb-change-tail.c: Likewise.
	* gcc.target/bpf/helper-skb-change-type.c: Likewise.
	* gcc.target/bpf/helper-skb-ecn-set-ce.c: Likewise.
	* gcc.target/bpf/helper-skb-get-tunnel-key.c: Likewise.
	* gcc.target/bpf/helper-skb-get-tunnel-opt.c: Likewise.
	* gcc.target/bpf/helper-skb-get-xfrm-state.c: Likewise.
	* gcc.target/bpf/helper-skb-load-bytes.c: Likewise.
	* gcc.target/bpf/helper-skb-load-bytes-relative.c: Likewise.
	* gcc.target/bpf/helper-skb-pull-data.c: Likewise.
	* gcc.target/bpf/helper-skb-set-tunnel-key.c: Likewise.
	* gcc.target/bpf/helper-skb-set-tunnel-opt.c: Likewise.
	* gcc.target/bpf/helper-skb-store-bytes.c: Likewise.
	* gcc.target/bpf/helper-skb-under-cgroup.c: Likewise.
	* gcc.target/bpf/helper-skb-vlan-pop.c: Likewise.
	* gcc.target/bpf/helper-skb-vlan-push.c: Likewise.
	* gcc.target/bpf/helper-skc-lookup-tcp.c: Likewise.
	* gcc.target/bpf/helper-sk-fullsock.c: Likewise.
	* gcc.target/bpf/helper-sk-lookup-tcp.c: Likewise.
	* gcc.target/bpf/helper-sk-lookup-upd.c: Likewise.
	* gcc.target/bpf/helper-sk-redirect-hash.c: Likewise.
	* gcc.target/bpf/helper-sk-redirect-map.c: Likewise.
	* gcc.target/bpf/helper-sk-release.c: Likewise.
	* gcc.target/bpf/helper-sk-select-reuseport.c: Likewise.
	* gcc.target/bpf/helper-sk-storage-delete.c: Likewise.
	* gcc.target/bpf/helper-sk-storage-get.c: Likewise.
	* gcc.target/bpf/helper-sock-hash-update.c: Likewise.
	* gcc.target/bpf/helper-sock-map-update.c: Likewise.
	* gcc.target/bpf/helper-sock-ops-cb-flags-set.c: Likewise.
	* gcc.target/bpf/helper-spin-lock.c: Likewise.
	* gcc.target/bpf/helper-spin-unlock.c: Likewise.
	* gcc.target/bpf/helper-strtol.c: Likewise.
	* gcc.target/bpf/helper-strtoul.c: Likewise.
	* gcc.target/bpf/helper-sysctl-get-current-value.c: Likewise.
	* gcc.target/bpf/helper-sysctl-get-name.c: Likewise.
	* gcc.target/bpf/helper-sysctl-get-new-value.c: Likewise.
	* gcc.target/bpf/helper-sysctl-set-new-value.c: Likewise.
	* gcc.target/bpf/helper-tail-call.c: Likewise.
	* gcc.target/bpf/helper-tcp-check-syncookie.c: Likewise.
	* gcc.target/bpf/helper-tcp-sock.c: Likewise.
	* gcc.target/bpf/helper-trace-printk.c: Likewise.
	* gcc.target/bpf/helper-xdp-adjust-head.c: Likewise.
	* gcc.target/bpf/helper-xdp-adjust-meta.c: Likewise.
	* gcc.target/bpf/helper-xdp-adjust-tail.c: Likewise.
	* gcc.target/bpf/skb-ancestor-cgroup-id.c: Likewise.
	* gcc.target/bpf/sync-fetch-and-add.c: Likewise.

libgcc/ChangeLog:

	* config.host: Set cpu_type for bpf-*-* targets.
	* config/bpf/t-bpf: Likewise.
	* config/bpf/crtn.S: Likewise.
	* config/bpf/crti.S: New file.

From-SVN: r275506
2019-09-09 12:13:23 +02:00
Jim Wilson 2f4d895197 RISC-V: Re-enable -msave-restore for shared libraries.
This re-enables -msave-restore for shared libraries, and uses the
t-slibgcc-libgcc file to get the save-restore routines included directly
in shared libraries so that we don't need to indirect through the PLT
to reach them, which doesn't work.

	gcc/
	* config/riscv/riscv.c (riscv_option_override): Revert 2019-08-30
	change.

	libgcc/
	* config.host (riscv*-*-linux*): Add t-slibgcc-libgcc to tmake_file.
	(riscv*-*-freebsd*): Likewise.

From-SVN: r275478
2019-09-06 17:09:21 -07:00
Ulrich Weigand 2f2aeda98f Remove Cell Broadband Engine SPU targets
From-SVN: r275343
2019-09-03 15:08:28 +00:00
Matt Thomas 428642b132 config.gcc (hppa*-*-netbsd*): New target.
gcc/ChangeLog:
	* config.gcc (hppa*-*-netbsd*): New target.
	* config/pa/pa-netbsd.h: New file.
	* config/pa/pa32-netbsd.h: New file.

libgcc/ChangeLog:
	* config.host (hppa*-*-netbsd*): New case.
	* config/pa/t-netbsd: New file.


Co-Authored-By: Matthew Green <mrg@eterna.com.au>
Co-Authored-By: Maya Rashish <coypu@sdf.org>
Co-Authored-By: Nick Hudson <nick@nthcliff.demon.co.uk>

From-SVN: r273933
2019-07-31 14:11:16 +00:00
Iain Sandoe 61afc8f8f0 [Darwin] Revert one hunk from r273016 (TLC for older Darwin versions).
t-darwin8 is nolonger needed (or present) for pre-10.4 powerpc, so remove
the reference.

2019-07-04  Iain Sandoe  <iain@sandoe.co.uk>

	* config.host: Remove reference to t-darwin8.

From-SVN: r273091
2019-07-04 18:28:59 +00:00
Iain Sandoe 179c7ef523 [Darwin] Some TLC for older Darwin versions.
The library handling and some of the options for creating the crts for
the older PPC Darwin versions had bit-rotted somewhat.  This adjusts the
build criteria for the crts to avoid newer ld64 versions warnings about
mismatches in build and object versions.

Added to some of the comments that it's documented why the specs are as
they are.

2019-07-03  Iain Sandoe  <iain@sandoe.co.uk>

gcc/

	* config/darwin.h (REAL_LIBGCC_SPEC): Adjust for earlier Darwin.
	(STARTFILE_SPEC): Split crt3 into a separate spec.
	(DARWIN_EXTRA_SPECS): Add crt2 and crt3 spec.
	(DARWIN_CRT2_SPEC): New.
	(DARWIN_CRT3_SPEC): New.
	(MIN_LD64_OMIT_STUBS): Revise to 62.1.
	* config/rs6000/darwin.h (DARWIN_CRT2_SPEC): Revise conditions.
	(DARWIN_CRT3_SPEC): New.

libgcc/

2019-07-03  Iain Sandoe  <iain@sandoe.co.uk>

	* config.host (powerpc-*-darwin*,powerpc64-*-darwin*): Revise crt
	list.
	* config/rs6000/t-darwin: Build crt3_2 for older systems.  Revise
	mmacosx-version-min for crts to run across all system versions.
	* config/rs6000/t-darwin64 (LIB2ADD): Remove.
	* config/t-darwin: Revise mmacosx-version-min for crts to run across
	system versions >= 10.4.

From-SVN: r273016
2019-07-03 18:36:28 +00:00
Iain Sandoe ebecdd0c36 Darwin, add a missed file change
From the last commit.

2019-06-25  Iain Sandoe  <iain@sandoe.co.uk>

	* config.host: Add libef_ppc.a to the extra files for powerpc-darwin.

From-SVN: r272660
2019-06-25 20:12:49 +00:00
Matthew Green f32f75858a [netbsd][aarch64] add netbsd/aarch64 target
Initial support for AArch64 running NetBSD.

Matthew Green <mrg@eterna.com.au>
Maya Rashish <coypu@sdf.org>

gcc:
	* config.gcc (aarch64*-*-netbsd*): New target.
	* config/aarch64/aarch64-netbsd.h: New file.
	* config/aarch64/t-aarch64-netbsd: Likewise.

libgcc:
	* config.host (aarch64*-*-netbsd*): New case.

Co-Authored-By: Maya Rashish <coypu@sdf.org>

From-SVN: r272387
2019-06-17 14:43:11 +00:00
Matt Thomas b27c108234 [NetBSD] Add support for the Arm EABI.
This is a roll-up of a set of changes needed to support the Arm EABI on NetBSD.

2019-06-14  Matt Thomas  <matt@3am-software.com>
	    Matthew Green  <mrg@eterna.com.au>
	    Nick Hudson  <skrll@netbsd.org>
	    Maya Rashish  <coypu@sdf.org>
	    Richard Earnshaw  <rearnsha@arm.com>

gcc:

	* config.gcc (arm*-*-netbsdelf*) Add support for EABI configuration.
	* config.host (arm*-*-netbsd*): Use driver-arm.o on native NetBSD.
	* config/arm/netbsd-eabi.h: New file.
	* config/arm/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Undefine before
	redefining.
	(SUBTARGET_EXTRA_ASM_SPEC): Don't pass -matpcs to the assembler.
	* config/netbsd-elf.h (NETBSD_LINK_LD_ELF_SO_SPEC): New define.
	(NETBSD_SUBTARGET_EXTRA_SPECS): New define.
	(SUBTARGET_EXTRA_SPECS): Define to NETBSD_SUBTARGET_EXTRA_SPECS.

libatomic:
	* configure.tgt (arm*): Handle NetBSD in the same way as FreeBSD.

libgcc:
	* config.host (arm*-*-netbsdelf*): Add support for EABI configurations.
	* config/arm/t-netbsd (LIB1ASMFUNCS): Add some additional assembler
	functions to build.
	* config/arm/t-netbsd-eabi: New file.


Co-Authored-By: Matthew Green <mrg@eterna.com.au>
Co-Authored-By: Maya Rashish <coypu@sdf.org>
Co-Authored-By: Nick Hudson <skrll@netbsd.org>
Co-Authored-By: Richard Earnshaw <rearnsha@arm.com>

From-SVN: r272290
2019-06-14 14:04:20 +00:00
Dimitar Dimitrov ae7deb4b85 Initial TI PRU libgcc port
libgcc/ChangeLog:

2019-06-12  Dimitar Dimitrov  <dimitar@dinux.eu>

	* config.host: Add PRU target.
	* config/pru/asri.c: New file.
	* config/pru/eqd.c: New file.
	* config/pru/eqf.c: New file.
	* config/pru/ged.c: New file.
	* config/pru/gef.c: New file.
	* config/pru/gtd.c: New file.
	* config/pru/gtf.c: New file.
	* config/pru/led.c: New file.
	* config/pru/lef.c: New file.
	* config/pru/lib2bitcountHI.c: New file.
	* config/pru/lib2divHI.c: New file.
	* config/pru/lib2divQI.c: New file.
	* config/pru/lib2divSI.c: New file.
	* config/pru/libgcc-eabi.ver: New file.
	* config/pru/ltd.c: New file.
	* config/pru/ltf.c: New file.
	* config/pru/mpyll.S: New file.
	* config/pru/pru-abi.h: New file.
	* config/pru/pru-asm.h: New file.
	* config/pru/pru-divmod.h: New file.
	* config/pru/sfp-machine.h: New file.
	* config/pru/t-pru: New file.

From-SVN: r272204
2019-06-12 19:28:51 +00:00
Yoshinori Sato e69a13d15d config.host (rx-*-linux*): Add t-fdpbit to tmake_file Add appropriate tm_file clause as well.
* config.host (rx-*-linux*): Add t-fdpbit to tmake_file
        Add appropriate tm_file clause as well.
        * config/rx/t-rx (HOST_LIBGCC2_CFLAGS): Remove.

From-SVN: r271978
2019-06-05 17:20:27 -06:00
Yoshinori Sato 76aaa9cdb1 config.gcc (rx-*-linux*): New target.
* config.gcc (rx-*-linux*): New target.
	* config/rx/elf.opt: New file.
	* config/rx/linux.h: Likewise.
	* config/rx/t-linux: Likewise.
	* config/rx/rx.c (TARGET_SAVE_ACC_REGISTER): If not defined,
	make it zero.
	* config/rx/rx.h (ASM_APP_ON): Allow to be overridden.
	(ASM_APP_OFF): Likewise.
	* config/rx/rx.opt: Drop -msim and -mas100-syntax, they were
	moved elsewhere.

	* config.host (rx-*-linux*): Add new case.
	* config/rx/t-rx (HOST_LIBGCC2_CFLAGS): Force DFmode to SFmode.

From-SVN: r271748
2019-05-29 12:36:06 -06:00
Rainer Orth ccd1242eec Remove obsolete Solaris 10 support
libstdc++-v3:
	* config/os/solaris/solaris2.10: Move to ...
	* config/os/solaris: ... this.
	* configure.host (os_include_dir): Adapt.
	(abi_baseline_pair): Remove Solaris 10 handling.
	* config/abi/post/i386-solaris2.10: Remove.
	* config/abi/post/sparc-solaris2.10: Remove.
	* config/abi/post/i386-solaris2.11: Rename to ...
	* config/abi/post/i386-solaris: ... this.
	* config/abi/post/sparc-solaris2.11: Rename to ...
	* config/abi/post/sparc-solaris: ... this.

	* libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
	workaround.

	* testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
	xfail.

	libsanitizer:
	* configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
	handling.
	* configure: Regenerate.

	libgcc:
	* config.host: Simplify various *-*-solaris2.1[0-9]* to
	*-*-solaris2*.
	* configure.ac: Likewise.
	* configure: Regenerate.

	* config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove
	Solaris 10 and Solaris 11 < snv_125 handling.

	libbacktrace:
	* configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
	handling.
	* configure: Regenerate.

	gcc/testsuite:
	* gcc.dg/atomic/c11-atomic-exec-4.c: Simplify triplet to
	*-*-solaris2*.
	* gcc.dg/atomic/c11-atomic-exec-5.c: Likewise.
	* gcc.dg/c99-math-double-1.c: Likewise.
	* gcc.dg/c99-math-float-1.c: Likewise.
	* gcc.dg/c99-math-long-double-1.c: Likewise.
	* gcc.misc-tests/linkage.exp: Simplify triplet to
	x86_64-*-solaris2*.

	* gcc.target/i386/mcount_pic.c: Remove *-*-solaris2.10* && !gld
	xfail.
	* gcc.target/i386/pr63620.c: Likewise.

	* lib/target-supports.exp (check_sse_os_support_available): Remove
	Solaris 9/x86 workaround.

	gcc:
	* config.gcc: Move *-*-solaris2.10* from obsolete configurations
	to unsupported ones.
	Simplify x86_64-*-solaris2.1[0-9]* to x86_64-*-solaris2*.
	* config.host: Likewise.
	* config/i386/sol2.h (ASM_COMMENT_START): Remove.
	* config/sparc/driver-sparc.c (host_detect_local_cpu) [__sun__ &&
	__svr4__]: Remove "brand" fallback.
	[!KSTAT_DATA_STRING]: Remove.
	* configure.ac (gcc_cv_ld_hidden): Simplify *-*-solaris2.1[0-9]*
	to *-*-solaris2*.
	(comdat_group): Likewise.
	(set_have_as_tls): Likewise.
	(gcc_cv_target_dl_iterate_phdr): Likewise.
	(gcc_cv_as_shf_merge): Remove Solaris 10/x86 workaround.
	(gcc_cv_ld_aligned_shf_merge): Remove Solaris 10/SPARC workaround.
	* configure: Regenerate.
	* doc/install.texi: Simplify Solaris target triplets.
	(Specific, i?86-*-solaris2*): Remove Solaris 10 references.
	(Specific, *-*-solaris2*): Document Solaris 10 removal.
	Remove Solaris 10 references.
	Remove obsolete Solaris bug reference.
	(Specific, sparc-sun-solaris2.10): Remove.

From-SVN: r271183
2019-05-14 17:17:23 +00:00
Andrew Stubbs 91d7b7fe84 GCN libgcc.
This patch contains the GCN port of libgcc.

2019-01-17  Andrew Stubbs  <ams@codesourcery.com>
	    Kwok Cheung Yeung  <kcy@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>
	    Tom de Vries  <tom@codesourcery.com>

	libgcc/
	* config.host: Recognize amdgcn*-*-amdhsa.
	* config/gcn/crt0.c: New file.
	* config/gcn/lib2-divmod-hi.c: New file.
	* config/gcn/lib2-divmod.c: New file.
	* config/gcn/lib2-gcn.h: New file.
	* config/gcn/sfp-machine.h: New file.
	* config/gcn/t-amdgcn: New file.


Co-Authored-By: Julian Brown <julian@codesourcery.com>
Co-Authored-By: Kwok Cheung Yeung <kcy@codesourcery.com>
Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r268021
2019-01-17 12:29:13 +00:00
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Stafford Horne d929e137f8 or1k: libgcc: initial support for openrisc
libgcc/ChangeLog:

2018-11-09  Stafford Horne  <shorne@gmail.com>
	    Richard Henderson  <rth@twiddle.net>

	* config.host: Add OpenRISC support.
	* config/or1k/*: New.


Co-Authored-By: Richard Henderson <rth@twiddle.net>

From-SVN: r265961
2018-11-09 12:09:15 +00:00
Iain Sandoe 88350fd97e commit missed change from r263764
From-SVN: r263766
2018-08-22 12:05:45 +00:00
Rasmus Villemoes 9a5b8df700 libgcc: add crt{begin,end} for powerpc-wrs-vxworks target
In order to allow ZCX on VxWorks, we need the frame_dummy function to do
the register_frame_info(). So make sure crtbegin.o and crtend.o are
available for use with a custom spec file.

From-SVN: r263690
2018-08-21 08:49:15 +00:00
Jojo 4cd0bc3b69 C-SKY port: libgcc
2018-08-17  Jojo  <jijie_rong@c-sky.com>
	    Huibin Wang  <huibin_wang@c-sky.com>
	    Sandra Loosemore  <sandra@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>

	C-SKY port: libgcc

	libgcc/
	* config.host: Add C-SKY support.
	* config/csky/*: New.

Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com>
Co-Authored-By: Huibin Wang <huibin_wang@c-sky.com>
Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>

From-SVN: r263631
2018-08-17 15:08:27 -04:00
Chung-Ju Wu cf3cd43d5a [NDS32] Support Linux target for nds32.
gcc/
	* config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
	(nds32le-*-*, nds32be-*-*): Integrate checking process.
	(nds32*-*-*): Add glibc and uclibc conditions.
	* common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
	(TARGET_EXCEPT_UNWIND_INFO): Define.
	* config/nds32/elf.h: New file.
	* config/nds32/linux.h: New file.
	* config/nds32/nds32-elf.opt: New file.
	* config/nds32/nds32-linux.opt: New file.
	* config/nds32/nds32-fp-as-gp.c
	(pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
	* config/nds32/nds32.c (nds32_conditional_register_usage): Consider
	TARGET_LINUX_ABI.
	(nds32_asm_file_end): Ditto.
	(nds32_print_operand): Ditto.
	(nds32_insert_attributes): Ditto.
	(nds32_init_libfuncs): New function.
	(TARGET_HAVE_TLS): Define.
	(TARGET_INIT_LIBFUNCS): Define.
	* config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
	spec content.
	(TARGET_ELF): Apply different mcmodel setting.
	(LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
	been migrated into elf.h and linux.h files.
	* config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
	* config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
	(mcmodel): The content has been migrated into nds32-elf.opt and
	nds32-linux.opt files.
	* config/nds32/t-elf: New file.
	* config/nds32/t-linux: New file.

libgcc/
	* config.host (nds32*-linux*): New.
	* config/nds32/linux-atomic.c: New file.
	* config/nds32/linux-unwind.h: New file.

Co-Authored-By: Kito Cheng <kito.cheng@gmail.com>
Co-Authored-By: Monk Chiang <sh.chiang04@gmail.com>

From-SVN: r261116
2018-06-02 14:22:12 +00:00
Amaan Cheval e5f1cdb1b0 config.host (x86_64-*-rtems*): Build crti.o and crtn.o.
2018-05-07  Amaan Cheval  <amaan.cheval@gmail.com>

	* config.host (x86_64-*-rtems*): Build crti.o and crtn.o.

From-SVN: r260007
2018-05-07 16:32:09 +00:00
Ruslan Bukin 4d47fe5a8f RISC-V: Support for FreeBSD.
gcc/
	* config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
	* config/riscv/freebsd.h: New.
	libgcc/
	* config.host (riscv*-*-freebsd*): Add RISC-V FreeBSD support.

From-SVN: r259190
2018-04-06 13:04:17 -07:00
Sebastian Huber 64b371b1b5 RTEMS/EPIPHANY: Add RTEMS support
gcc/
	* config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
	* config/epiphany/rtems.h: New file.

libgcc/
	* config.host (epiphany-*-elf*): Add (epiphany-*-rtems*)
	configuration.

From-SVN: r256273
2018-01-05 06:17:22 +00:00
Jakub Jelinek 85ec4feb11 Update copyright years.
From-SVN: r256169
2018-01-03 11:03:58 +01:00
Rainer Orth f021f1d3a6 Adapt Solaris 12 references
libgcc:
	* config.host (*-*-solaris2*): Adapt comment for Solaris 12
	renaming.
	* config/sol2/crtpg.c (__start_crt_compiler): Likewise.
	* configure.ac (libgcc_cv_solaris_crts): Likewise.
	* configure: Regenerate.

	gcc:
	* config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
	Solaris 11.  Update comment.
	* configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
	renaming.
	* config/sol2.h (STARTFILE_SPEC): Likewise.
	* configure: Regenerate.

	gcc/testsuite:
	* lib/target-supports.exp (check_effective_target_pie): Adapt
	comment for Solaris 12 renaming.

	* gcc.dg/torture/pr60092.c: Remove *-*-solaris2.11* dg-xfail-run-if.

From-SVN: r254737
2017-11-14 18:31:01 +00:00
Cupertino Miranda b0c7ddf816 [ARC] Fix to unwinding.
gcc/ChangeLog:
2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>

        * config/arc/arc.c (arc_save_restore): Corrected CFA note.
        (arc_expand_prologue): Restore blink for millicode.
        * config/arc/linux.h (LINK_EH_SPEC): Defined.

libgcc/ChangeLog:
2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>
            Vineet Gupta <vgupta@synopsys.com>

        * config.host (arc*-*-linux*): Set md_unwind_header variable.
        * config/arc/linux-unwind-reg.def: New file.
        * config/arc/linux-unwind.h: Likewise.

Co-Authored-By: Vineet Gupta <vgupta@synopsys.com>

From-SVN: r254367
2017-11-03 11:51:18 +01:00
Olivier Hainque 2f19c491de config.host (*-*-vxworks7): Widen scope to vxworks7*.
2017-09-01  Olivier Hainque  <hainque@adacore.com>

	libgcc/
	* config.host (*-*-vxworks7): Widen scope to vxworks7*.

From-SVN: r251594
2017-09-01 13:43:01 +00:00
Olivier Hainque 611e70369c config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now match as powerpc-wrs-vxworks*.
2017-08-31  Olivier Hainque  <hainque@adacore.com>

       gcc/
       * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
	match as powerpc-wrs-vxworks*.

       libgcc/
       * config.host: Likewise.

From-SVN: r251573
2017-08-31 19:19:47 +00:00
Jonathan Yong c8f34527b1 Share mingw fset-stack-executable with cygwin
This patch is in use by Cygwin for years, upstream to GCC.

	* gcc/config/i386/mingw.opt (fset-stack-executable): Removed.
	* gcc/config/i386/cygming.opt (fset-stack-executable): Moved
	from mingw.opt.
	* gcc/config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
	* ligcc/config.host (*-cygwin): Include file from mingw
	config/i386/enable-execute-stack-mingw32.c

From-SVN: r250914
2017-08-07 11:40:08 +00:00
Jerome Lambourg 0b458d2bc8 config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as well as arm-wrs-vxworks.
2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
           Doug Rupp  <rupp@adacore.com>
           Olivier Hainque  <hainque@adacore.com>

  	gcc/
   	* config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
   	well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
   	arm8 (arch v4).
   	* config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
   	for TARGET_OS_CPP_BUILTIN.
   	(TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
   	refine CPU definitions for arm_arch5 and add those for arm_arch6 and
   	arm_arch7.
    	(MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
   	passing required abi options to the assembler for EABI configurations.
   	(EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
   	of .text.hot and .text.unlikely sections for kernel modules when
   	using ARM style exceptions.
   	(CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
   	options. Add EXTRA_CC1_SPEC.
   	(VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
   	toolchain options.
   	(DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
   	transition.
   	(ARM_TARGET2_DWARF_FORMAT): Define.
   	* config/arm/t-vxworks: Adjust multilib control to removal of the
   	Diab command line options.

   	libgcc/
   	* config.host (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7
   	as well as arm-wrs-vxworks.
   	* config/arm/t-vxworks7: New file.  Add unwind-arm-vxworks.c to
   	LIB2ADDEH.
   	* config/arm/unwind-arm-vxworks.c: New file. Provide dummy
   	__exidx_start and __exidx_end for downloadable modules.


Co-Authored-By: Doug Rupp <rupp@adacore.com>
Co-Authored-By: Olivier Hainque <hainque@adacore.com>

From-SVN: r250781
2017-08-01 14:14:21 +00:00
Daniel Santos 9cbc07ccff PR testsuite/80759 Fix -mcall-ms2sysv-xlogues on Darwin and Solaris
2017-07-24  Daniel Santos  <daniel.santos@pobox.com>

	PR testsuite/80759
	* config.host: include i386/t-msabi for darwin and solaris.
	* config/i386/i386-asm.h
	(ELFFN): Rename to FN_TYPE.
	(FN_SIZE): New macro.
	(FN_HIDDEN): Likewise.
	(ASMNAME): Likewise.
	(FUNC_START): Rename to FUNC_BEGIN, use ASMNAME, replace .global with
	.globl.
	(HIDDEN_FUNC): Use ASMNAME and .globl instead of .global.
	(SSE_SAVE): Convert to cpp macro, hard-code offset (always 0x60).
	* config/i386/resms64.S: Use SSE_SAVE as cpp macro instead of gas
	.macro.
	* config/i386/resms64f.S: Likewise.
	* config/i386/resms64fx.S: Likewise.
	* config/i386/resms64x.S: Likewise.
	* config/i386/savms64.S: Likewise.
	* config/i386/savms64f.S: Likewise.

From-SVN: r250488
2017-07-24 21:59:57 +00:00
Vineet Gupta b1938888f5 [ARC] Configure script to allow non uclibc based triplets
gcc/
2017-07-10  Vineet Gupta <vgupta@synopsys.com>

        * config.gcc: Remove uclibc from arc target spec.

libgcc/
2017-07-10  Vineet Gupta <vgupta@synopsys.com>

        * config.host: Remove uclibc from arc target spec.

From-SVN: r250097
2017-07-10 15:55:26 +02:00
Krister Walfridsson bec75e53a8 config.host (*-*-netbsd*): Remove check for aout NetBSD releases.
2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>

	* config.host (*-*-netbsd*): Remove check for aout NetBSD releases.

From-SVN: r250080
2017-07-09 04:01:02 +00:00
Jerome Lambourg 50567938f9 config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
2017-06-27  Jerome Lambourg  <lambourg@adacore.com>

	gcc/
	* config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
	(x86_64-wrs-vxworks7): Likewise.

	libgcc/
	* config.host (i*86-wrs)vxworks7): Handle new acceptable triplet.
	(x86_64-wrs-vxworks7): Likewise.

From-SVN: r249689
2017-06-27 13:15:35 +00:00
Olivier Hainque e4b0df93a0 t-vxworks7: New file.
2017-06-27  Olivier Hainque  <hainque@adacore.com>

	* config/t-vxworks7: New file.
	* config.host (*-*-vxworks7): Use it.

From-SVN: r249688
2017-06-27 12:20:05 +00:00
Krister Walfridsson eac8c9f2d3 PR target/80600 - hidden symbol '__cpu_model' is referenced by DSO
gcc/ChangeLog:

        PR target/80600
        * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.

libgcc/ChangeLog:

        PR target/80600
        * config.host (*-*-netbsd*): Add t-slibgcc-libgcc to tmake_file.

From-SVN: r248037
2017-05-14 22:49:03 +00:00
Daniel Santos d6d4d7701a i386.opt: Add option -mcall-ms2sysv-xlogues.
gcc/ChangeLog:

	* config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
	* config/i386/i386.h
	(x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
	(NUM_X86_64_MS_CLOBBERED_REGS): New macro.
	(struct machine_function): Add new members call_ms2sysv,
	call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
	(struct machine_frame_state): New fields sp_realigned and
	sp_realigned_offset.
	* config/i386/i386.c
	(enum xlogue_stub): New enum.
	(enum xlogue_stub_sets): New enum.
	(class xlogue_layout): New class.
	(struct ix86_frame): New fields stack_realign_allocate_offset,
	stack_realign_offset and outlined_save_offset.  Modify comments to
	detail stack layout when using out-of-line stubs.
	(ix86_target_string): Add -mcall-ms2sysv-xlogues option.
	(ix86_option_override_internal): Add sorry() for TARGET_SEH and
	-mcall-ms2sysv-xlogues.
	(stub_managed_regs): New static variable.
	(ix86_save_reg): Add new parameter ignore_outlined to optionally omit
	registers managed by out-of-line stub.
	(disable_call_ms2sysv_xlogues): New function.
	(ix86_compute_frame_layout): Modify re-alignment calculations, disable
	m->call_ms2sysv when appropriate and compute frame layout for
	out-of-line stubs.
	(sp_valid_at, fp_valid_at): New inline functions.
	(choose_basereg): New function.
	(choose_baseaddr): Add align parameter, use choose_basereg and modify
	all callers.
	(ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
	Use align parameter of choose_baseaddr to generated aligned SSE movs
	when possible.
	(pro_epilogue_adjust_stack): Modify to track
	machine_frame_state::sp_realigned.
	(ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
	(ix86_nsaved_sseregs): Likewise.
	(ix86_emit_save_regs): Likewise.
	(ix86_emit_save_regs_using_mov): Likewise.
	(ix86_emit_save_sse_regs_using_mov): Likewise.
	(get_scratch_register_on_entry): Likewise.
	(gen_frame_set): New function.
	(gen_frame_load): Likewise.
	(gen_frame_store): Likewise.
	(emit_outlined_ms2sysv_save): Likewise.
	(emit_outlined_ms2sysv_restore): Likewise.
	(ix86_expand_prologue): Modify stack re-alignment code and call
	emit_outlined_ms2sysv_save when appropriate.
	(ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
	parameter rtx_insn *insn, which allows the function to be used to only
	generate the notes.
	(ix86_expand_epilogue): Modify validity checks of frame and stack
	pointers, and call emit_outlined_ms2sysv_restore when appropriate.
	(ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
	* config/i386/predicates.md
	(save_multiple): New predicate.
	(restore_multiple): Likewise.
	* config/i386/sse.md
	(save_multiple<mode>): New pattern.
	(save_multiple_realign<mode>): Likewise.
	(restore_multiple<mode>): Likewise.
	(restore_multiple_and_return<mode>): Likewise.
	(restore_multiple_leave_return<mode>): Likewise.
	* Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp

gcc/testsuite/ChangeLog:

	* gcc.target/x86_64/abi/ms-sysv/do-test.S: New file.
	* gcc.target/x86_64/abi/ms-sysv/gen.cc: Likewise.
	* gcc.target/x86_64/abi/ms-sysv/ms-sysv.c: Likewise.
	* gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp: Likewise.

libgcc/ChangeLog:

	* config.host: Add i386/t-msabi to i386/t-linux file list.
	* config/i386/i386-asm.h: New file.
	* config/i386/resms64.S: New file.
	* config/i386/resms64f.S: New file.
	* config/i386/resms64fx.S: New file.
	* config/i386/resms64x.S: New file.
	* config/i386/savms64.S: New file.
	* config/i386/savms64f.S: New file.
	* config/i386/t-msabi: New file.

From-SVN: r248029
2017-05-14 12:22:08 +02:00
Andreas Tobler 8ef2b9a7b5 config.host: Use the generic FreeBSD t-slibgcc-elf-ver for arm*-*-freebsd* instead of the...
2017-05-09  Andreas Tobler  <andreast@gcc.gnu.org>

    * config.host: Use the generic FreeBSD t-slibgcc-elf-ver for
    arm*-*-freebsd* instead of the t-slibgcc-libgcc.

From-SVN: r247812
2017-05-09 22:37:25 +02:00
Joshua Conner 7ab8766a8e Add fuchsia support to libgcc
* config/arm/unwind-arm.h (_Unwind_decode_typeinfo_ptr): Use
	pc-relative indirect handling for fuchsia.
	* config/t-slibgcc-fuchsia: New file.
	* config.host (*-*-fuchsia*, aarch64*-*-fuchsia*, arm*-*-fuchsia*,
	x86_64-*-fuchsia*): Add definitions.

From-SVN: r247710
2017-05-06 00:22:38 +00:00
John Marino 4ccfdb287e freebsd-unwind.h: New file.
2017-03-10  John Marino  <gnugcc@marino.st>

    * config/aarch64/freebsd-unwind.h: New file.
    * config.host: Add aarch64-*-freebsd unwinder.

From-SVN: r246052
2017-03-10 20:33:27 +01:00