> Wow. So this shortcoming harks back to the origin of time. > > Why was it not discovered before, do you think? No one ever tried it? > > Should we have a testcase for it? _Do_ we have a testcase for it?
I came to know about this recently when working with a build failure of Cpython in AIX. Recently in Cpython, the -fstack-protector flag is added and a compile check (-c) is added in configure to check whether it is accepted or not. In AIX , it passes during the compile check, and hence the flag is carried forward further but during the binary/library creation, it fails. If it would have failed during the compile check (-c) only, then the configure would have dropped the flag there only. # gcc -fstack-protector -c sample.c --> passes # gcc -fstack-protector sample.c collect2: fatal error: library libssp_nonshared not found compilation terminated. I am not sure whether we really need a testcase for this. Thanks Ayappan On Tue, Sep 2, 2025 at 11:40 AM Segher Boessenkool <seg...@kernel.crashing.org> wrote: > > On Tue, Sep 02, 2025 at 10:01:54AM +0530, Ayappan wrote: > > All active releases I would say. That would be GCC 13, 14 and 15 if I am not > > wrong. > > Wow. So this shortcoming harks back to the origin of time. > > Why was it not discovered before, do you think? No one ever tried it? > > Should we have a testcase for it? _Do_ we have a testcase for it? > > > Segher > > p.s. Please do not top-post. > > > > On Mon, Sep 1, 2025 at 10:11 PM Segher Boessenkool <[1] > > seg...@kernel.crashing.org> wrote: > > > > On Mon, Sep 01, 2025 at 09:54:41PM +0530, Ayappan wrote: > > > Yes, that would be really helpful. > > > > What release branches do you want this backported to, then? I cannot > > (always) read minds :-) > > > > > > Segher > > > > > > > On Mon, Sep 1, 2025 at 9:31 PM Segher Boessenkool <[1] > > > [2]seg...@kernel.crashing.org> wrote: > > > > > > Excellent. Thank you. Okay for trunk, as David said. > > > > > > Do you want backports for this? > > > > > > > > > Segher > > > > > > > > > On Mon, Sep 01, 2025 at 07:22:17PM +0530, Ayappan Perumal wrote: > > > > From: Ayappan Perumal <[2][3]ayapp...@in.ibm.com> > > > > > > > > --- > > > > stack-protector is not supported in GCC on AIX. This patch is to > > fail the > > > > compilation if -fstack-protector option is passed. > > > > > > > > gcc/config/rs6000/aix.h | 4 +++- > > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h > > > > index 9e7edbb2f22..c83eacefff4 100644 > > > > --- a/gcc/config/rs6000/aix.h > > > > +++ b/gcc/config/rs6000/aix.h > > > > @@ -281,4 +281,6 @@ > > > > #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}" > > > > -- > > > > 2.41.0 > > > > > > > > > References: > > > > > > [1] mailto:[4]seg...@kernel.crashing.org > > > [2] mailto:[5]ayapp...@in.ibm.com > > > > > > References: > > > > [1] mailto:seg...@kernel.crashing.org > > [2] mailto:seg...@kernel.crashing.org > > [3] mailto:ayapp...@in.ibm.com > > [4] mailto:seg...@kernel.crashing.org > > [5] mailto:ayapp...@in.ibm.com