lang/perl5.10 doesn't build with gcc 4.5.1

b. f. bf1783 at
Tue Jun 22 06:18:12 UTC 2010

On 6/22/10, Garrett Cooper <yanefbsd at> wrote:
> On Sat, Jun 19, 2010 at 8:25 AM, b. f. <bf1783 at> 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).


More information about the freebsd-ports mailing list