summaryrefslogtreecommitdiffstats
path: root/audio/ocp/configure.ac.diff
blob: 906aeb8bb118814df242994b64e42d50894c5067 (plain)
From 21ebd384f78d9933b6e58554db5726e4b3c42efa Mon Sep 17 00:00:00 2001
From: Stian Skjelstad <stian.skjelstad@gmail.com>
Date: Wed, 3 Feb 2021 10:41:31 +0100
Subject: [PATCH] Do not block unknown compiler-versions. We do deny-list
 instead of allow-list. Fixes #30

---
 configure    | 16 +++++-----------
 configure.ac | 14 ++++----------
 2 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/configure b/configure
index 004dad4..59227f1 100755
--- a/configure
+++ b/configure
@@ -6470,19 +6470,13 @@ else
 		'')
 			as_fn_error $? "not found" "$LINENO" 5;
 			;;
-		2.95.[2-9]|2.95.[2-9][-].*|3.[0-9]|3.[0-9].[0-9]|3.[0-9]|3.[0-9].[0-9]-*|4.*|5.*|6.*|7*|8*|9*|10*)
-			_cc_major=`echo $cc_version | cut -d '.' -f 1`
-			_cc_minor=`echo $cc_version | cut -d '.' -f 2`
-			_cc_mini=`echo $cc_version | cut -d '.' -f 3`
-			if test $_cc_major -gt 2; then
-				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_version, ok" >&5
-$as_echo "$cc_version, ok" >&6; }
-			else
-				as_fn_error $? "$cc_version, bad" "$LINENO" 5
-			fi
+# old GCC versions in the 2.95.xx family are known to produce bad crashing binaries (it is still out there on some old systems. In general the all versions before 3.0 is risky
+		2.95.[2-9]|2.95.[2-9][-].*)
+			as_fn_error $? "$cc_version, bad" "$LINENO" 5
 			;;
 		*)
-			as_fn_error $? "$cc_version, bad" "$LINENO" 5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_version, ok" >&5
+$as_echo "$cc_version, ok" >&6; }
 			;;
        esac
 fi
diff --git a/configure.ac b/configure.ac
index fdf3f38..57d9138 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,18 +132,12 @@ else
 		'')
 			AC_MSG_ERROR([not found]);
 			;;
-		2.95.[[2-9]]|2.95.[[2-9]][[-]].*|3.[[0-9]]|3.[[0-9]].[[0-9]]|3.[[0-9]]|3.[[0-9]].[[0-9]]-*|4.*|5.*|6.*|7*|8*|9*|10*)
-			_cc_major=`echo $cc_version | cut -d '.' -f 1`
-			_cc_minor=`echo $cc_version | cut -d '.' -f 2`
-			_cc_mini=`echo $cc_version | cut -d '.' -f 3`
-			if test $_cc_major -gt 2; then
-				AC_MSG_RESULT([$cc_version, ok])
-			else
-				AC_MSG_ERROR([$cc_version, bad])
-			fi
+# old GCC versions in the 2.95.xx family are known to produce bad crashing binaries (it is still out there on some old systems. In general the all versions before 3.0 is risky
+		2.95.[[2-9]]|2.95.[[2-9]][[-]].*)
+			AC_MSG_ERROR([$cc_version, bad])
 			;;
 		*)
-			AC_MSG_ERROR([$cc_version, bad])
+			AC_MSG_RESULT([$cc_version, ok])
 			;;
        esac
 fi