From 46b46545648612ab25cca7b3f67d5a42a5299ee5 Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Wed, 28 Aug 2019 12:44:05 -0600 Subject: [PATCH] Fix failing IAR builds, thanks to Joseph C. for the report --- wolfssl/sniffer.h | 2 +- wolfssl/wolfcrypt/blake2-int.h | 2 +- wolfssl/wolfcrypt/sha256.h | 2 +- wolfssl/wolfcrypt/sha512.h | 2 +- wolfssl/wolfcrypt/sp.h | 2 +- wolfssl/wolfcrypt/types.h | 14 +++++++------- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/wolfssl/sniffer.h b/wolfssl/sniffer.h index d731c5b34..bf2306e11 100644 --- a/wolfssl/sniffer.h +++ b/wolfssl/sniffer.h @@ -98,7 +98,7 @@ enum { * information associated with the SSL session. */ -#if defined(__GNUC__) +#if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define WOLFSSL_PACK __attribute__ ((packed)) #else #define WOLFSSL_PACK diff --git a/wolfssl/wolfcrypt/blake2-int.h b/wolfssl/wolfcrypt/blake2-int.h index ac736b1cc..a63784cdc 100644 --- a/wolfssl/wolfcrypt/blake2-int.h +++ b/wolfssl/wolfcrypt/blake2-int.h @@ -42,7 +42,7 @@ #if defined(_MSC_VER) #define ALIGN(x) __declspec(align(x)) -#elif defined(__GNUC__) +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define ALIGN(x) __attribute__((aligned(x))) #else #define ALIGN(x) diff --git a/wolfssl/wolfcrypt/sha256.h b/wolfssl/wolfcrypt/sha256.h index 5bfcc7cb4..710095df9 100644 --- a/wolfssl/wolfcrypt/sha256.h +++ b/wolfssl/wolfcrypt/sha256.h @@ -91,7 +91,7 @@ #if defined(_MSC_VER) #define SHA256_NOINLINE __declspec(noinline) -#elif defined(__GNUC__) +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define SHA256_NOINLINE __attribute__((noinline)) #else #define SHA256_NOINLINE diff --git a/wolfssl/wolfcrypt/sha512.h b/wolfssl/wolfcrypt/sha512.h index 586289a8d..2510384b7 100644 --- a/wolfssl/wolfcrypt/sha512.h +++ b/wolfssl/wolfcrypt/sha512.h @@ -77,7 +77,7 @@ #endif #if defined(_MSC_VER) #define SHA512_NOINLINE __declspec(noinline) -#elif defined(__GNUC__) +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define SHA512_NOINLINE __attribute__((noinline)) #else #define SHA512_NOINLINE diff --git a/wolfssl/wolfcrypt/sp.h b/wolfssl/wolfcrypt/sp.h index e53fca0fb..6f48bb198 100644 --- a/wolfssl/wolfcrypt/sp.h +++ b/wolfssl/wolfcrypt/sp.h @@ -37,7 +37,7 @@ #if defined(_MSC_VER) #define SP_NOINLINE __declspec(noinline) -#elif defined(__GNUC__) +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define SP_NOINLINE __attribute__((noinline)) #else #define SP_NOINLINE diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 0b4caf6ca..43846ef8a 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -758,7 +758,7 @@ #if defined(WOLFSSL_AESNI) || defined(WOLFSSL_ARMASM) || \ defined(USE_INTEL_SPEEDUP) || defined(WOLFSSL_AFALG_XILINX) #if !defined(ALIGN16) - #if defined(__GNUC__) + #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define ALIGN16 __attribute__ ( (aligned (16))) #elif defined(_MSC_VER) /* disable align warning, we want alignment ! */ @@ -770,7 +770,7 @@ #endif /* !ALIGN16 */ #if !defined (ALIGN32) - #if defined (__GNUC__) + #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define ALIGN32 __attribute__ ( (aligned (32))) #elif defined(_MSC_VER) /* disable align warning, we want alignment ! */ @@ -782,7 +782,7 @@ #endif /* !ALIGN32 */ #if !defined(ALIGN64) - #if defined(__GNUC__) + #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define ALIGN64 __attribute__ ( (aligned (64))) #elif defined(_MSC_VER) /* disable align warning, we want alignment ! */ @@ -793,7 +793,7 @@ #endif #endif /* !ALIGN64 */ - #if defined(__GNUC__) + #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define ALIGN128 __attribute__ ( (aligned (128))) #elif defined(_MSC_VER) /* disable align warning, we want alignment ! */ @@ -803,7 +803,7 @@ #define ALIGN128 #endif - #if defined(__GNUC__) + #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define ALIGN256 __attribute__ ( (aligned (256))) #elif defined(_MSC_VER) /* disable align warning, we want alignment ! */ @@ -847,7 +847,7 @@ #endif - #if defined(__GNUC__) + #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define WOLFSSL_PACK __attribute__ ((packed)) #else #define WOLFSSL_PACK @@ -862,7 +862,7 @@ #endif #endif - #if defined(__GNUC__) + #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) #define WC_NORETURN __attribute__((noreturn)) #else #define WC_NORETURN