From owner-freebsd-ports@FreeBSD.ORG Mon Feb 7 19:08:52 2011 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D95C41065694 for ; Mon, 7 Feb 2011 19:08:52 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward14.mail.yandex.net (forward14.mail.yandex.net [95.108.130.92]) by mx1.freebsd.org (Postfix) with ESMTP id 8994B8FC0A for ; Mon, 7 Feb 2011 19:08:52 +0000 (UTC) Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward14.mail.yandex.net (Yandex) with ESMTP id 889CB30D0609 for ; Mon, 7 Feb 2011 22:08:51 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1297105731; bh=zlcllqDz2rgLXISKNSE3vpzZbyXxYm/lRGUszLq+SZ0=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=rF2PNcTpajPFBJJr8OR/WH9w9xebxc78Zo9h9iBnV+XkAy5TYJ4WyQ4T3I/1nRQo9 JX9Yuk3yFuwHVqJzZyCWwxfrqEz8WxMtMNuesAFBn05sbD4sBPZgogSg4oH91QjXRL Zk4W6o1gXIhwVC0IXCQ7MTKeCMWeeCtkVxPz0bYU= Received: from smeshariki2.local (unknown [178.76.212.172]) by smtp13.mail.yandex.net (Yandex) with ESMTPSA id 8C66F3898081; Mon, 7 Feb 2011 22:08:50 +0300 (MSK) Message-ID: <4D5042F8.70202@yandex.ru> Date: Mon, 07 Feb 2011 22:07:36 +0300 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110106 Thunderbird/3.1.7 MIME-Version: 1.0 To: Konstantin Tokarev References: <4D502D22.3000200@yandex.ru> <567921297101056@web95.yandex.ru> In-Reply-To: <567921297101056@web95.yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: FreeBSD Ports Mailing List Subject: Re: How to not use OPTIMIZED_FLAGS properly X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2011 19:08:52 -0000 07.02.2011 20:50, Konstantin Tokarev пишет: > > > 07.02.2011, 20:34, "Ruslan Mahmatkhanov": >> Hello. >> >> I'm working on port that doesn't builds with "-O2 -pipe", that passed to >> Makefile by default (it exits with message about virtual memory is >> exhausted). I can avoid this by setting CFLAGS="" and CXXFLAGS="" in >> CONFIGURE_ENV. But portlint is complaining like this: >> >> WARN: Makefile: CFLAGS/CXXFLAGS are not needed in CONFIGURE_ENV as they >> are already added there in bsd.port.mk. >> FATAL: Makefile: CFLAGS are clobbered in CONFIGURE_ENV. Alter CFLAGS in >> the Makefile with CFLAGS+=... instead >> FATAL: Makefile: CXXFLAGS are clobbered in CONFIGURE_ENV. Alter >> CXXFLAGS in the Makefile with CXXFLAGS+=... instead >> >> What is the right way to do the job? >> >> PS. If i set -O0 in CONFIGURE_ENV, it's later redefined to "-O2 -pipe". > > Have you tried CFLAGS+=-O0 as portlint suggested? As i said before i tried that. If i'm using +=-O0 then it changes to -O2 -pipe. If i'm using =-O0, then all builds fine, but this make portlint complaining. -- Regards, Ruslan