From owner-svn-src-all@FreeBSD.ORG Sun Jun 19 08:38:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3203A1065677; Sun, 19 Jun 2011 08:38:52 +0000 (UTC) (envelope-from simon@nitro.dk) Received: from emx.nitro.dk (emx.nitro.dk [IPv6:2a01:4f8:120:7384::102]) by mx1.freebsd.org (Postfix) with ESMTP id BA2818FC1D; Sun, 19 Jun 2011 08:38:51 +0000 (UTC) Received: from mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) by emx.nitro.dk (Postfix) with ESMTP id E5180913F4; Sun, 19 Jun 2011 08:38:50 +0000 (UTC) Received: from emx.nitro.dk ([127.0.1.2]) by mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) (amavisd-new, port 10024) with LMTP id QOQOz2agq0m9; Sun, 19 Jun 2011 08:38:46 +0000 (UTC) Received: from [192.168.4.32] (unknown [90.184.171.166]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by emx.nitro.dk (Postfix) with ESMTPSA id 7D831913EC; Sun, 19 Jun 2011 08:38:45 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Simon L. B. Nielsen" In-Reply-To: <20110618204836.GA46582@stack.nl> Date: Sun, 19 Jun 2011 10:38:44 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201106181356.p5IDuXhW044171@svn.freebsd.org> <20110618204836.GA46582@stack.nl> To: Jilles Tjoelker X-Mailer: Apple Mail (2.1084) Cc: Ben Laurie , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Philip Paeps Subject: Re: svn commit: r223262 - in head: cddl/contrib/opensolaris/lib/libdtrace/common contrib/binutils/bfd contrib/binutils/gas contrib/binutils/gas/config contrib/binutils/ld contrib/binutils/opcodes contr... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jun 2011 08:38:52 -0000 On 18 Jun 2011, at 22:48, Jilles Tjoelker wrote: > On Sat, Jun 18, 2011 at 01:56:33PM +0000, Ben Laurie wrote: >> Modified: = head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c = Sat Jun 18 13:54:36 2011 (r223261) >> +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c = Sat Jun 18 13:56:33 2011 (r223262) >> @@ -45,6 +45,7 @@ >> #include >> #include >> #include >> +#include >>=20 >> #include >>=20 >> @@ -811,15 +812,14 @@ dt_basename(char *str) >> ulong_t >> dt_popc(ulong_t x) >> { >> -#ifdef _ILP32 >> +#if defined(_ILP32) >> x =3D x - ((x >> 1) & 0x55555555UL); >> x =3D (x & 0x33333333UL) + ((x >> 2) & 0x33333333UL); >> x =3D (x + (x >> 4)) & 0x0F0F0F0FUL; >> x =3D x + (x >> 8); >> x =3D x + (x >> 16); >> return (x & 0x3F); >> -#endif >> -#ifdef _LP64 >> +#elif defined(_LP64) >> x =3D x - ((x >> 1) & 0x5555555555555555ULL); >> x =3D (x & 0x3333333333333333ULL) + ((x >> 2) & = 0x3333333333333333ULL); >> x =3D (x + (x >> 4)) & 0x0F0F0F0F0F0F0F0FULL; >> @@ -827,6 +827,8 @@ dt_popc(ulong_t x) >> x =3D x + (x >> 16); >> x =3D x + (x >> 32); >> return (x & 0x7F); >> +#else >> +# warning need td_popc() implementation >> #endif >> } >=20 > This commit uncovers breakage that had been present for a while. If I > compile this on stable/8 i386 for head i386, _ILP32 is not defined and > the warning is hit, breaking the build. Apparently, the code had been > broken for a while but I do not use dtrace so I would not have = noticed. > The tinderboxes have now also noticed the problem so it is not = something > weird about my system. What would be the correct (at least temporary) fix? Replace the _ILP32 = / _LP64 checks with specific architecture checks ? I can see that on i386 _ILP32 isn't actually defined - but on amd64 = _LP64 is... and it still breaks. [simon@zaphod:~] ssh ref9-i386.freebsd.org 'cpp -dM < /dev/null | grep = LP' [simon@zaphod:~] ssh ref9-amd64.freebsd.org 'cpp -dM < /dev/null | grep = LP' #define __LP64__ 1 #define _LP64 1 [simon@zaphod:~] ssh ref8-amd64.freebsd.org 'cpp -dM < /dev/null | grep = LP' #define __LP64__ 1 #define _LP64 1 I must be missing something... --=20 Simon L. B. Nielsen