]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Error out stack-protector unavailability on AIX
authorAyappan Perumal <ayappap2@in.ibm.com>
Mon, 1 Sep 2025 13:27:52 +0000 (08:27 -0500)
committerSangamesh Mallayya <swamy.sangamesh@gmail.com>
Thu, 16 Oct 2025 10:03:49 +0000 (05:03 -0500)
stack-protector is not supported in GCC on AIX. This patch is to fail the
compilation if -fstack-protector option is passed.

gcc/ChangeLog:

* config/rs6000/aix.h (SUBTARGET_DRIVER_SELF_SPECS):
Error out when stack-protector option is used in AIX
as it is not supported on AIX

Approved By: Segher Boessenkool <segher@kernel.crashing.org>

(cherry picked from commit dfb7e97dd214f7d8ca0fa970d81ad5ba805aaa8d)

gcc/config/rs6000/aix.h

index 69db93ef47b8be1fb7a1aa86b65010cb5d8d779a..11e3fdf1d5a445efac8f68a3318f97bf63599c26 100644 (file)
 #undef SUBTARGET_DRIVER_SELF_SPECS
 #define SUBTARGET_DRIVER_SELF_SPECS    \
 "%{m64:-maix64} %<m64",                        \
-"%{m32:-maix32} %<m32"
+"%{m32:-maix32} %<m32",                        \
+"%{fstack-protector*: %<fstack-protector* \
+   %estack-protector not supported on AIX}"