From owner-freebsd-ports@FreeBSD.ORG Tue Jun 22 06:18:12 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64F17106566C; Tue, 22 Jun 2010 06:18:12 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id C8E218FC1D; Tue, 22 Jun 2010 06:18:11 +0000 (UTC) Received: by wwe15 with SMTP id 15so888901wwe.13 for ; Mon, 21 Jun 2010 23:18:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=Jr78THi+eNa1RUfE5z7pxwlHHwnNqeN3y+M1KeatXSM=; b=jeN1LXtDEtlRH937a+I67S4xR4guQW5COHqlk13h3lqtQ5lS0eZuwO7v2S5YMt0TkB Iwk+EfkGWtEpWxEIC7O0E1D3MGwM20XRT9kaxyljhXJ9k+YZ8c/CiLeDShW28jsDgx9J itXIRxWWWtZTvSumheQLqIU4EnRUwagtzHkiQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=xgQQ2ty0gZ/75Z2IiBeSUNO8BLxIDZmGK1eOs4EOe1f5xNj5sxdDoEPzAZoHO5uLnW oR1HXjW7oU+/XYz3ZLAfmAnbxHVq/BJ2us7HIowBgs52FW6kn26GgWsIhQBAgwgcnXai 9Qf1PCR+EYvGR4hC6gt8qQBqkDap9Z9UIMHFc= MIME-Version: 1.0 Received: by 10.216.85.70 with SMTP id t48mr4227594wee.59.1277187490455; Mon, 21 Jun 2010 23:18:10 -0700 (PDT) Received: by 10.216.168.1 with HTTP; Mon, 21 Jun 2010 23:18:10 -0700 (PDT) In-Reply-To: References: Date: Tue, 22 Jun 2010 06:18:10 +0000 Message-ID: From: "b. f." To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Cc: dougb@freebsd.org, freebsd-ports@freebsd.org Subject: Re: lang/perl5.10 doesn't build with gcc 4.5.1 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2010 06:18:12 -0000 On 6/22/10, Garrett Cooper wrote: > On Sat, Jun 19, 2010 at 8:25 AM, 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. > > 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.