From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6DAC53898529; Fri, 19 Feb 2021 07:47:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DAC53898529 From: "hsuhau617 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/99157] New: [ARM] libgcc -mcmse check always fail Date: Fri, 19 Feb 2021 07:47:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hsuhau617 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 07:47:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99157 Bug ID: 99157 Summary: [ARM] libgcc -mcmse check always fail Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: hsuhau617 at gmail dot com Target Milestone: --- When checking -mcmse support, it will always fail. Because it checks the return value with "$?", but in makefile it should be "$$?". I have a simple patch for the bug: --- a/libgcc/config/arm/t-arm +++ b/libgcc/config/arm/t-arm @@ -4,7 +4,7 @@ LIB1ASMFUNCS =3D _thumb1_case_sqi _thumb1_case_uqi _thumb1_case_shi \ HAVE_CMSE:=3D$(findstring __ARM_FEATURE_CMSE,$(shell $(gcc_compile_bare) -= dM -E - /dev/null 2>/dev/null; echo $?),0) +ifeq ($(shell $(gcc_compile_bare) -E -mcmse - /dev/null 2>/dev/null; echo $$?),0) CMSE_OPTS:=3D-mcmse endif=