From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 15:44:50 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 330E41065675; Mon, 15 Nov 2010 15:44:50 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D5B4E8FC12; Mon, 15 Nov 2010 15:44:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id oAFFcG3s017836; Mon, 15 Nov 2010 08:38:16 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 15 Nov 2010 08:38:16 -0700 (MST) Message-Id: <20101115.083816.74734305.imp@bsdimp.com> To: kostikbel@gmail.com From: Warner Losh In-Reply-To: <20101114213749.GW2392@deviant.kiev.zoral.com.ua> References: <201011141824.oAEIOCtN089920@svn.freebsd.org> <86wrofob4q.fsf@gmail.com> <20101114213749.GW2392@deviant.kiev.zoral.com.ua> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: swell.k@gmail.com, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, freebsd-ports@FreeBSD.org Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 sys vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 15:44:50 -0000 From: Kostik Belousov Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 sys vm Date: Sun, 14 Nov 2010 23:37:49 +0200 > On Mon, Nov 15, 2010 at 12:20:37AM +0300, Anonymous wrote: > > Konstantin Belousov writes: > > > > > Author: kib > > > Date: Sun Nov 14 18:24:12 2010 > > > New Revision: 215309 > > > URL: http://svn.freebsd.org/changeset/base/215309 > > > > > > Log: > > > Use symbolic names instead of hardcoding values for magic p_osrel constants. > > > > > > MFC after: 1 week > > [...] > > > Modified: head/sys/sys/param.h > > > ============================================================================== > > > --- head/sys/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) > > > +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) > > > @@ -60,6 +60,11 @@ > > > #undef __FreeBSD_version > > > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ > > > > > > +#ifdef _KERNEL > > > +#define __FreeBSD_version_SIGSEGV 700004 > > > +#define __FreeBSD_version_MAP_ANON 800104 > > > +#endif > > > + > > > > This breaks bsd.port.mk regexp to determine OSVERSION. > > > > # Get __FreeBSD_version > > .if !defined(OSVERSION) > > .if exists(/usr/include/sys/param.h) > > OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h > > .elif exists(/usr/src/sys/sys/param.h) > > OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h > > .else > > OSVERSION!= ${SYSCTL} -n kern.osreldate > > .endif > > .endif > > > > $ make -V OSVERSION > > 900025 700004 800104 > > > > And every port chokes on it. > > > > $ make -C devel/libpthread-stubs > > "Makefile", line 26: warning: String comparison operator should be either == or != > > "Makefile", line 26: Malformed conditional (${OSVERSION} < 700000) > > "Makefile", line 28: if-less endif > > "/usr/ports/Mk/bsd.port.mk", line 1739: warning: String comparison operator should be either == or != > > "/usr/ports/Mk/bsd.port.mk", line 1739: Malformed conditional (defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )) > > "/usr/ports/Mk/bsd.port.mk", line 6394: if-less endif > > make: fatal errors encountered -- cannot continue > > > > %% > > Index: Mk/bsd.port.mk > > =================================================================== > > RCS file: /a/.cvsup/ports/Mk/bsd.port.mk,v > > retrieving revision 1.654 > > diff -u -p -r1.654 bsd.port.mk > > --- Mk/bsd.port.mk 8 Nov 2010 16:07:03 -0000 1.654 > > +++ Mk/bsd.port.mk 14 Nov 2010 21:18:32 -0000 > > @@ -1219,9 +1219,9 @@ OSREL!= ${UNAME} -r | ${SED} -e 's/[-(]. > > # Get __FreeBSD_version > > .if !defined(OSVERSION) > > .if exists(/usr/include/sys/param.h) > > -OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h > > +OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version[[:blank:]]/ {print $$3}' < /usr/include/sys/param.h > > .elif exists(/usr/src/sys/sys/param.h) > > -OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h > > +OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version[[:blank:]]/ {print $$3}' < /usr/src/sys/sys/param.h > > .else > > OSVERSION!= ${SYSCTL} -n kern.osreldate > > .endif > > %% > > I think it is better to select different namespace for the special versions. > Can you confirm that the following patch fixes the ports mk for you ? > It is enough to cd /usr/src/include && make install after patching. I think this is a better idea. There's a number of other places lurking that make a similar assumption. Warner