From 578ed6039fe675e39a8333a90148b7ccb461f923 Mon Sep 17 00:00:00 2001 From: matt Date: Wed, 29 Jan 2014 00:20:54 +0000 Subject: [PATCH] Add a check for minimum compiler compatible with gcc 4.1 __ARM_PCS_AAPCS64 also requires __ALIGNBYTES to be 7 --- sys/arch/arm/include/cdefs.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/arch/arm/include/cdefs.h b/sys/arch/arm/include/cdefs.h index 3751b7d2b4ba..337e228bada7 100644 --- a/sys/arch/arm/include/cdefs.h +++ b/sys/arch/arm/include/cdefs.h @@ -1,8 +1,12 @@ -/* $NetBSD: cdefs.h,v 1.10 2014/01/28 21:17:12 matt Exp $ */ +/* $NetBSD: cdefs.h,v 1.11 2014/01/29 00:20:54 matt Exp $ */ #ifndef _ARM_CDEFS_H_ #define _ARM_CDEFS_H_ +#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || __GNUC__ > 4 +#error GCC 4.1 or compatible required. +#endif + #if defined (__ARM_ARCH_8A__) #define _ARM_ARCH_8 /* ARMv8 64-bit in AARCH32 */ #endif @@ -45,7 +49,7 @@ #define _ARM_ARCH_DWORD_OK #endif -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) || defined(__ARM_PCS_AAPCS64) #define __ALIGNBYTES (8 - 1) #else #define __ALIGNBYTES (sizeof(int) - 1)