diff mbox series

[20/39] x86: Use inhibit_stack_protector on tst-ifunc-isa.h

Message ID 20241222000509.2205895-21-hjl.tools@gmail.com
State Accepted
Commit 6412d8cc46d7e9c8811e6251045fdefb89a5d6aa
Headers show
Series [01/39] conform: Use -dD instead of -dN on compiler invocation | expand

Commit Message

H.J. Lu Dec. 22, 2024, 12:04 a.m. UTC
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>

Co-Authored-By: H.J. Lu <hjl.tools@gmail.com>
---
 sysdeps/x86/tst-ifunc-isa.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Sam James Dec. 22, 2024, 4:38 a.m. UTC | #1
"H.J. Lu" <hjl.tools@gmail.com> writes:

> From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>
> Co-Authored-By: H.J. Lu <hjl.tools@gmail.com>

Reviewed-by: Sam James <sam@gentoo.org>

> ---
>  sysdeps/x86/tst-ifunc-isa.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/sysdeps/x86/tst-ifunc-isa.h b/sysdeps/x86/tst-ifunc-isa.h
> index dc79d260ca..c9451ad874 100644
> --- a/sysdeps/x86/tst-ifunc-isa.h
> +++ b/sysdeps/x86/tst-ifunc-isa.h
> @@ -16,6 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>  
> +#include <libc-misc.h>
>  #include <sys/platform/x86.h>
>  
>  enum isa
> @@ -29,7 +30,7 @@ enum isa
>  };
>  
>  enum isa
> -__attribute__ ((__optimize__ ("-fno-stack-protector")))
> +test_inhibit_stack_protector
>  get_isa (void)
>  {
>    if (CPU_FEATURE_ACTIVE (AVX512F))
> @@ -84,7 +85,7 @@ isa_none (void)
>  int foo (void) __attribute__ ((ifunc ("foo_ifunc")));
>  
>  void *
> -__attribute__ ((__optimize__ ("-fno-stack-protector")))
> +test_inhibit_stack_protector
>  foo_ifunc (void)
>  {
>    switch (get_isa ())
diff mbox series

Patch

diff --git a/sysdeps/x86/tst-ifunc-isa.h b/sysdeps/x86/tst-ifunc-isa.h
index dc79d260ca..c9451ad874 100644
--- a/sysdeps/x86/tst-ifunc-isa.h
+++ b/sysdeps/x86/tst-ifunc-isa.h
@@ -16,6 +16,7 @@ 
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#include <libc-misc.h>
 #include <sys/platform/x86.h>
 
 enum isa
@@ -29,7 +30,7 @@  enum isa
 };
 
 enum isa
-__attribute__ ((__optimize__ ("-fno-stack-protector")))
+test_inhibit_stack_protector
 get_isa (void)
 {
   if (CPU_FEATURE_ACTIVE (AVX512F))
@@ -84,7 +85,7 @@  isa_none (void)
 int foo (void) __attribute__ ((ifunc ("foo_ifunc")));
 
 void *
-__attribute__ ((__optimize__ ("-fno-stack-protector")))
+test_inhibit_stack_protector
 foo_ifunc (void)
 {
   switch (get_isa ())