From owner-freebsd-ports@FreeBSD.ORG Wed Sep 8 13:12:45 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 8D26E16A4CE for ; Wed, 8 Sep 2004 13:12:45 +0000 (GMT) Received: from mail.dt.e-technik.uni-dortmund.de (mail.dt.e-technik.Uni-Dortmund.DE [129.217.163.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id B94E643D39 for ; Wed, 8 Sep 2004 13:12:44 +0000 (GMT) (envelope-from ma@dt.e-technik.uni-dortmund.de) Received: from localhost (localhost [127.0.0.1])139A0386A5; Wed, 8 Sep 2004 15:12:44 +0200 (CEST) Received: from mail.dt.e-technik.uni-dortmund.de ([127.0.0.1]) by localhost (krusty [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15202-02-2; Wed, 8 Sep 2004 15:12:44 +0200 (CEST) Received: from m2a2.dyndns.org (pD9E1E055.dip.t-dialin.net [217.225.224.85]) B7D3E3568E; Wed, 8 Sep 2004 15:12:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id CB41CD3AFA; Wed, 8 Sep 2004 15:12:42 +0200 (CEST) Received: from merlin.emma.line.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14192-03; Wed, 8 Sep 2004 15:12:42 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id 70D4CD3AD8; Wed, 8 Sep 2004 15:12:42 +0200 (CEST) To: John Polstra In-Reply-To: (John Polstra's message of "Tue, 07 Sep 2004 11:47:25 -0700 (PDT)") References: From: Matthias Andree Date: Wed, 08 Sep 2004 15:12:42 +0200 Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at dt.e-technik.uni-dortmund.de cc: ports@freebsd.org cc: Oliver Eikemeier 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: Wed, 08 Sep 2004 13:12:45 -0000 John Polstra writes: > I'm afraid if I do that, I'll get even more bug reports. Likely, because it tells the user what NOT to do, but does not tell him what to do, and he'll inquire about that. The BROKEN message should print that the user must use -O1 rather than -O2 or -O3 for this particular port. Note that "-O." isn't a sufficient regexp, some users use -O99 which, when it becomes -O19 or -O9 still hoses the build of the b0rked application. How about: CFLAGS:= ${CFLAGS:C/-O[s1-9][0-9]*/-O1/g} This degrades all -O options (including -Os!) to -O1 but leaves -O and -O0 alone. > The Porter's Handbook text seems mainly to say that the port should > append to CFLAGS with "+=" rather than simply clobbering it with "=". > That makes sense. But it seems reasonable for the port to remove a > specific setting (-O[2-9]) from CFLAGS if the porter knows that that > setting will break the port. It's not quite the same as clobbering > CFLAGS totally. I second that. > The ezm3 port's Makefile is already a bit strange, because it invokes > ${GMAKE} itself in a special do-install target. I can strip off the > -O[2-9] there. I was just wondering if there was a more official > way to do it. Let's just write the Makefile line given above into the porters-handbook ;-) -- Matthias Andree Encrypted mail welcome: my GnuPG key ID is 0x052E7D95 (PGP/MIME preferred)