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.
/* { 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
#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