From owner-freebsd-ports@FreeBSD.ORG Fri Sep 10 16:12:46 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 230FC16A4CE for ; Fri, 10 Sep 2004 16:12:46 +0000 (GMT) Received: from blake.polstra.com (blake.polstra.com [64.81.189.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id B782243D39 for ; Fri, 10 Sep 2004 16:12:45 +0000 (GMT) (envelope-from jdp@polstra.com) Received: from strings.polstra.com (dsl081-189-067.sea1.dsl.speakeasy.net [64.81.189.67]) by blake.polstra.com (8.12.11/8.12.11) with ESMTP id i8AGCdcg013801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 10 Sep 2004 09:12:39 -0700 (PDT) (envelope-from jdp@strings.polstra.com) Received: (from jdp@localhost) by strings.polstra.com (8.12.11/8.12.11/Submit) id i8AGCdgH008425 for freebsd-ports@freebsd.org; Fri, 10 Sep 2004 09:12:39 -0700 (PDT) (envelope-from jdp) Message-ID: X-Mailer: XFMail 1.5.5 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Fri, 10 Sep 2004 09:12:39 -0700 (PDT) From: John Polstra To: freebsd-ports@freebsd.org X-Bogosity: No, tests=bogofilter, spamicity=0.476267, version=0.14.5 Subject: Re: Best way to override user's CFLAGS in a port? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2004 16:12:46 -0000 On 10-Sep-2004 Matthias Andree wrote: > Michael Nottebrock writes: > >> If it's so well known that -O higher than 1 will not work, the >> upstream source should be modified to that -O will be appended to any >> CFLAGS, thus overriding any user-specified optimization setting. > > Indeed, Horio and you are right, hadn't thought of the obvious way :) Yes, this sounds like a good solution. It won't work if the user specifies CFLAGS on the make command line, but I don't care about that case. John