From e4b887cb7652f5749cbd3a6ac8327cf308c70aba Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Thu, 5 Mar 2020 15:05:43 +0000 Subject: Add include-fixed to include search paths for libgcc on VxWorks The special vxworks rules for the compilation of libgcc had -I.../gcc/include and not .../gcc/include-fixed, causing build failure of our arm-vxworks7r2 port because of indirect dependencies on limits.h. The omission was just an oversight and this change just adds the missing -I. 2020-10-14 Olivier Hainque libgcc/ * config/t-vxworks: Add include-fixed to include search paths for libgcc on VxWorks. * config/t-vxworks7: Likewise. --- libgcc/config/t-vxworks | 1 + libgcc/config/t-vxworks7 | 1 + 2 files changed, 2 insertions(+) (limited to 'libgcc') diff --git a/libgcc/config/t-vxworks b/libgcc/config/t-vxworks index 757cead..e1f1e93 100644 --- a/libgcc/config/t-vxworks +++ b/libgcc/config/t-vxworks @@ -12,6 +12,7 @@ LIB2ADD += $(srcdir)/config/vxcache.c # prevail (e.g. unwind.h), and that gcc provided header files intended # to be user visible eventually are visible as well. LIBGCC2_INCLUDES = -nostdinc -I. \ + -I$(MULTIBUILDTOP)../../gcc/include-fixed \ -I$(MULTIBUILDTOP)../../gcc/include \ `case "/$(MULTIDIR)" in \ */mrtp*) echo -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip ;; \ diff --git a/libgcc/config/t-vxworks7 b/libgcc/config/t-vxworks7 index f2cc904..75f6cb4 100644 --- a/libgcc/config/t-vxworks7 +++ b/libgcc/config/t-vxworks7 @@ -12,6 +12,7 @@ LIB2ADD += $(srcdir)/config/vxcache.c # prevail (e.g. unwind.h), and that gcc provided header files intended # to be user visible eventually are visible as well. LIBGCC2_INCLUDES = -nostdinc -I. \ + -I$(MULTIBUILDTOP)../../gcc/include-fixed \ -I$(VSB_DIR)/h -I$(VSB_DIR)/share/h \ -I$(MULTIBUILDTOP)../../gcc/include \ `case "/$(MULTIDIR)" in \ -- cgit v1.1 From 69d6b3f650e73f272766a0c370b246a86c6a8d39 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Fri, 26 Jun 2020 16:29:42 +0000 Subject: Honor $(MULTISUBDIR) in -I directives for libgcc on VxWorks This is useful to handle ports where we might arrange to use different sets of fixed headers for different multilibs, typically for kernel vs rtp modes. 2020-10-14 Olivier Hainque libgcc/ * config/t-vxworks (LIBGCC2_INCLUDES): Append $(MULTISUBDIR) to the -I path for fixed headers, as we arrange to have different sets of such headers for different multilibs when they are activated. * config/t-vxworks7: Likewise. --- libgcc/config/t-vxworks | 2 +- libgcc/config/t-vxworks7 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libgcc') diff --git a/libgcc/config/t-vxworks b/libgcc/config/t-vxworks index e1f1e93..02e2efa 100644 --- a/libgcc/config/t-vxworks +++ b/libgcc/config/t-vxworks @@ -12,7 +12,7 @@ LIB2ADD += $(srcdir)/config/vxcache.c # prevail (e.g. unwind.h), and that gcc provided header files intended # to be user visible eventually are visible as well. LIBGCC2_INCLUDES = -nostdinc -I. \ - -I$(MULTIBUILDTOP)../../gcc/include-fixed \ + -I$(MULTIBUILDTOP)../../gcc/include-fixed$(MULTISUBDIR) \ -I$(MULTIBUILDTOP)../../gcc/include \ `case "/$(MULTIDIR)" in \ */mrtp*) echo -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip ;; \ diff --git a/libgcc/config/t-vxworks7 b/libgcc/config/t-vxworks7 index 75f6cb4..20c72f4 100644 --- a/libgcc/config/t-vxworks7 +++ b/libgcc/config/t-vxworks7 @@ -12,7 +12,7 @@ LIB2ADD += $(srcdir)/config/vxcache.c # prevail (e.g. unwind.h), and that gcc provided header files intended # to be user visible eventually are visible as well. LIBGCC2_INCLUDES = -nostdinc -I. \ - -I$(MULTIBUILDTOP)../../gcc/include-fixed \ + -I$(MULTIBUILDTOP)../../gcc/include-fixed$(MULTISUBDIR) \ -I$(VSB_DIR)/h -I$(VSB_DIR)/share/h \ -I$(MULTIBUILDTOP)../../gcc/include \ `case "/$(MULTIDIR)" in \ -- cgit v1.1 From 8f8cba46b89ad16bac2ce58d554c25b54b0e7c7f Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 7 Jul 2020 02:47:53 -0300 Subject: Rework the condition variables support for VxWorks This change reworks the condition variables support for VxWorks to address the very legit points raised by Rasmus in https://gcc.gnu.org/pipermail/gcc/2020-May/232524.html While some of the issues were taken care of by the use of semFlush, a few others were indeed calling for adjustments. We first considered resorting to the condvarLib library available in VxWorks7. Unfortunately, it is vx7 only and we wanted something working for at least vx 6.9 as well. It also turned out requiring the use of recursive mutexes for condVarWait, which seemed unnecessarily constraining. Instead, this change corrects the sequencing logic in a few places and leverages the semExchange API to ensure the key atomicity requirement on cond_wait operations. 2020-10-14 Alexandre Oliva libgcc/ * config/gthr-vxworks-thread.c: Include stdlib.h. (tls_delete_hook): Prototype it. (__gthread_cond_signal): Return early if no waiters. Consume signal in case the semaphore got full. Use semInfoGet instead of kernel-mode-only semInfo. (__gthread_cond_timedwait): Use semExchange. Always take the mutex again before returning. * config/gthr-vxworks-cond.c (__ghtread_cond_wait): Likewise. --- libgcc/config/gthr-vxworks-cond.c | 6 ++--- libgcc/config/gthr-vxworks-thread.c | 53 +++++++++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 12 deletions(-) (limited to 'libgcc') diff --git a/libgcc/config/gthr-vxworks-cond.c b/libgcc/config/gthr-vxworks-cond.c index d65d07a..65f0a6a 100644 --- a/libgcc/config/gthr-vxworks-cond.c +++ b/libgcc/config/gthr-vxworks-cond.c @@ -66,13 +66,11 @@ __gthread_cond_wait (__gthread_cond_t *cond, if (!mutex) return ERROR; - __RETURN_ERRNO_IF_NOT_OK (semGive (*mutex)); - - __RETURN_ERRNO_IF_NOT_OK (semTake (*cond, WAIT_FOREVER)); + int ret = __CHECK_RESULT (semExchange (*mutex, *cond, WAIT_FOREVER)); __RETURN_ERRNO_IF_NOT_OK (semTake (*mutex, WAIT_FOREVER)); - return OK; + return ret; } int diff --git a/libgcc/config/gthr-vxworks-thread.c b/libgcc/config/gthr-vxworks-thread.c index 8544b03..8e26d85 100644 --- a/libgcc/config/gthr-vxworks-thread.c +++ b/libgcc/config/gthr-vxworks-thread.c @@ -29,6 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "gthr.h" #include +#include #define __TIMESPEC_TO_NSEC(timespec) \ ((long long)timespec.tv_sec * 1000000000 + (long long)timespec.tv_nsec) @@ -38,7 +39,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see / 1000000000) #ifdef __RTP__ - void tls_delete_hook (); + void tls_delete_hook (void); #define __CALL_DELETE_HOOK(tcb) tls_delete_hook() #else /* In kernel mode, we need to pass the TCB to task_delete_hook. The TCB is @@ -47,17 +48,55 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define __CALL_DELETE_HOOK(tcb) tls_delete_hook((WIND_TCB *) ((tcb)->task_id)) #endif -/* -------------------- Timed Condition Variables --------------------- */ - int __gthread_cond_signal (__gthread_cond_t *cond) { if (!cond) return ERROR; - return __CHECK_RESULT (semGive (*cond)); + /* If nobody is waiting, skip the semGive altogether: no one can get + in line while we hold the mutex associated with *COND. We could + skip this test altogether, but it's presumed cheaper than going + through the give and take below, and that a signal without a + waiter occurs often enough for the test to be worth it. */ + SEM_INFO info; + memset (&info, 0, sizeof (info)); + __RETURN_ERRNO_IF_NOT_OK (semInfoGet (*cond, &info)); + if (info.numTasks == 0) + return OK; + + int ret = __CHECK_RESULT (semGive (*cond)); + + /* It might be the case, however, that when we called semInfo, there + was a waiter just about to timeout, and by the time we called + semGive, it had already timed out, so our semGive would leave the + *cond semaphore full, so the next caller of wait would pass + through. We don't want that. So, make sure we leave the + semaphore empty. Despite the window in which the semaphore will + be full, this works because: + + - we're holding the mutex, so nobody else can semGive, and any + pending semTakes are actually within semExchange. there might + be others blocked to acquire the mutex, but those are not + relevant for the analysis. + + - if there was another non-timed out waiter, semGive will wake it + up immediately instead of leaving the semaphore full, so the + semTake below will time out, and the semantics are as expected + + - otherwise, if all waiters timed out before the semGive (or if + there weren't any to begin with), our semGive completed leaving + the semaphore full, and our semTake below will consume it + before any other waiter has a change to reach the semExchange, + because we're holding the mutex. */ + if (ret == OK) + semTake (*cond, NO_WAIT); + + return ret; } +/* -------------------- Timed Condition Variables --------------------- */ + int __gthread_cond_timedwait (__gthread_cond_t *cond, __gthread_mutex_t *mutex, @@ -93,13 +132,11 @@ __gthread_cond_timedwait (__gthread_cond_t *cond, if (waiting_ticks > INT_MAX) waiting_ticks = INT_MAX; - __RETURN_ERRNO_IF_NOT_OK (semGive (*mutex)); - - __RETURN_ERRNO_IF_NOT_OK (semTake (*cond, waiting_ticks)); + int ret = __CHECK_RESULT (semExchange (*mutex, *cond, waiting_ticks)); __RETURN_ERRNO_IF_NOT_OK (semTake (*mutex, WAIT_FOREVER)); - return OK; + return ret; } /* --------------------------- Timed Mutexes ------------------------------ */ -- cgit v1.1 From b2698c21f2cdbe579bd0271cca8dc7fba7a3dc25 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 15 Oct 2020 00:16:34 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 83332b7..d96a68e 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,28 @@ +2020-10-14 Alexandre Oliva + + * config/gthr-vxworks-thread.c: Include stdlib.h. + (tls_delete_hook): Prototype it. + (__gthread_cond_signal): Return early if no waiters. Consume + signal in case the semaphore got full. Use semInfoGet instead + of kernel-mode-only semInfo. + (__gthread_cond_timedwait): Use semExchange. Always take the + mutex again before returning. + * config/gthr-vxworks-cond.c (__ghtread_cond_wait): Likewise. + +2020-10-14 Olivier Hainque + + * config/t-vxworks (LIBGCC2_INCLUDES): Append + $(MULTISUBDIR) to the -I path for fixed headers, as we + arrange to have different sets of such headers for different + multilibs when they are activated. + * config/t-vxworks7: Likewise. + +2020-10-14 Olivier Hainque + + * config/t-vxworks: Add include-fixed to include search + paths for libgcc on VxWorks. + * config/t-vxworks7: Likewise. + 2020-10-09 H.J. Lu PR target/97148 -- cgit v1.1 From 2d23fd23bbb84a6ea87cb8c77699261d6ae8100e Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Thu, 15 Oct 2020 17:39:05 +0000 Subject: Fix the vxworks crtstuff handling of kernel/rtp variations The ports that support RTPs achieve the kernel/rtp compilation and link distinction through the multilib mechanism. This patch just removes the bogus explicit extraneous materialization of this distinction in the common VxWorks configuration files and leaves the rtp specialization all to the multilib machinery. 2020-10-15 Olivier Hainque libgcc/ * config/t-vxcrtstuff: Remove the -kernel/-rtp specialization. gcc/ * config/vxworks.h (VX_CRTBEGIN_SPEC): Likewise. --- libgcc/config/t-vxcrtstuff | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libgcc') diff --git a/libgcc/config/t-vxcrtstuff b/libgcc/config/t-vxcrtstuff index 96b7285..ef64951 100644 --- a/libgcc/config/t-vxcrtstuff +++ b/libgcc/config/t-vxcrtstuff @@ -1,12 +1,12 @@ -# crtbegin/crtend for VxWorks (DKM or RTP) +# crtbegin/crtend for VxWorks -vx_crtbegin-kernel.o: $(srcdir)/config/vxcrtstuff.c +vx_crtbegin.o: $(srcdir)/config/vxcrtstuff.c $(crt_compile) $(CRTSTUFF_T_CFLAGS) -DCRT_BEGIN -c $< -vx_crtbegin-rtp.o: $(srcdir)/config/vxcrtstuff.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS) -DCRT_BEGIN -c $< -mrtp - vx_crtend.o: $(srcdir)/config/vxcrtstuff.c $(crt_compile) $(CRTSTUFF_T_CFLAGS) -DCRT_END -c $< -EXTRA_PARTS += vx_crtbegin-kernel.o vx_crtbegin-rtp.o vx_crtend.o +# We do pretty different things for kernel vs rtp modes, all +# controlled thanks to __RTP__ and (optional) multilibs. + +EXTRA_PARTS += vx_crtbegin.o vx_crtend.o -- cgit v1.1 From 4cde835fd7add8979ab92fd27ee7efcea235f763 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Fri, 2 Oct 2020 12:58:45 +0000 Subject: Stub out VX_ENTER_TLS_DTOR for VxWorks != 6 As of today, the __gthread_enter/leave entry points are only meaningful on VxWorks 6. Refactor the VX_ENTER_TLS_DTOR macros accordingly. 2020-10-15 Rasmus Villemoes libgcc/ * config/gthr-vxworks-tls.c (VX_ENTER_TLS_DTOR): Nil except on VxWorks 6. Co-authored-by: Olivier Hainque --- libgcc/config/gthr-vxworks-tls.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'libgcc') diff --git a/libgcc/config/gthr-vxworks-tls.c b/libgcc/config/gthr-vxworks-tls.c index fac25e3..8987e55 100644 --- a/libgcc/config/gthr-vxworks-tls.c +++ b/libgcc/config/gthr-vxworks-tls.c @@ -94,7 +94,9 @@ static int self_owner; static volatile int delete_hook_installed; /* TLS data access internal API. A straight __thread variable starting with - VxWorks 7, a pointer returned by kernel provided routines otherwise. */ + VxWorks 7, a pointer returned by kernel provided routines otherwise. And + on VxWorks 6, the kernel expects us to notify entry/exit of regions + handling such variables by calls to kernel provided __gthread routines. */ #if _VXWORKS_MAJOR_GE(7) @@ -103,23 +105,29 @@ static __thread struct tls_data *__gthread_tls_data; #define VX_GET_TLS_DATA() __gthread_tls_data #define VX_SET_TLS_DATA(x) __gthread_tls_data = (x) -#define VX_ENTER_TLS_DTOR() -#define VX_LEAVE_TLS_DTOR() - #else extern void *__gthread_get_tls_data (void); extern void __gthread_set_tls_data (void *data); -extern void __gthread_enter_tls_dtor_context (void); -extern void __gthread_leave_tls_dtor_context (void); - #define VX_GET_TLS_DATA() __gthread_get_tls_data() #define VX_SET_TLS_DATA(x) __gthread_set_tls_data(x) +#endif + +#ifdef _VXWORKS_MAJOR_EQ(6) + +extern void __gthread_enter_tls_dtor_context (void); +extern void __gthread_leave_tls_dtor_context (void); + #define VX_ENTER_TLS_DTOR() __gthread_enter_tls_dtor_context () #define VX_LEAVE_TLS_DTOR() __gthread_leave_tls_dtor_context () +#else + +#define VX_ENTER_TLS_DTOR() +#define VX_LEAVE_TLS_DTOR() + #endif /* This is a global structure which records all of the active keys. -- cgit v1.1 From 21295f44f312ec80fca3b15c0748937b5fb36663 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Fri, 2 Oct 2020 13:03:26 +0000 Subject: Fix leftover _VXW_PRE_69 in gthr-vxworks.h 2020-10-15 Rasmus Villemoes libgcc/ * config/gthr-vxworks.h: Rewrite remaining occurrence of _VXW_PRE_69 as _VXWORKS_PRE(6,9). --- libgcc/config/gthr-vxworks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h index 8b55fc5..e381747 100644 --- a/libgcc/config/gthr-vxworks.h +++ b/libgcc/config/gthr-vxworks.h @@ -286,7 +286,7 @@ typedef struct typedef __gthread_tcb *__gthread_t; /* Typedefs specific to different vxworks versions. */ -#if _VXW_PRE_69 +#if _VXWORKS_PRE(6,9) typedef int _Vx_usr_arg_t; #define TASK_ID_NULL ((TASK_ID)NULL) #define SEM_ID_NULL ((SEM_ID)NULL) -- cgit v1.1 From 0aeeda8fc2944e73b4bf50ee0da55f76baad3cf8 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Fri, 2 Oct 2020 13:27:19 +0000 Subject: Add missing #include in gthr-vxworks.c This fixes an oversight and addresses a few build time warnings. 2020-10-15 Rasmus Villemoes libgcc/ * config/gthr-vxworks.c: #include . --- libgcc/config/gthr-vxworks.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libgcc') diff --git a/libgcc/config/gthr-vxworks.c b/libgcc/config/gthr-vxworks.c index 9b47ec8..4e73108 100644 --- a/libgcc/config/gthr-vxworks.c +++ b/libgcc/config/gthr-vxworks.c @@ -33,6 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #if defined(__GTHREADS) #include +#include #ifndef __RTP__ # include -- cgit v1.1 From e94d5836e54558f78f1845de07db273611972c26 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Fri, 2 Oct 2020 15:26:26 +0000 Subject: Inhibit support for gthread condvars on VxWorks < 6 The condition variables support relies on kernel entry points to enforce critical aspects of it's expected behavior. Some of these entry points are not available prior to VxWorks 6, so we just expose absence of support for condition variables on such systems. 2020-10-15 Rasmus Villemoes libgcc/ * config/gthr-vxworks.h: Condition the __GTHREAD_HAS_COND section on VxWorks >= 6. * config/gthr-vxworks-cond.c: Condition the entire implementation on __GTHREAD_HAS_COND. --- libgcc/config/gthr-vxworks-cond.c | 4 ++++ libgcc/config/gthr-vxworks.h | 8 ++++++++ 2 files changed, 12 insertions(+) (limited to 'libgcc') diff --git a/libgcc/config/gthr-vxworks-cond.c b/libgcc/config/gthr-vxworks-cond.c index 65f0a6a..ba384b4 100644 --- a/libgcc/config/gthr-vxworks-cond.c +++ b/libgcc/config/gthr-vxworks-cond.c @@ -26,6 +26,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see This file implements the GTHREAD_HAS_COND part of the interface exposed by gthr-vxworks.h. */ +#if __GTHREAD_HAS_COND + #include "gthr.h" #include @@ -79,3 +81,5 @@ __gthread_cond_wait_recursive (__gthread_cond_t *cond, { return __gthread_cond_wait (cond, mutex); } + +#endif diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h index e381747..d49809a 100644 --- a/libgcc/config/gthr-vxworks.h +++ b/libgcc/config/gthr-vxworks.h @@ -234,6 +234,12 @@ extern int __gthread_setspecific (__gthread_key_t __key, void *__ptr); /* ------------------ Base condition variables support ------------------- */ +/* VxWorks prio to 6 misses a few services key to a correct + implementation of condition variables with reasonable complexity. + semExchange in particular. */ + +#if _VXWORKS_MAJOR_GE(6) + #define __GTHREAD_HAS_COND 1 typedef SEM_ID __gthread_cond_t; @@ -254,6 +260,8 @@ extern int __gthread_cond_wait (__gthread_cond_t *cond, extern int __gthread_cond_wait_recursive (__gthread_cond_t *cond, __gthread_recursive_mutex_t *mutex); +#endif + /* ----------------------- C++0x thread support ------------------------- */ /* We do not support C++0x threads on that VxWorks 653, which we can -- cgit v1.1 From a6590686f72e2a99d290b5e96e54e550446009de Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Fri, 2 Oct 2020 15:31:58 +0000 Subject: Inhibit support for C++0x threads on VxWorks < 6 As for condition variables, the C++0x threads support relies on VxWorks entry points not available in VxWorks versions prior to 6. We just expose absence of support for C++0x threads on such systems. 2020-10-15 Rasmus Villemoes libgcc/ * config/gthr-vxworks.h: Condition the ___GTHREADS_CXX0X section on VxWorks >= 6. * config/gthr-vxworks-thread.c: Condition the entire implementation on __GTHREAD_CXX0X. --- libgcc/config/gthr-vxworks-thread.c | 4 ++++ libgcc/config/gthr-vxworks.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'libgcc') diff --git a/libgcc/config/gthr-vxworks-thread.c b/libgcc/config/gthr-vxworks-thread.c index 8e26d85..a723005 100644 --- a/libgcc/config/gthr-vxworks-thread.c +++ b/libgcc/config/gthr-vxworks-thread.c @@ -27,6 +27,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see exposed by gthr-vxworks.h, using APIs exposed by regular (!AE/653) VxWorks kernels. */ +#if __GTHREAD_CXX0X + #include "gthr.h" #include #include @@ -384,3 +386,5 @@ __gthread_detach (__gthread_t __threadid) return OK; } + +#endif diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h index d49809a..beedf5e 100644 --- a/libgcc/config/gthr-vxworks.h +++ b/libgcc/config/gthr-vxworks.h @@ -267,7 +267,7 @@ extern int __gthread_cond_wait_recursive (__gthread_cond_t *cond, /* We do not support C++0x threads on that VxWorks 653, which we can recognize by VTHREADS being defined. */ -#ifndef VTHREADS +#if _VXWORKS_MAJOR_GE(6) && !defined(VTHREADS) #define __GTHREADS_CXX0X 1 @@ -330,7 +330,7 @@ extern int __gthread_detach (__gthread_t thread); extern __gthread_t __gthread_self (void); -#endif +#endif /* _VXWORKS_MAJOR_GE(6) && !defined(VTHREADS) */ #ifdef __cplusplus } -- cgit v1.1 From 56e4eee935c1ed31bff56aff0f498118e93c6d09 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 17 Oct 2020 00:16:29 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index d96a68e..d8cd432 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,36 @@ +2020-10-16 Rasmus Villemoes + + * config/gthr-vxworks.h: Condition the ___GTHREADS_CXX0X + section on VxWorks >= 6. + * config/gthr-vxworks-thread.c: Condition the entire + implementation on __GTHREAD_CXX0X. + +2020-10-16 Rasmus Villemoes + + * config/gthr-vxworks.h: Condition the __GTHREAD_HAS_COND + section on VxWorks >= 6. + * config/gthr-vxworks-cond.c: Condition the entire + implementation on __GTHREAD_HAS_COND. + +2020-10-16 Rasmus Villemoes + + * config/gthr-vxworks.c: #include . + +2020-10-16 Rasmus Villemoes + + * config/gthr-vxworks.h: Rewrite remaining occurrence + of _VXW_PRE_69 as _VXWORKS_PRE(6,9). + +2020-10-16 Rasmus Villemoes + Olivier Hainque + + * config/gthr-vxworks-tls.c (VX_ENTER_TLS_DTOR): Nil + except on VxWorks 6. + +2020-10-16 Olivier Hainque + + * config/t-vxcrtstuff: Remove the -kernel/-rtp specialization. + 2020-10-14 Alexandre Oliva * config/gthr-vxworks-thread.c: Include stdlib.h. -- cgit v1.1 From 178679809068c72f9f4c63e53afeab651f06b882 Mon Sep 17 00:00:00 2001 From: Douglas Rupp Date: Tue, 18 Feb 2020 09:54:58 +0000 Subject: Introduce vxworks7r2 support for ppc and ppc64 This change introduces support for the most recent versions of VxWorks on PowerPC targets, for both 32 and 64 bit thanks to a bi-arch setup. The system compilers are essentially configured as Linux toolchains with only a few specificities and we replicate that model here. The most visible specificities are the use of secureplt by default, the pre-definition of some macros that the system headers still rely on (_VX_CPU and _VX_CPU_FAMILY, for example), and of course some variations related to the so VxWorks typical kernel vs RTP mode distinction. In addition to the introduction of config.gcc and libgcc configuration chunks, much inspired by the linux ones, the change - Reworks rs6000/vxworks.h file to feature bits common to the Vx6 and Vx7 port then a separate section for each, where the Vx7 part is very short as we rely on the Linux definitions for most things. - Adjusts the CPU macro predefinitions in CPP_SPEC to resort to "_VX_CPU" instead of "CPU" for Vx7, to better match the more recent system headers expectations, - Adds a cpu definition case for e6500. - Changes to the use SUB3TARGET_OVERRIDE_OPTIONS instead of SUBSUBTARGET_OVERRIDE_OPTIONS for specifics, so we don't override the Linux's version of the latter for vx7. 2020-10-20 Douglas Rupp gcc/ * config.gcc (powerpc*-wrs-vxworks7r*): New case. * config/rs6000/vxworks.h: Rework to handle VxWorks7. Refactor as common bits + vx6 vs vx7 ones. For the latter, rely essentially on the Linux configuration and adjust CPU to _VX_CPU in CPP_SPEC. Add a case for e6500. Use SUB3TARGET_OVERRIDE_OPTIONS for specifics to preserve the Linux SUBSUBTARGET_OVERRIDE_OPTIONS for vx7. libgcc/ * config.host (powerpc*-wrs-vxworks7*): New case. * configure.ac: Handle powerpc*-*-vxworks7* as powerpc*-*-linux* for ppc-fp_type. * configure: Regenerate. Co-authored-by: Olivier Hainque --- libgcc/config.host | 17 +++++++++++++++++ libgcc/configure | 4 ++-- libgcc/configure.ac | 4 ++-- 3 files changed, 21 insertions(+), 4 deletions(-) (limited to 'libgcc') diff --git a/libgcc/config.host b/libgcc/config.host index dbb378f..fd8e55e 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -1226,6 +1226,23 @@ powerpc*-*-linux*) extra_parts="$extra_parts ecrti.o ecrtn.o ncrti.o ncrtn.o" md_unwind_header=rs6000/linux-unwind.h ;; +powerpc*-wrs-vxworks7*) + tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-linux t-dfprules config/rs6000/t-ppc64-fp t-slibgcc-libgcc" + case $ppc_fp_type in + 64) + ;; + hard) + tmake_file="${tmake_file} t-hardfp-sfdf" + ;; + soft) + tmake_file="${tmake_file} t-softfp-sfdf t-softfp" + ;; + *) + echo "Unknown ppc_fp_type $ppc_fp_type" 1>&2 + exit 1 + ;; + esac + ;; powerpc-wrs-vxworks*) tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfgpr t-fdpbit" extra_parts="$extra_parts crtbegin.o crtend.o" diff --git a/libgcc/configure b/libgcc/configure index 284e4db..78fc22a 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -5164,11 +5164,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibc_version_major.$glibc_version_minor" >&5 $as_echo "$glibc_version_major.$glibc_version_minor" >&6; } -# Determine floating-point type for powerpc*-*-linux*. +# Determine floating-point type for powerpc*-*-linux* or vxworks7*. # Single-precision-only FPRs are not a supported configuration for # this target, so are not allowed for in this test. case ${host} in -powerpc*-*-linux*) +powerpc*-*-linux* | powerpc*-*-vxworks7*) cat > conftest.c < conftest.c < Date: Thu, 22 Oct 2020 08:28:22 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index d8cd432..5b1faaf 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,11 @@ +2020-10-21 Douglas Rupp + Olivier Hainque + + * config.host (powerpc*-wrs-vxworks7*): New case. + * configure.ac: Handle powerpc*-*-vxworks7* as + powerpc*-*-linux* for ppc-fp_type. + * configure: Regenerate. + 2020-10-16 Rasmus Villemoes * config/gthr-vxworks.h: Condition the ___GTHREADS_CXX0X -- cgit v1.1 From 50bc94898fac1bd9cc1dabf227208fb5d369c4c4 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 23 Oct 2020 10:05:17 +0200 Subject: stor-layout: Reject forming arrays with elt sizes not divisible by elt alignment [PR97164] As mentioned in the PR, since 2005 we reject if array elements are smaller than their alignment (i.e. overaligned elements), because such arrays don't make much sense, only their first element is guaranteed to be aligned as user requested, but the next element can't be. The following testcases show something we've been silent about but is equally bad, the 2005 case is just the most common special case of that the array element size is not divisible by the alignment. In those arrays too only the first element is guaranteed to be properly aligned and the second one can't be. This patch rejects those cases too, but keeps the existing wording for the old common case. Unfortunately, the patch breaks bootstrap, because libbid uses this mess (forms arrays with 24 byte long elements with 16 byte element alignment). I don't really see justification for that, so I've decreased the alignment to 8 bytes instead. 2020-10-23 Jakub Jelinek PR tree-optimization/97164 gcc/ * stor-layout.c (layout_type): Also reject arrays where element size is constant, but not a multiple of element alignment. gcc/testsuite/ * c-c++-common/pr97164.c: New test. * gcc.c-torture/execute/pr36093.c: Move ... * gcc.dg/pr36093.c: ... here. Add dg-do compile and dg-error directives. * gcc.c-torture/execute/pr43783.c: Move ... * gcc.dg/pr43783.c: ... here. Add dg-do compile, dg-options and dg-error directives. libgcc/config/libbid/ * bid_functions.h (UINT192): Decrease alignment to 8 bytes. --- libgcc/config/libbid/bid_functions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/config/libbid/bid_functions.h b/libgcc/config/libbid/bid_functions.h index 05f9566..d0f0cb2 100644 --- a/libgcc/config/libbid/bid_functions.h +++ b/libgcc/config/libbid/bid_functions.h @@ -81,7 +81,7 @@ ALIGN (16) #define SQRT80 sqrtw #endif - typedef ALIGN (16) + typedef ALIGN (8) struct { UINT64 w[3]; } UINT192; -- cgit v1.1 From ad1a9afc6022302b31492e16807571f0e191cd0c Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Fri, 23 Oct 2020 09:09:05 +0000 Subject: Fix overzealous gthread support inhibition for vxworks The tests for macros possibly defined in gthr.h needs to be performed after the corresponding #include. This was tested together with the previous updates to gthr-vxworks-thread.c and gthr-vxworks-cond.c and was meant to be squashed with them. 2010-10-23 Rasmus Villemoes libgcc/ * config/gthr-vxworks-thread.c: #include gthr.h before testing the guard defined there. * config/gthr-vxworks-cond.c: Likewise. --- libgcc/config/gthr-vxworks-cond.c | 3 ++- libgcc/config/gthr-vxworks-thread.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'libgcc') diff --git a/libgcc/config/gthr-vxworks-cond.c b/libgcc/config/gthr-vxworks-cond.c index ba384b4..e307bea 100644 --- a/libgcc/config/gthr-vxworks-cond.c +++ b/libgcc/config/gthr-vxworks-cond.c @@ -26,9 +26,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see This file implements the GTHREAD_HAS_COND part of the interface exposed by gthr-vxworks.h. */ +#include "gthr.h" + #if __GTHREAD_HAS_COND -#include "gthr.h" #include /* --------------------------- Condition Variables ------------------------ */ diff --git a/libgcc/config/gthr-vxworks-thread.c b/libgcc/config/gthr-vxworks-thread.c index a723005..c87168c 100644 --- a/libgcc/config/gthr-vxworks-thread.c +++ b/libgcc/config/gthr-vxworks-thread.c @@ -27,9 +27,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see exposed by gthr-vxworks.h, using APIs exposed by regular (!AE/653) VxWorks kernels. */ +#include "gthr.h" + #if __GTHREAD_CXX0X -#include "gthr.h" #include #include -- cgit v1.1 From efe71fcc4cb0e9989b2655e034c57cc73ae679a9 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 24 Oct 2020 00:16:29 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 6 ++++++ libgcc/config/libbid/ChangeLog | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 5b1faaf..c8616a2 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2020-10-23 Rasmus Villemoes + + * config/gthr-vxworks-thread.c: #include gthr.h before + testing the guard defined there. + * config/gthr-vxworks-cond.c: Likewise. + 2020-10-21 Douglas Rupp Olivier Hainque diff --git a/libgcc/config/libbid/ChangeLog b/libgcc/config/libbid/ChangeLog index a1a9f46..ce4b57e 100644 --- a/libgcc/config/libbid/ChangeLog +++ b/libgcc/config/libbid/ChangeLog @@ -1,3 +1,8 @@ +2020-10-23 Jakub Jelinek + + PR tree-optimization/97164 + * bid_functions.h (UINT192): Decrease alignment to 8 bytes. + 2020-05-05 Martin Liska PR libgcc/92565 -- cgit v1.1 From 14e19b82c1e67ead60c3095ac23347317298904b Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 19 Oct 2020 17:40:00 +0200 Subject: gcov-profile: use static pool for TOPN first gcc/ChangeLog: PR gcov-profile/97461 * gcov-io.h (GCOV_PREALLOCATED_KVP): Pre-allocate 64 static counters. libgcc/ChangeLog: PR gcov-profile/97461 * libgcov.h (gcov_counter_add): Use first static counters as it should help to have malloc wrappers set up. gcc/testsuite/ChangeLog: PR gcov-profile/97461 * gcc.dg/tree-prof/pr97461.c: New test. --- libgcc/libgcov.h | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'libgcc') diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h index 8be5beb..e70cf63 100644 --- a/libgcc/libgcov.h +++ b/libgcc/libgcov.h @@ -404,22 +404,16 @@ gcov_counter_add (gcov_type *counter, gcov_type value, *counter += value; } -/* Allocate gcov_kvp from heap. If we are recursively called, then allocate - it from a list of pre-allocated pool. */ +/* Allocate gcov_kvp from statically pre-allocated pool, + or use heap otherwise. */ static inline struct gcov_kvp * allocate_gcov_kvp (void) { struct gcov_kvp *new_node = NULL; - static -#if defined(HAVE_CC_TLS) -__thread -#endif - volatile unsigned in_recursion ATTRIBUTE_UNUSED = 0; - #if !defined(IN_GCOV_TOOL) && !defined(L_gcov_merge_topn) - if (__builtin_expect (in_recursion, 0)) + if (__gcov_kvp_pool_index < GCOV_PREALLOCATED_KVP) { unsigned index; #if GCOV_SUPPORTS_ATOMIC @@ -430,17 +424,11 @@ __thread #endif if (index < GCOV_PREALLOCATED_KVP) new_node = &__gcov_kvp_pool[index]; - else - /* Do not crash in the situation. */ - return NULL; } - else #endif - { - in_recursion = 1; - new_node = (struct gcov_kvp *)xcalloc (1, sizeof (struct gcov_kvp)); - in_recursion = 0; - } + + if (new_node == NULL) + new_node = (struct gcov_kvp *)xcalloc (1, sizeof (struct gcov_kvp)); return new_node; } -- cgit v1.1 From 89bb01e7cbd82cdf318202d8185d765dcc338915 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 28 Oct 2020 00:16:38 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index c8616a2..e6523302 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2020-10-27 Martin Liska + + PR gcov-profile/97461 + * libgcov.h (gcov_counter_add): Use first static counters + as it should help to have malloc wrappers set up. + 2020-10-23 Rasmus Villemoes * config/gthr-vxworks-thread.c: #include gthr.h before -- cgit v1.1 From 291d920395dcb192aea657b8073074b690777d4b Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Wed, 28 Oct 2020 11:16:57 +0000 Subject: Fix conditional inclusion guard in gthr-vxworks-thread.c This fixes the name of the macro used to condition the inclusion of an actual implementation of some of the gthread support services for VxWorks, to agree with the side defining that macro based on tests against the targetted VxWorks version major. 2020-10-28 Olivier Hainque libgcc/ * config/gthr-vxworks-thread.c: Fix name of macro used to condition the inclusion of an actual implementation. --- libgcc/config/gthr-vxworks-thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/config/gthr-vxworks-thread.c b/libgcc/config/gthr-vxworks-thread.c index c87168c..c8fe65f 100644 --- a/libgcc/config/gthr-vxworks-thread.c +++ b/libgcc/config/gthr-vxworks-thread.c @@ -29,7 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "gthr.h" -#if __GTHREAD_CXX0X +#if __GTHREADS_CXX0X #include #include -- cgit v1.1 From 9df44b9403312d7cd9678bfb44cae3bb972d6355 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Wed, 28 Oct 2020 11:24:56 +0000 Subject: Fix the logic conditioning VX_ENTER/LEAVE_TLS_DTOR Fix a basic #if/#ifdef confusion which leads to improper choices in some configurations. 2020-10-28 Olivier Hainque libgcc/ * config/gthr-vxworks-tls.c: Fix preprocessor logic controlling the definition of VX_ENTER_TLS_DTOR and VX_LEAVE_TLS_DTOR based on a version major check. --- libgcc/config/gthr-vxworks-tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/config/gthr-vxworks-tls.c b/libgcc/config/gthr-vxworks-tls.c index 8987e55..1d5c4fb 100644 --- a/libgcc/config/gthr-vxworks-tls.c +++ b/libgcc/config/gthr-vxworks-tls.c @@ -115,7 +115,7 @@ extern void __gthread_set_tls_data (void *data); #endif -#ifdef _VXWORKS_MAJOR_EQ(6) +#if _VXWORKS_MAJOR_EQ(6) extern void __gthread_enter_tls_dtor_context (void); extern void __gthread_leave_tls_dtor_context (void); -- cgit v1.1 From 4f0606fe4bbf1346f83dd4d0c9060c6b46672a7d Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 30 Oct 2020 00:16:29 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index e6523302..e145013 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,14 @@ +2020-10-29 Olivier Hainque + + * config/gthr-vxworks-tls.c: Fix preprocessor logic + controlling the definition of VX_ENTER_TLS_DTOR and + VX_LEAVE_TLS_DTOR based on a version major check. + +2020-10-29 Olivier Hainque + + * config/gthr-vxworks-thread.c: Fix name of macro used + to condition the inclusion of an actual implementation. + 2020-10-27 Martin Liska PR gcov-profile/97461 -- cgit v1.1 From 9a835ba4c00bc5f183a26a5335f14a2a428a2b78 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Wed, 26 Feb 2020 13:47:43 +0000 Subject: Introduce support for vxworks7r2 on x86 and x86_64 This change extends the VxWorks support on intel CPUs to VxWorks7r2 for x86_64 as well as x86, with a "mcmodel=large" additional multilib for the 64bit configuration. The support for fPIC is not functional yet for this model, so we just don't add the corresponding multilib. We extend the range of CPU families handled by TARGET_OS_CPP_BUILTINS, accounting for the fact that archs older than PENTIUM4 are not supported (any more) by VxWorks 7. As we did for powerpc, we leverage VX_CPU_PREFIX to emit different forms of definitions for different families of VxWorks as the system headers's expectations has evolved between Vx 5, 6 and 7. 2020-10-27 Olivier Hainque gcc/ * config.gcc: Adjust the ix86/x86_64-wrs-vxworks filters to apply to VxWorks 7 as well. * config/i386/t-vxworks (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Remove the fPIC multilib and add one for the large code model on x86_64. * config/i386/vxworks.h: Separate sections for TARGET_VXWORKS7, other variants and common bits. (TARGET_OS_CPP_BUILTINS): Augment to support a range of CPU families. Leverage VX_CPU_PREFIX. (CC1_SPEC): Add definition. (STACK_CHECK_PROTECT): Use conditional expression instead of heavier to read conditioned macro definitions. libgcc/ * config.host: Adjust the ix86/x86_64-wrs-vxworks filters to apply to VxWorks 7 as well. Co-authored-by: Douglas Rupp Co-authored-by: Pat Bernardi --- libgcc/config.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgcc') diff --git a/libgcc/config.host b/libgcc/config.host index fd8e55e..40823f0 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -774,7 +774,7 @@ i[34567]86-*-solaris2* | x86_64-*-solaris2*) 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-vxworks7|x86_64-wrs-vxworks7) +i[4567]86-wrs-vxworks*|x86_64-wrs-vxworks*) ;; i[34567]86-*-cygwin*) extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o" -- cgit v1.1 From 88ce3d5fbb948cc600800b15f4ca774a0ce8e7a7 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 2 Nov 2020 20:53:00 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index e145013..b44a1fee 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,10 @@ +2020-10-30 Olivier Hainque + Douglas Rupp + Pat Bernardi + + * config.host: Adjust the ix86/x86_64-wrs-vxworks filters + to apply to VxWorks 7 as well. + 2020-10-29 Olivier Hainque * config/gthr-vxworks-tls.c: Fix preprocessor logic -- cgit v1.1 From bd6ecbe48ada79bb14cbb30ef8318495b5237790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 8 Sep 2020 15:21:51 +0300 Subject: libgcc: Expose the instruction pointer and stack pointer in SEH _Unwind_Backtrace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the SEH version of _Unwind_Backtrace did unwind the stack and call the provided callback function as intended, but there was little the caller could do within the callback to actually get any info about that particular level in the unwind. Set the ra and cfa pointers, which are used by _Unwind_GetIP and _Unwind_GetCFA, to allow using these functions from the callacb to inspect the state at each stack frame. 2020-09-08 Martin Storsjö libgcc/ * unwind-seh.c (_Unwind_Backtrace): Set the ra and cfa pointers before calling the callback. --- libgcc/unwind-seh.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libgcc') diff --git a/libgcc/unwind-seh.c b/libgcc/unwind-seh.c index 1a70180..275d782 100644 --- a/libgcc/unwind-seh.c +++ b/libgcc/unwind-seh.c @@ -466,6 +466,11 @@ _Unwind_Backtrace(_Unwind_Trace_Fn trace, &gcc_context.disp->HandlerData, &gcc_context.disp->EstablisherFrame, NULL); + /* Set values that the callback can inspect via _Unwind_GetIP + * and _Unwind_GetCFA. */ + gcc_context.ra = ms_context.Rip; + gcc_context.cfa = ms_context.Rsp; + /* Call trace function. */ if (trace (&gcc_context, trace_argument) != _URC_NO_REASON) return _URC_FATAL_PHASE1_ERROR; -- cgit v1.1 From ec4d374ece679c5ef15a197c2750ce9241cb4099 Mon Sep 17 00:00:00 2001 From: Pat Bernardi Date: Mon, 24 Aug 2020 10:29:32 -0400 Subject: Sync the aarch64-vx7r2 libgcc config with that of Linux This adds ${cpu_type}/t-lse and t-slibgcc-libgcc to the tmake_file list for aarch64-vxworks7* configurations, as the Linux port does. t-lse is needed by all triplets now anyway and the standard setting for slibgcc makes sense as we are working on reintroducing PIC support for RTPs on various targets. The VxWorks7 system environments are leaning towards more and more similarilties with Linux in general, so the closer configurations the better. 2020-11-02 Pat Bernardi libgcc/ * config.host (aarch64-vxworks7*, tmake_file): Add ${cpu_type}/t-lse and t-slibgcc-libgcc. Co-authored-by: Olivier Hainque --- libgcc/config.host | 1 + 1 file changed, 1 insertion(+) (limited to 'libgcc') diff --git a/libgcc/config.host b/libgcc/config.host index 40823f0..66af834 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -393,6 +393,7 @@ aarch64*-*-vxworks7*) extra_parts="$extra_parts crtfastmath.o" md_unwind_header=aarch64/aarch64-unwind.h tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" ;; alpha*-*-linux*) -- cgit v1.1 From fd2325ea60efea4b7172847dbe3bd8c7bb4e5811 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 4 Nov 2020 00:16:41 +0000 Subject: Daily bump. --- libgcc/ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index b44a1fee..fa70f2f7 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,14 @@ +2020-11-03 Pat Bernardi + Olivier Hainque + + * config.host (aarch64-vxworks7*, tmake_file): Add + ${cpu_type}/t-lse and t-slibgcc-libgcc. + +2020-11-03 Martin Storsjö + + * unwind-seh.c (_Unwind_Backtrace): Set the ra and cfa pointers + before calling the callback. + 2020-10-30 Olivier Hainque Douglas Rupp Pat Bernardi -- cgit v1.1