[gcc r10-9388] arm: Fix CMSE support detection in libgcc (PR target/99157)

Christophe Lyon clyon@gcc.gnu.org
Wed Feb 24 16:03:15 GMT 2021


https://gcc.gnu.org/g:fcfd5cc0f428262fcce874a4c3b41e06d1296901

commit r10-9388-gfcfd5cc0f428262fcce874a4c3b41e06d1296901
Author: Christophe Lyon <christophe.lyon@linaro.org>
Date:   Wed Feb 24 15:51:52 2021 +0000

    arm: Fix CMSE support detection in libgcc (PR target/99157)
    
    As discussed in the PR, the Makefile fragment lacks a double '$' to
    get the return-code from GCC invocation, resulting is CMSE support
    missing from multilibs.
    
    I checked that the simple patch proposed in the PR fixes the problem.
    
    2021-02-23  Christophe Lyon  <christophe.lyon@linaro.org>
                Hau Hsu  <hsuhau617@gmail.com>
    
            PR target/99157
            libgcc/
            * config/arm/t-arm: Fix cmse support detection.
    
    (cherry picked from commit be30dd89926d5dd19d72f90c1586b0e2557fde43)

Diff:
---
 libgcc/config/arm/t-arm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgcc/config/arm/t-arm b/libgcc/config/arm/t-arm
index 364f40ebe7f..3625a2590be 100644
--- a/libgcc/config/arm/t-arm
+++ b/libgcc/config/arm/t-arm
@@ -4,7 +4,7 @@ LIB1ASMFUNCS = _thumb1_case_sqi _thumb1_case_uqi _thumb1_case_shi \
 
 HAVE_CMSE:=$(findstring __ARM_FEATURE_CMSE,$(shell $(gcc_compile_bare) -dM -E - </dev/null))
 HAVE_V81M:=$(findstring armv8.1-m.main,$(gcc_compile_bare))
-ifeq ($(shell $(gcc_compile_bare) -E -mcmse - </dev/null >/dev/null 2>/dev/null; echo $?),0)
+ifeq ($(shell $(gcc_compile_bare) -E -mcmse - </dev/null >/dev/null 2>/dev/null; echo $$?),0)
 CMSE_OPTS:=-mcmse
 endif


More information about the Gcc-cvs mailing list