diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-12-22 13:05:58 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-12-22 13:13:31 -0500 |
commit | 50e9c6738f891af5e1a79f67d3a2103038c1eabc (patch) | |
tree | 831fcbc1c65fa9c9211e9a86c67d6b28046a9a18 | |
parent | 2a74ffdb95fdd3206627cbdcf1d7bff5a29a55ea (diff) | |
download | kutter-50e9c6738f891af5e1a79f67d3a2103038c1eabc.tar.gz kutter-50e9c6738f891af5e1a79f67d3a2103038c1eabc.tar.xz kutter-50e9c6738f891af5e1a79f67d3a2103038c1eabc.zip |
scripts: Add a test case for Ubuntu 18.04 compiler error
Attempt to detect a bad build of Klipper and report an error.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | scripts/check-gcc.sh | 18 |
2 files changed, 19 insertions, 0 deletions
@@ -86,6 +86,7 @@ $(OUT)compile_time_request.o: $(patsubst %.c, $(OUT)src/%.o.ctr,$(src-y)) ./scri $(OUT)klipper.elf: $(patsubst %.c, $(OUT)src/%.o,$(src-y)) $(OUT)compile_time_request.o @echo " Linking $@" $(Q)$(CC) $^ $(CFLAGS_klipper.elf) -o $@ + $(Q)scripts/check-gcc.sh $@ $(OUT)compile_time_request.o ################ Kconfig rules 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 |