diff options
author | Martin Jambor <mjambor@suse.cz> | 2017-07-31 14:43:24 +0200 |
---|---|---|
committer | Martin Jambor <mjambor@suse.cz> | 2017-07-31 14:43:24 +0200 |
commit | b32f12dece884f1fa0f04c643a77105aff6ce8bc (patch) | |
tree | cdab5f10806561fc198f907299b0e55eb5701ef0 /libgcc | |
parent | 166bec868d991fdf71f9a66f994e5977fcab4aa2 (diff) | |
parent | a168a775e93ec31ae743ad282d8e60fa1c116891 (diff) | |
download | gcc-b32f12dece884f1fa0f04c643a77105aff6ce8bc.tar.gz |
Merge branch 'master' into gcngcn
Diffstat (limited to 'libgcc')
27 files changed, 242 insertions, 133 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 1b5d2b5a17d..fc7b878d95c 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,87 @@ +2017-07-28 Sebastian Huber <sebastian.huber@embedded-brains.de> + + * config/rs6000/ibm-ldouble.c: Disable if defined __rtems__. + +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. + +2017-07-19 John Marino <gnugcc@marino.st> + + * config/i386/dragonfly-unwind.h: Handle sigtramp relocation. + +2017-07-12 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR target/81193 + * configure.ac (PowerPC float128 hardware support): Test whether + we can use __builtin_cpu_supports before enabling the ifunc + handler. + * configure: Regenerate. + +2017-07-10 Vineet Gupta <vgupta@synopsys.com> + + * config.host: Remove uclibc from arc target spec. + +2017-07-09 Krister Walfridsson <krister.walfridsson@gmail.com> + + * config.host (*-*-netbsd*): Remove check for aout NetBSD releases. + +2017-07-07 Peter Bergner <bergner@vnet.ibm.com> + + * config/rs6000/float128-ifunc.c: Don't include auxv.h. + (have_ieee_hw_p): Delete function. + (SW_OR_HW) Use __builtin_cpu_supports(). + +2017-07-06 Thomas Preud'homme <thomas.preudhomme@arm.com> + + * config/arm/lib1funcs.S: Defined __ARM_ARCH__ to 8 for ARMv8-R. + +2017-07-03 Olivier Hainque <hainque@adacore.com> + + * config/t-vxworks7: New file, really. + +2017-06-28 Joseph Myers <joseph@codesourcery.com> + + * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state), + config/alpha/linux-unwind.h (alpha_fallback_frame_state), + config/bfin/linux-unwind.h (bfin_fallback_frame_state), + config/i386/linux-unwind.h (x86_64_fallback_frame_state, + x86_fallback_frame_state), config/m68k/linux-unwind.h (struct + uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext), + config/pa/linux-unwind.h (pa32_fallback_frame_state), + config/riscv/linux-unwind.h (riscv_fallback_frame_state), + config/sh/linux-unwind.h (sh_fallback_frame_state), + config/tilepro/linux-unwind.h (tile_fallback_frame_state), + config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use + ucontext_t instead of struct ucontext. + +2017-06-27 Jerome Lambourg <lambourg@adacore.com> + + * config.host (i*86-wrs-vxworks7): Handle new acceptable triplet. + (x86_64-wrs-vxworks7): Likewise. + +2017-06-27 Olivier Hainque <hainque@adacore.com> + + * config/t-vxworks7: New file. + * config.host (*-*-vxworks7): Use it. + 2017-06-22 Matt Turner <mattst88@gmail.com> * config/i386/cpuinfo.c (get_intel_cpu): Add Kaby Lake models to diff --git a/libgcc/config.host b/libgcc/config.host index 7711abf2704..ae8836e8891 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -250,14 +250,7 @@ case ${host} in tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" tmake_file="$tmake_file t-slibgcc-libgcc" - # NetBSD 1.7 and later are set up to use GCC's crtstuff for - # ELF configurations. We will clear extra_parts in the - # a.out configurations. - case ${host} in - *-*-netbsd*1.[7-9]* | *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*) - extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" - ;; - esac + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" ;; *-*-openbsd*) tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" @@ -312,6 +305,9 @@ case ${host} in tmake_file="vms/t-vms" extra_parts="crt0.o crtbegin.o crtbeginS.o crtend.o crtendS.o" ;; +*-*-vxworks7) + tmake_file=t-vxworks7 + ;; *-*-vxworks*) tmake_file=t-vxworks ;; @@ -387,7 +383,7 @@ arc*-*-elf*) extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o" extra_parts="$extra_parts crttls.o" ;; -arc*-*-linux-uclibc*) +arc*-*-linux*) tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc-uClibc arc/t-arc" extra_parts="$extra_parts crti.o crtn.o" extra_parts="$extra_parts crttls.o" @@ -585,12 +581,12 @@ hppa*-*-openbsd*) tmake_file="$tmake_file pa/t-openbsd" ;; i[34567]86-*-darwin*) - tmake_file="$tmake_file i386/t-crtpc t-crtfm" + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" tm_file="$tm_file i386/darwin-lib.h" extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" ;; x86_64-*-darwin*) - tmake_file="$tmake_file i386/t-crtpc t-crtfm" + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" tm_file="$tm_file i386/darwin-lib.h" extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" ;; @@ -667,12 +663,12 @@ i[34567]86-*-rtems*) extra_parts="$extra_parts crti.o crtn.o" ;; i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*) - tmake_file="$tmake_file i386/t-crtpc t-crtfm" + tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" tm_file="${tm_file} i386/elf-lib.h" md_unwind_header=i386/sol2-unwind.h ;; -i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae) +i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae|i[4567]86-wrs-vxworks7|x86_64-wrs-vxworks7) ;; i[34567]86-*-cygwin*) extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o" diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h index d5d6980442f..d46d5f53be3 100644 --- a/libgcc/config/aarch64/linux-unwind.h +++ b/libgcc/config/aarch64/linux-unwind.h @@ -55,7 +55,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context, struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; }; struct rt_sigframe *rt_; diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h index a91a5f4fe26..7202516581d 100644 --- a/libgcc/config/alpha/linux-unwind.h +++ b/libgcc/config/alpha/linux-unwind.h @@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context, { struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_ = context->cfa; sc = &rt_->uc.uc_mcontext; } diff --git a/libgcc/config/arm/lib1funcs.S b/libgcc/config/arm/lib1funcs.S index 89ebebcd68a..8d8c3cead5f 100644 --- a/libgcc/config/arm/lib1funcs.S +++ b/libgcc/config/arm/lib1funcs.S @@ -109,7 +109,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #endif #if defined(__ARM_ARCH_8A__) || defined(__ARM_ARCH_8M_BASE__) \ - || defined(__ARM_ARCH_8M_MAIN__) + || defined(__ARM_ARCH_8M_MAIN__) || defined(__ARM_ARCH_8R__) # define __ARM_ARCH__ 8 #endif diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h index 9412c7652b8..37e9feb6965 100644 --- a/libgcc/config/bfin/linux-unwind.h +++ b/libgcc/config/bfin/linux-unwind.h @@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context, void *puc; char retcode[8]; siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_ = context->cfa; /* The void * cast is necessary to avoid an aliasing warning. diff --git a/libgcc/config/i386/dragonfly-unwind.h b/libgcc/config/i386/dragonfly-unwind.h index 18b90fcae56..ca1f46e92db 100644 --- a/libgcc/config/i386/dragonfly-unwind.h +++ b/libgcc/config/i386/dragonfly-unwind.h @@ -28,9 +28,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include <sys/types.h> #include <sys/sysctl.h> +#include <sys/param.h> #include <signal.h> #include <sys/ucontext.h> #include <machine/sigframe.h> +#if __DragonFly_version > 400800 +#include <sys/kinfo.h> +#endif #define REG_NAME(reg) sf_uc.uc_mcontext.mc_## reg @@ -39,20 +43,44 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define MD_FALLBACK_FRAME_STATE_FOR x86_64_dragonfly_fallback_frame_state -static void -x86_64_sigtramp_range (unsigned char **start, unsigned char **end) +static int +x86_64_outside_sigtramp_range (unsigned char *pc) { - unsigned long ps_strings; - int mib[2]; - size_t len; - - mib[0] = CTL_KERN; - mib[1] = KERN_PS_STRINGS; - len = sizeof (ps_strings); - sysctl (mib, 2, &ps_strings, &len, NULL, 0); - - *start = (unsigned char *)ps_strings - 32; - *end = (unsigned char *)ps_strings; + static int sigtramp_range_determined = 0; + static unsigned char *sigtramp_start, *sigtramp_end; + + if (sigtramp_range_determined == 0) + { +#if __DragonFly_version > 400800 + struct kinfo_sigtramp kst = {0}; + size_t len = sizeof (kst); + int mib[3] = { CTL_KERN, KERN_PROC, KERN_PROC_SIGTRAMP }; + + sigtramp_range_determined = 1; + if (sysctl (mib, 3, &kst, &len, NULL, 0) == 0) + { + sigtramp_range_determined = 2; + sigtramp_start = kst.ksigtramp_start; + sigtramp_end = kst.ksigtramp_end; + } +#else + unsigned long ps_strings; + size_t len = sizeof (ps_strings); + int mib[2] = { CTL_KERN, KERN_PS_STRINGS }; + + sigtramp_range_determined = 1; + if (sysctl (mib, 2, &ps_strings, &len, NULL, 0) == 0) + { + sigtramp_range_determined = 2; + sigtramp_start = (unsigned char *)ps_strings - 32; + sigtramp_end = (unsigned char *)ps_strings; + } +#endif + } + if (sigtramp_range_determined < 2) /* sysctl failed if < 2 */ + return 1; + + return (pc < sigtramp_start || pc >= sigtramp_end ); } @@ -60,13 +88,10 @@ static _Unwind_Reason_Code x86_64_dragonfly_fallback_frame_state (struct _Unwind_Context *context, _Unwind_FrameState *fs) { - unsigned char *pc = context->ra; - unsigned char *sigtramp_start, *sigtramp_end; struct sigframe *sf; long new_cfa; - x86_64_sigtramp_range(&sigtramp_start, &sigtramp_end); - if (pc >= sigtramp_end || pc < sigtramp_start) + if (x86_64_outside_sigtramp_range(context->ra)) return _URC_END_OF_STACK; sf = (struct sigframe *) context->cfa; diff --git a/libgcc/config/i386/i386-asm.h b/libgcc/config/i386/i386-asm.h index c613e9fd83d..1387fd24b4f 100644 --- a/libgcc/config/i386/i386-asm.h +++ b/libgcc/config/i386/i386-asm.h @@ -26,22 +26,45 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #ifndef I386_ASM_H #define I386_ASM_H +#include "auto-host.h" + +/* These macros currently support GNU/Linux, Solaris and Darwin. */ + #ifdef __ELF__ -# define ELFFN(fn) .type fn,@function +# define FN_TYPE(fn) .type fn,@function +# define FN_SIZE(fn) .size fn,.-fn +# ifdef HAVE_GAS_HIDDEN +# define FN_HIDDEN(fn) .hidden fn +# endif +#else +# define FN_TYPE(fn) +# define FN_SIZE(fn) +#endif + +#ifndef FN_HIDDEN +# define FN_HIDDEN(fn) +#endif + +#ifdef __USER_LABEL_PREFIX__ +# define ASMNAME2(prefix, name) prefix ## name +# define ASMNAME1(prefix, name) ASMNAME2(prefix, name) +# define ASMNAME(name) ASMNAME1(__USER_LABEL_PREFIX__, name) #else -# define ELFFN(fn) +# define ASMNAME(name) name #endif -#define FUNC_START(fn) \ - .global fn; \ - ELFFN (fn); \ -fn: +#define FUNC_BEGIN(fn) \ + .globl ASMNAME(fn); \ + FN_TYPE (ASMNAME(fn)); \ +ASMNAME(fn): -#define HIDDEN_FUNC(fn)\ - FUNC_START (fn) \ - .hidden fn; \ +#define HIDDEN_FUNC(fn) \ + .globl ASMNAME(fn); \ + FN_TYPE(ASMNAME(fn)); \ + FN_HIDDEN(ASMNAME(fn)); \ +ASMNAME(fn): -#define FUNC_END(fn) .size fn,.-fn +#define FUNC_END(fn) FN_SIZE(ASMNAME(fn)) #ifdef __SSE2__ # ifdef __AVX__ @@ -51,32 +74,30 @@ fn: # endif /* Save SSE registers 6-15. off is the offset of rax to get to xmm6. */ -.macro SSE_SAVE off=0 - MOVAPS %xmm15,(\off - 0x90)(%rax) - MOVAPS %xmm14,(\off - 0x80)(%rax) - MOVAPS %xmm13,(\off - 0x70)(%rax) - MOVAPS %xmm12,(\off - 0x60)(%rax) - MOVAPS %xmm11,(\off - 0x50)(%rax) - MOVAPS %xmm10,(\off - 0x40)(%rax) - MOVAPS %xmm9, (\off - 0x30)(%rax) - MOVAPS %xmm8, (\off - 0x20)(%rax) - MOVAPS %xmm7, (\off - 0x10)(%rax) - MOVAPS %xmm6, \off(%rax) -.endm +#define SSE_SAVE \ + MOVAPS %xmm15,-0x30(%rax); \ + MOVAPS %xmm14,-0x20(%rax); \ + MOVAPS %xmm13,-0x10(%rax); \ + MOVAPS %xmm12, (%rax); \ + MOVAPS %xmm11, 0x10(%rax); \ + MOVAPS %xmm10, 0x20(%rax); \ + MOVAPS %xmm9, 0x30(%rax); \ + MOVAPS %xmm8, 0x40(%rax); \ + MOVAPS %xmm7, 0x50(%rax); \ + MOVAPS %xmm6, 0x60(%rax) /* Restore SSE registers 6-15. off is the offset of rsi to get to xmm6. */ -.macro SSE_RESTORE off=0 - MOVAPS (\off - 0x90)(%rsi), %xmm15 - MOVAPS (\off - 0x80)(%rsi), %xmm14 - MOVAPS (\off - 0x70)(%rsi), %xmm13 - MOVAPS (\off - 0x60)(%rsi), %xmm12 - MOVAPS (\off - 0x50)(%rsi), %xmm11 - MOVAPS (\off - 0x40)(%rsi), %xmm10 - MOVAPS (\off - 0x30)(%rsi), %xmm9 - MOVAPS (\off - 0x20)(%rsi), %xmm8 - MOVAPS (\off - 0x10)(%rsi), %xmm7 - MOVAPS \off(%rsi), %xmm6 -.endm +#define SSE_RESTORE \ + MOVAPS -0x30(%rsi), %xmm15; \ + MOVAPS -0x20(%rsi), %xmm14; \ + MOVAPS -0x10(%rsi), %xmm13; \ + MOVAPS (%rsi), %xmm12; \ + MOVAPS 0x10(%rsi), %xmm11; \ + MOVAPS 0x20(%rsi), %xmm10; \ + MOVAPS 0x30(%rsi), %xmm9 ; \ + MOVAPS 0x40(%rsi), %xmm8 ; \ + MOVAPS 0x50(%rsi), %xmm7 ; \ + MOVAPS 0x60(%rsi), %xmm6 #endif /* __SSE2__ */ #endif /* I386_ASM_H */ diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h index b1d5040a687..2009ad72260 100644 --- a/libgcc/config/i386/linux-unwind.h +++ b/libgcc/config/i386/linux-unwind.h @@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context, if (*(unsigned char *)(pc+0) == 0x48 && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL) { - struct ucontext *uc_ = context->cfa; + ucontext_t *uc_ = context->cfa; /* The void * cast is necessary to avoid an aliasing warning. The aliasing warning is correct, but should not be a problem because it does not alias anything. */ @@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context, siginfo_t *pinfo; void *puc; siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_ = context->cfa; /* The void * cast is necessary to avoid an aliasing warning. The aliasing warning is correct, but should not be a problem diff --git a/libgcc/config/i386/resms64.S b/libgcc/config/i386/resms64.S index f47e2f066fb..f842c20a77a 100644 --- a/libgcc/config/i386/resms64.S +++ b/libgcc/config/i386/resms64.S @@ -43,7 +43,7 @@ HIDDEN_FUNC(__resms64_13) mov -0x48(%rsi),%rbx HIDDEN_FUNC(__resms64_12) mov -0x40(%rsi),%rdi - SSE_RESTORE off=0x60 + SSE_RESTORE mov -0x38(%rsi),%rsi ret FUNC_END(__resms64_12) diff --git a/libgcc/config/i386/resms64f.S b/libgcc/config/i386/resms64f.S index 817da60cf15..81946cda944 100644 --- a/libgcc/config/i386/resms64f.S +++ b/libgcc/config/i386/resms64f.S @@ -42,7 +42,7 @@ HIDDEN_FUNC(__resms64f_13) mov -0x48(%rsi),%rbx HIDDEN_FUNC(__resms64f_12) mov -0x40(%rsi),%rdi - SSE_RESTORE off=0x60 + SSE_RESTORE mov -0x38(%rsi),%rsi ret FUNC_END(__resms64f_12) diff --git a/libgcc/config/i386/resms64fx.S b/libgcc/config/i386/resms64fx.S index 5dba5848dee..acf34fa0837 100644 --- a/libgcc/config/i386/resms64fx.S +++ b/libgcc/config/i386/resms64fx.S @@ -43,7 +43,7 @@ HIDDEN_FUNC(__resms64fx_13) mov -0x48(%rsi),%rbx HIDDEN_FUNC(__resms64fx_12) mov -0x40(%rsi),%rdi - SSE_RESTORE off=0x60 + SSE_RESTORE mov -0x38(%rsi),%rsi leaveq ret diff --git a/libgcc/config/i386/resms64x.S b/libgcc/config/i386/resms64x.S index 7770447cf38..e27aab7d881 100644 --- a/libgcc/config/i386/resms64x.S +++ b/libgcc/config/i386/resms64x.S @@ -44,7 +44,7 @@ HIDDEN_FUNC(__resms64x_13) mov -0x48(%rsi),%rbx HIDDEN_FUNC(__resms64x_12) mov -0x40(%rsi),%rdi - SSE_RESTORE off=0x60 + SSE_RESTORE mov -0x38(%rsi),%rsi mov %r10,%rsp ret diff --git a/libgcc/config/i386/savms64.S b/libgcc/config/i386/savms64.S index 2067dd8614f..44dda46ec54 100644 --- a/libgcc/config/i386/savms64.S +++ b/libgcc/config/i386/savms64.S @@ -44,7 +44,7 @@ HIDDEN_FUNC(__savms64_13) HIDDEN_FUNC(__savms64_12) mov %rdi,-0x40(%rax) mov %rsi,-0x38(%rax) - SSE_SAVE off=0x60 + SSE_SAVE ret FUNC_END(__savms64_12) FUNC_END(__savms64_13) diff --git a/libgcc/config/i386/savms64f.S b/libgcc/config/i386/savms64f.S index 81583b6eb68..64e91ac0394 100644 --- a/libgcc/config/i386/savms64f.S +++ b/libgcc/config/i386/savms64f.S @@ -43,7 +43,7 @@ HIDDEN_FUNC(__savms64f_13) HIDDEN_FUNC(__savms64f_12) mov %rdi,-0x40(%rax) mov %rsi,-0x38(%rax) - SSE_SAVE off=0x60 + SSE_SAVE ret FUNC_END(__savms64f_12) FUNC_END(__savms64f_13) diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h index 82c7a297a6d..9ea39d454aa 100644 --- a/libgcc/config/m68k/linux-unwind.h +++ b/libgcc/config/m68k/linux-unwind.h @@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* <sys/ucontext.h> is unfortunately broken right now. */ struct uw_ucontext { unsigned long uc_flags; - struct ucontext *uc_link; + ucontext_t *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; unsigned long uc_filler[80]; diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h index ae82efd6de6..204359d7b92 100644 --- a/libgcc/config/nios2/linux-unwind.h +++ b/libgcc/config/nios2/linux-unwind.h @@ -38,7 +38,7 @@ struct nios2_mcontext { struct nios2_ucontext { unsigned long uc_flags; - struct ucontext *uc_link; + ucontext_t *uc_link; stack_t uc_stack; struct nios2_mcontext uc_mcontext; sigset_t uc_sigmask; /* mask last for extensibility */ diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h index 580c18dad69..c2c3409bcc1 100644 --- a/libgcc/config/pa/linux-unwind.h +++ b/libgcc/config/pa/linux-unwind.h @@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context, struct sigcontext *sc; struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *frame; /* rt_sigreturn trampoline: diff --git a/libgcc/config/riscv/linux-unwind.h b/libgcc/config/riscv/linux-unwind.h index a051a2869d4..1c8aeff7ef0 100644 --- a/libgcc/config/riscv/linux-unwind.h +++ b/libgcc/config/riscv/linux-unwind.h @@ -42,7 +42,7 @@ riscv_fallback_frame_state (struct _Unwind_Context *context, struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; }; struct rt_sigframe *rt_; diff --git a/libgcc/config/rs6000/float128-ifunc.c b/libgcc/config/rs6000/float128-ifunc.c index e456ab13ce8..882c56ef21e 100644 --- a/libgcc/config/rs6000/float128-ifunc.c +++ b/libgcc/config/rs6000/float128-ifunc.c @@ -45,47 +45,7 @@ #error "This module must not be compiled with IEEE 128-bit hardware support" #endif -#include <sys/auxv.h> - -/* Use the namespace clean version of getauxval. However, not all versions of - sys/auxv.h declare it, so declare it here. This code is intended to be - temporary until a suitable version of __builtin_cpu_supports is added that - allows us to tell quickly if the machine supports IEEE 128-bit hardware. */ -extern unsigned long __getauxval (unsigned long); - -static int -have_ieee_hw_p (void) -{ - static int ieee_hw_p = -1; - - if (ieee_hw_p < 0) - { - char *p = (char *) __getauxval (AT_PLATFORM); - - ieee_hw_p = 0; - - /* Don't use atoi/strtol/strncmp/etc. These may require the normal - environment to be setup to set errno to 0, and the ifunc resolvers run - before the whole glibc environment is initialized. */ - if (p && p[0] == 'p' && p[1] == 'o' && p[2] == 'w' && p[3] == 'e' - && p[4] == 'r') - { - long n = 0; - char ch; - - p += 5; - while ((ch = *p++) >= '0' && (ch <= '9')) - n = (n * 10) + (ch - '0'); - - if (n >= 9) - ieee_hw_p = 1; - } - } - - return ieee_hw_p; -} - -#define SW_OR_HW(SW, HW) (have_ieee_hw_p () ? HW : SW) +#define SW_OR_HW(SW, HW) (__builtin_cpu_supports ("ieee128") ? HW : SW) /* Resolvers. */ diff --git a/libgcc/config/rs6000/ibm-ldouble.c b/libgcc/config/rs6000/ibm-ldouble.c index 949b50c98ca..e99652e523f 100644 --- a/libgcc/config/rs6000/ibm-ldouble.c +++ b/libgcc/config/rs6000/ibm-ldouble.c @@ -45,7 +45,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see This code currently assumes the most significant double is in the lower numbered register or lower addressed memory. */ -#if defined (__MACH__) || defined (__powerpc__) || defined (_AIX) +#if (defined (__MACH__) || defined (__powerpc__) || defined (_AIX)) \ + && !defined (__rtems__) #define fabs(x) __builtin_fabs(x) #define isless(x, y) __builtin_isless (x, y) diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h index 1038caeb5c3..a8c98220282 100644 --- a/libgcc/config/sh/linux-unwind.h +++ b/libgcc/config/sh/linux-unwind.h @@ -82,7 +82,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context, { struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_ = context->cfa; /* The void * cast is necessary to avoid an aliasing warning. The aliasing warning is correct, but should not be a problem diff --git a/libgcc/config/t-vxworks7 b/libgcc/config/t-vxworks7 new file mode 100644 index 00000000000..77591cd642c --- /dev/null +++ b/libgcc/config/t-vxworks7 @@ -0,0 +1,16 @@ +# Don't build libgcc.a with debug info +LIBGCC2_DEBUG_CFLAGS = + +# Extra libgcc2 modules used by gthr-vxworks.h functions +LIB2ADDEH += $(srcdir)/config/vxlib.c $(srcdir)/config/vxlib-tls.c + +# This ensures that the correct target headers are used; some +# VxWorks system headers have names that collide with GCC's +# internal (host) headers, e.g. regs.h. +LIBGCC2_INCLUDES = -nostdinc \ + -I$(VSB_DIR)/h -I$(VSB_DIR)/share/h \ + `case "/$(MULTIDIR)" in \ + */mrtp*) echo -I$(VSB_DIR)/usr/h/public -I$(VSB_DIR)/usr/h ;; \ + *) echo -I$(VSB_DIR)/krnl/h/system -I$(VSB_DIR)/krnl/h/public ;; \ + esac` + diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h index a8dc4405715..dba3b410279 100644 --- a/libgcc/config/tilepro/linux-unwind.h +++ b/libgcc/config/tilepro/linux-unwind.h @@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context, struct rt_sigframe { unsigned char save_area[C_ABI_SAVE_AREA_SIZE]; siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_; /* Return if this is not a signal handler. */ diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h index 67c272820d0..2cb9eb1f739 100644 --- a/libgcc/config/xtensa/linux-unwind.h +++ b/libgcc/config/xtensa/linux-unwind.h @@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context, struct rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; } *rt_; /* movi a2, __NR_rt_sigreturn; syscall */ diff --git a/libgcc/configure b/libgcc/configure index 42dda7fbeec..15d34b27cc0 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -4975,10 +4975,10 @@ esac esac case ${host} in -# At present, we cannot turn -mfloat128 on via #pragma GCC target, -# so just check if we have VSX (ISA 2.06) support to build the -# software libraries, and whether the assembler can handle xsaddqp -# for hardware support. +# At present, we cannot turn -mfloat128 on via #pragma GCC target, so just +# check if we have VSX (ISA 2.06) support to build the software libraries, and +# whether the assembler can handle xsaddqp for hardware support. Also check if +# a new glibc is being used so that __builtin_cpu_supports can be used. powerpc*-*-linux*) saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128" @@ -5013,6 +5013,9 @@ else #ifndef AT_PLATFORM #error "AT_PLATFORM is not defined" #endif + #ifndef __BUILTIN_CPU_SUPPORTS__ + #error "__builtin_cpu_supports is not available" + #endif vector unsigned char add (vector unsigned char a, vector unsigned char b) { vector unsigned char ret; diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 6bcaad651ff..da499716f8c 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -376,10 +376,10 @@ esac esac case ${host} in -# At present, we cannot turn -mfloat128 on via #pragma GCC target, -# so just check if we have VSX (ISA 2.06) support to build the -# software libraries, and whether the assembler can handle xsaddqp -# for hardware support. +# At present, we cannot turn -mfloat128 on via #pragma GCC target, so just +# check if we have VSX (ISA 2.06) support to build the software libraries, and +# whether the assembler can handle xsaddqp for hardware support. Also check if +# a new glibc is being used so that __builtin_cpu_supports can be used. powerpc*-*-linux*) saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128" @@ -398,6 +398,9 @@ powerpc*-*-linux*) #ifndef AT_PLATFORM #error "AT_PLATFORM is not defined" #endif + #ifndef __BUILTIN_CPU_SUPPORTS__ + #error "__builtin_cpu_supports is not available" + #endif vector unsigned char add (vector unsigned char a, vector unsigned char b) { vector unsigned char ret; |