]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix c-c++-common/fhardened-[12].c test fails on hppa
authorJohn David Anglin <danglin@gcc.gnu.org>
Wed, 6 Dec 2023 15:38:50 +0000 (15:38 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Wed, 6 Dec 2023 15:38:50 +0000 (15:38 +0000)
The -fstack-protector and -fstack-protector-strong options are
not supported on hppa since the stack grows up.

2023-12-06  John David Anglin  <danglin@gcc.gnu.org>

gcc/testsuite/ChangeLog:

* c-c++-common/fhardened-1.c: Ignore __SSP_STRONG__ define
if __hppa__ is defined.
* c-c++-common/fhardened-2.c: Ignore __SSP__ define
if __hppa__ is defined.

gcc/testsuite/c-c++-common/fhardened-1.c
gcc/testsuite/c-c++-common/fhardened-2.c

index 7e6740655fe7079f7a377079476cf79542cafc44..23478be76b24b22097baef1098681f0bd91a391a 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile { target *-*-linux* *-*-gnu* } } */
 /* { dg-options "-fhardened -O" } */
 
-#ifndef __SSP_STRONG__
+#if !defined(__SSP_STRONG__) && !defined(__hppa__)
 # error "-fstack-protector-strong not enabled"
 #endif
 
index 280ff96eb1542ada209b9074232119108b524d16..6ac66f9f6b7cbcc308f37c1a0310a4029373a3d2 100644 (file)
@@ -4,7 +4,7 @@
 #ifdef __SSP_STRONG__
 # error "-fstack-protector-strong enabled when it should not be"
 #endif
-#ifndef __SSP__
+#if !defined(__SSP__) && !defined(__hppa__)
 # error "-fstack-protector not enabled"
 #endif