From: Doug Barton on
On 06/19/10 08:25, b. f. wrote:
> lang/perl5.* fails with -fstack-protector in CFLAGS, when built with
> the base system compiler, on some architectures. I used the attached
> patch with the base system compiler and lang/perl5.10 on 9-CURRENT
> i386 to fix the problem. However, I never attempted to use it with
> lang/gcc45, because I did not want to introduce circular dependencies
> in my ports. Your problem may be related.

I tried your patch, didn't help. I got the same error as previously.
Thanks for trying though. :)


Doug

--

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover! http://SupersetSolutions.com/

_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Doug Barton on
On 06/20/10 03:56, Ashish SHUKLA wrote:
> Try adding '-lssp_nonshared' to the LDFLAGS.

Thanks for the suggestion, but that didn't help. What did help is the
attached patch, which doesn't fix, but does avoid the problem with
trying to find libssp. With that patch the resulting perl passed all the
tests except for the 5 in the attached file.

So, if it's desirable to build perl with -fstack-protector (and it
almost certainly is) then the long term solution needs to be to detect
what gcc we're building with and add the right flags to the linker so
that libssp can be found in (for example) /usr/local/lib/gcc45/libssp.so.0


Doug

--

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover! http://SupersetSolutions.com/

From: Garrett Cooper on
On Sat, Jun 19, 2010 at 8:25 AM, b. f. <bf1783(a)googlemail.com> wrote:
> lang/perl5.* fails with -fstack-protector in CFLAGS, when built with
> the base system compiler, on some architectures. I used the attached
> patch with the base system compiler and lang/perl5.10 on 9-CURRENT
> i386 to fix the problem.  However, I never attempted to use it with
> lang/gcc45, because I did not want to introduce circular dependencies
> in my ports.  Your problem may be related.

This patch's logic is inverted:

$ make -f Makefile.cflags_test
-fstack-protector -fstack-protector-all
$ cat Makefile.cflags_test
CFLAGS+= -fstack-protector -fstack-protector-all -funroll-loops

all:
@echo ${CFLAGS:M-fstack-protector*}

I think you wanted :N...

HTH,
-Garrett
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Doug Barton on
On Mon, 21 Jun 2010, Garrett Cooper wrote:

> This patch's logic is inverted:

Doesn't matter, ports Makefile fu isn't going to get the job done to
remove -fstack-protector, see my post tonight about this.


Doug

--

Improve the effectiveness of your Internet presence with
a domain name makeover! http://SupersetSolutions.com/

Computers are useless. They can only give you answers.
-- Pablo Picasso

_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: "b. f." on
On 6/22/10, Garrett Cooper <yanefbsd(a)gmail.com> wrote:
> On Sat, Jun 19, 2010 at 8:25 AM, b. f. <bf1783(a)googlemail.com> wrote:
>> lang/perl5.* fails with -fstack-protector in CFLAGS, when built with
>> the base system compiler, on some architectures. I used the attached
>> patch with the base system compiler and lang/perl5.10 on 9-CURRENT
>> i386 to fix the problem. However, I never attempted to use it with
>> lang/gcc45, because I did not want to introduce circular dependencies
>> in my ports. Your problem may be related.
>
> This patch's logic is inverted:
>
> $ make -f Makefile.cflags_test
> -fstack-protector -fstack-protector-all
> $ cat Makefile.cflags_test
> CFLAGS+= -fstack-protector -fstack-protector-all -funroll-loops
>
> all:
> @echo ${CFLAGS:M-fstack-protector*}
>
> I think you wanted :N...

No, my intention wasn't to remove the stack-protector flags, but
rather to explicitly add them to LDFLAGS when they were present in
CFLAGS, because they are among a number of flags that need to be
issued both when compiling and when linking.

I've been building perl for some time with these changes, and, as I
showed Doug, I can build perl with gcc 4.5, too. His problem appears
to arise from the fact that his base system libraries are built with
stack protection, but his ports are not, causing linking failures. I
suggest that he switches to using it everywhere (some ports may need
to be patched on some architectures, and appropriate flags added in
make.conf) or nowhere (rebuild the base system WITHOUT_SSP).

b.
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"