From owner-freebsd-ports@FreeBSD.ORG Fri Apr 4 13:10:06 2008 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 A11B3106566C for ; Fri, 4 Apr 2008 13:10:06 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.174]) by mx1.freebsd.org (Postfix) with ESMTP id 3C74A8FC24 for ; Fri, 4 Apr 2008 13:10:06 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-064-191-206.pools.arcor-ip.net [88.64.191.206]) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis) id 0ML21M-1JhlgB03an-0003tG; Fri, 04 Apr 2008 15:10:05 +0200 Received: (qmail 14753 invoked from network); 4 Apr 2008 13:09:04 -0000 Received: from myhost.laiers.local (192.168.4.151) by laiers.local with SMTP; 4 Apr 2008 13:09:04 -0000 From: Max Laier Organization: FreeBSD To: freebsd-ports@freebsd.org Date: Fri, 4 Apr 2008 15:07:45 +0200 User-Agent: KMail/1.9.9 References: <200804041321.25472.max@love2party.net> In-Reply-To: MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_hgi9HbyTOAEGnR3" Message-Id: <200804041507.45334.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19dxj050vEA7bcOWCyPFJ0qnVqBQRNmsxNdL0Q PjfTZPE3Fo/LsoL33oGvCshIjTbIoMfC0wQp9MR/xzh1TRFCVR gwlMNOgyIYA2cJ46CG4Pg== Cc: Dirk Meyer Subject: Re: How to set CFLAGS for the build step? 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: Fri, 04 Apr 2008 13:10:06 -0000 --Boundary-00=_hgi9HbyTOAEGnR3 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 04 April 2008 14:21:23 Dirk Meyer wrote: > Max Laier schrieb:, > > > Okay, this doesn't help one bit - sorry. Or are you suggesting that > > I simply disregard user-set CFLAGS in make.conf by using /dev/null as > > make.conf? This seems to contradict > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dad > >s-cflags.html > > Only on first glance. > > the modified CFLAGS should conatin the definition in /etc/make.conf > from the run of the port Makefile. > Then it is passed down in enviroment to bsdmake and the makefile > of the distribution. > > Example: mail/spamilter > > $ make -V CFLAGS -f /dev/null > -O -pipe -march=pentiumpro > $ make -V MAKE_ENV > [...] __MAKE_CONF=/dev/null [...] CFLAGS="-O -pipe -march=pentiumpro " > [...] $ make -V MAKE_ENV WITH_SENDMAIL_PORT=1 > [...] __MAKE_CONF=/dev/null [...] CFLAGS="-O -pipe -march=pentiumpro > -I/usr/local/include" [...] > > The makefile of the distribution don't have to include make.conf. > To honor CC/CFLAGS/LDFLAGS ...., they have to be passed in the > enviroment. Okay ... so the attached should fix my problem, right? But it seems that I'd have to anticipate what kind of settings a user wants in their make.conf, wouldn't I? While CFLAGS seems to be passed magically, CC or LDFLAGS are not. I don't care all that much as long as it works for me, but it seems broken. > Either unmodified or modified. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-00=_hgi9HbyTOAEGnR3 Content-Type: text/plain; charset="utf-8"; name="pftop.cflags.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pftop.cflags.diff" Index: Makefile =================================================================== RCS file: /home/mlaier/fcvs/ports/sysutils/pftop/Makefile,v retrieving revision 1.10 diff -u -r1.10 Makefile --- Makefile 1 Apr 2008 15:10:34 -0000 1.10 +++ Makefile 4 Apr 2008 13:02:17 -0000 @@ -40,6 +40,8 @@ CFLAGS+= -DHAVE_ALTQ=1 .endif +MAKE_ENV+= __MAKE_CONF=/dev/null + PLIST_FILES= sbin/pftop post-patch: --Boundary-00=_hgi9HbyTOAEGnR3--