From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 94F0F3839406; Thu, 31 Mar 2022 19:04:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94F0F3839406 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] Fix inhibit_stack_protector for clang X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: b092d88d2e7f7c741c57cdd7352ad769916366b6 X-Git-Newrev: cb4d0761729417b7a0e699c3e1e944884a99c236 Message-Id: <20220331190459.94F0F3839406@sourceware.org> Date: Thu, 31 Mar 2022 19:04:59 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2022 19:04:59 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cb4d0761729417b7a0e699c3e1e944884a99c236 commit cb4d0761729417b7a0e699c3e1e944884a99c236 Author: Adhemerval Zanella Date: Wed Mar 9 17:43:42 2022 -0300 Fix inhibit_stack_protector for clang Diff: --- include/libc-symbols.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/libc-symbols.h b/include/libc-symbols.h index f4c1312ba5..4a55a8f7f9 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -446,8 +446,13 @@ for linking") /* Used to disable stack protection in sensitive places, like ifunc resolvers and early static TLS init. */ #ifdef HAVE_CC_NO_STACK_PROTECTOR -# define inhibit_stack_protector \ +# ifdef __clang__ +# define inhibit_stack_protector \ + __attribute__((no_stack_protector)) +# else +# define inhibit_stack_protector \ __attribute__ ((__optimize__ ("-fno-stack-protector"))) +# endif #else # define inhibit_stack_protector #endif