From fff4d956dc05a8acdd8f007a29033bb426a1f9ac Mon Sep 17 00:00:00 2001 From: Justin Boswell Date: Thu, 15 Aug 2019 15:26:18 -0700 Subject: [PATCH] Relaxed constraints on gcc+x86/x64 to gcc 4.1.2 (#482) * Relaxed constraints on gcc+x86/x64 to gcc 4.1.2, added ARM and Itanium detection for gcc 4.4 --- include/aws/common/atomics_gnu_old.inl | 14 +++++++++++--- include/aws/testing/aws_test_harness.h | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/aws/common/atomics_gnu_old.inl b/include/aws/common/atomics_gnu_old.inl index 99378b686..9b188d4f3 100644 --- a/include/aws/common/atomics_gnu_old.inl +++ b/include/aws/common/atomics_gnu_old.inl @@ -21,9 +21,17 @@ #include #if defined(__GNUC__) -# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) -/* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36793 */ -# error GCC versions before 4.4.0 are not supported +# if (__GNUC__ < 4) +# error GCC versions before 4.1.2 are not supported +# elif (defined(__arm__) || defined(__ia64__)) && (__GNUC__ == 4 && __GNUC_MINOR__ < 4) +/* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36793 Itanium codegen */ +/* https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/491872 ARM codegen*/ +/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42263 ARM codegen */ +# error GCC versions before 4.4.0 are not supported on ARM or Itanium +# elif (defined(__x86_64__) || defined(__i386__)) && \ + (__GNUC__ == 4 && (__GNUC_MINOR__ < 1 || (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ < 2))) +/* 4.1.2 is the first gcc version with 100% working atomic intrinsics on Intel */ +# error GCC versions before 4.1.2 are not supported on x86/x64 # endif #endif diff --git a/include/aws/testing/aws_test_harness.h b/include/aws/testing/aws_test_harness.h index d1388a9da..cd04a8bfe 100644 --- a/include/aws/testing/aws_test_harness.h +++ b/include/aws/testing/aws_test_harness.h @@ -360,6 +360,7 @@ static LONG WINAPI s_test_print_stack_trace(struct _EXCEPTION_POINTERS *exceptio # include static void s_print_stack_trace(int sig, siginfo_t *sig_info, void *user_data) { (void)sig; + (void)sig_info; (void)user_data; # if !defined(AWS_HEADER_CHECKER) aws_backtrace_print(stderr, sig_info);