From owner-svn-src-all@FreeBSD.ORG Sun Feb 1 09:50:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D905845E; Sun, 1 Feb 2015 09:50:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C40DCE76; Sun, 1 Feb 2015 09:50:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t119oYGA060084; Sun, 1 Feb 2015 09:50:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t119oY6X060080; Sun, 1 Feb 2015 09:50:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201502010950.t119oY6X060080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 1 Feb 2015 09:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278023 - head/contrib/gcc/config/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2015 09:50:35 -0000 Author: andrew Date: Sun Feb 1 09:50:33 2015 New Revision: 278023 URL: https://svnweb.freebsd.org/changeset/base/278023 Log: FreeBSD expects _Unwind_GetGR, _Unwind_SetGR, and _Unwind_SetIP to be symbols and not macros. Make this so. This fixes a few ports that try to link against these functions but fail as they previously didn't exist. Modified: head/contrib/gcc/config/arm/unwind-arm.c head/contrib/gcc/config/arm/unwind-arm.h Modified: head/contrib/gcc/config/arm/unwind-arm.c ============================================================================== --- head/contrib/gcc/config/arm/unwind-arm.c Sun Feb 1 06:45:31 2015 (r278022) +++ head/contrib/gcc/config/arm/unwind-arm.c Sun Feb 1 09:50:33 2015 (r278023) @@ -25,6 +25,7 @@ along with this program; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#define __ARM_STATIC_INLINE #include "unwind.h" /* We add a prototype for abort here to avoid creating a dependency on @@ -1089,4 +1090,11 @@ _Unwind_GetIPInfo (struct _Unwind_Contex *ip_before_insn = 0; return _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1; } + +void +_Unwind_SetIP (struct _Unwind_Context *context, _Unwind_Ptr val) +{ + _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1)); +} + #endif Modified: head/contrib/gcc/config/arm/unwind-arm.h ============================================================================== --- head/contrib/gcc/config/arm/unwind-arm.h Sun Feb 1 06:45:31 2015 (r278022) +++ head/contrib/gcc/config/arm/unwind-arm.h Sun Feb 1 09:50:33 2015 (r278023) @@ -34,6 +34,10 @@ #define __ARM_EABI_UNWINDER__ 1 +#ifndef __ARM_STATIC_INLINE +#define __ARM_STATIC_INLINE static inline +#endif + #ifdef __cplusplus extern "C" { #endif @@ -245,7 +249,7 @@ extern "C" { return tmp; } - static inline _Unwind_Word + __ARM_STATIC_INLINE _Unwind_Word _Unwind_GetGR (_Unwind_Context *context, int regno) { _uw val; @@ -253,6 +257,12 @@ extern "C" { return val; } + __ARM_STATIC_INLINE void + _Unwind_SetGR (_Unwind_Context *context, int regno, _Unwind_Word val) + { + _Unwind_VRS_Set (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val); + } + #ifndef __FreeBSD__ /* Return the address of the instruction, not the actual IP value. */ #define _Unwind_GetIP(context) \ @@ -260,21 +270,16 @@ extern "C" { #define _Unwind_GetIPInfo(context, ip_before_insn) \ (*ip_before_insn = 0, _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1) -#else - _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); - _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *); -#endif - - static inline void - _Unwind_SetGR (_Unwind_Context *context, int regno, _Unwind_Word val) - { - _Unwind_VRS_Set (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val); - } /* The dwarf unwinder doesn't understand arm/thumb state. We assume the landing pad uses the same instruction set as the call site. */ #define _Unwind_SetIP(context, val) \ _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1)) +#else + _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); + _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *); + void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr); +#endif #ifdef __cplusplus } /* extern "C" */