From 8c86fb6da0b9c068ee4b4220dee11171e322f67f Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 24 May 2023 09:37:20 -0400 Subject: arm: Use -masm-syntax-unified when compiling with gcc8 or newer Annoyingly, this makes all of the '.S' files we compile get treated as divided syntax, so we need to make the syntax in them explicit. Change-Id: I56a3916b7b24c84a1214a5d6bc4ed4d651f002cf --- tools/configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/configure b/tools/configure index 8a2e499a29..be4b0e3902 100755 --- a/tools/configure +++ b/tools/configure @@ -4533,7 +4533,11 @@ if [ -z "$arch" ]; then elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then arch="arm" # cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4) - arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,' | grep -v __ARM_ARCH)" + arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,' | grep -v __ARM_ARCH | head -1)" + if test "$gccnum" -ge "800"; then + # GCC8+ can natively emit unified asm syntax + GCCOPTS="$GCCOPTS -masm-syntax-unified" + fi elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then arch="mips" arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep _MIPS_ARCH_MIPS | sed -e 's,.*\([0-9][0-9]\).*,\1,' | grep -v _MIPS_ARCH_MIPS)" -- cgit v1.2.3