NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD-9.4 and SSP



On Mon, 21 Oct 2024 23:07:27 +0000 (UTC)
RVP <rvp%SDF.ORG@localhost> wrote:

> On Mon, 21 Oct 2024, Sad Clouds wrote:
> 
> > Yes, once I applied this patch
> > http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/shells/ksh93/patches/patch-src_lib_libast_features_syscall?rev=1.4
> >
> > The test succeeds, but gcc returns error "redefinition of 'getcwd'"
> > which is more of a NetBSD + SSP issue.
> >
> 
> OK, refreshing my memory again, I see the purpose of that ksh93 patch: it's
> to make ksh use the syscall (which on NetBSD is SYS___getcwd--for some reason)
> instead of rolling its own. So, that patch alone w/o Christos's SSP patches
> won't work if you compile with -D_FORTIFY_SOURCE=2 and any -On flags.

Yes that is correct. When I looked at the sources, it had a bunch of
ifdef statement, depending on the test results of getcwd. I believe the
gcc error will occur either with or without the ksh patch.

I simply ran the failing gcc command by hand with
"-O2 -D_FORTIFY_SOURCE=0" and got past the failure. Other people hitting
similar issues on NetBSD-9.4 may not have the technical skills for such
workarounds. So I do think it needs fixing by NetBSD developers.

Thanks.


Home | Main Index | Thread Index | Old Index