Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jun 2010 06:18:10 +0000
From:      "b. f." <bf1783@googlemail.com>
To:        Garrett Cooper <yanefbsd@gmail.com>
Cc:        dougb@freebsd.org, freebsd-ports@freebsd.org
Subject:   Re: lang/perl5.10 doesn't build with gcc 4.5.1
Message-ID:  <AANLkTin6-sjXlfrqyDr08uI-Nf5NbZ5ntbMjV7egeKSc@mail.gmail.com>
In-Reply-To: <AANLkTillxwO437ELLB4vEwJ2n9J54DNvq85rgHxY6N8q@mail.gmail.com>
References:  <AANLkTimoea2dSiGKEFaOdT5xITtfYuSCh-Lj0G1iE4My@mail.gmail.com> <AANLkTillxwO437ELLB4vEwJ2n9J54DNvq85rgHxY6N8q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/22/10, Garrett Cooper <yanefbsd@gmail.com> wrote:
> On Sat, Jun 19, 2010 at 8:25 AM, b. f. <bf1783@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTin6-sjXlfrqyDr08uI-Nf5NbZ5ntbMjV7egeKSc>