aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/check-gcc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/check-gcc.sh')
-rwxr-xr-xscripts/check-gcc.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/check-gcc.sh b/scripts/check-gcc.sh
new file mode 100755
index 00000000..2d89d98f
--- /dev/null
+++ b/scripts/check-gcc.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+# This script checks for a broken Ubuntu 18.04 arm-none-eabi-gcc compile
+
+f1="$1"
+f2="$2"
+
+s1=`readelf -A "$f1" | grep "Tag_ARM_ISA_use"`
+s2=`readelf -A "$f2" | grep "Tag_ARM_ISA_use"`
+
+if [ "$s1" != "$s2" ]; then
+ echo ""
+ echo "ERROR: The compiler failed to correctly compile Klipper"
+ echo "It will be necessary to upgrade the compiler"
+ echo "See: https://bugs.launchpad.net/ubuntu/+source/newlib/+bug/1767223"
+ echo ""
+ rm -f "$f1"
+ exit 99
+fi