Subject: Re: problem with stack protector changes
To: None <current-users@netbsd.org>
From: Geoff Wing <mason@primenet.com.au>
List: current-users
Date: 11/09/2006 05:27:27
Christos Zoulas <christos@astron.com> typed:
: In article <slrnel5br6.d7o.mason@g.primenet.com.au>,
: Geoff Wing  <mason@primenet.com.au> wrote:
:>src/gnu/dist/gcc4/gcc/gcc.c has (with TARGET_LIBC_PROVIDES_SSP defined):
                                                                ^ not
:>#define LINK_SSP_SPEC
:>"%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}"
:>
:>so we need libssp_nonshared.* somewhere or the line changed if the
:>functionality is provided anyway.
:
: No, make sure you rebuild the compiler.

But the ssp functionality seems to be in libssp, not libc.  I'm confused.
I'll look at it again later.

So, do we now need the following change (or similar)?

Regards,
Geoff

--- regress/lib/libssp/Makefile.inc.org	2006-11-09 08:01:35.000000000 +1100
+++ regress/lib/libssp/Makefile.inc	2006-11-09 16:22:06.000000000 +1100
@@ -1,6 +1,9 @@
 
 WARNS=	4
 
+DPADD+=		${LIBSSP}
+LDADD+=		-lssp
+
 CPPFLAGS+=-I/usr/include/ssp -D_FORTIFY_SOURCE=2
 CFLAGS+=-fstack-protector-all -Wstack-protector
 LDFLAGS+=-fstack-protector-all -Wstack-protector