From owner-svn-src-stable@freebsd.org Tue Mar 15 03:20:26 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A966AC2313; Tue, 15 Mar 2016 03:20:26 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41995A94; Tue, 15 Mar 2016 03:20:26 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2F3KPA9045609; Tue, 15 Mar 2016 03:20:25 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2F3KPcs045606; Tue, 15 Mar 2016 03:20:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201603150320.u2F3KPcs045606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 15 Mar 2016 03:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r296887 - stable/8/usr.bin/xlint/lint1 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2016 03:20:26 -0000 Author: ian Date: Tue Mar 15 03:20:24 2016 New Revision: 296887 URL: https://svnweb.freebsd.org/changeset/base/296887 Log: MFC r206424: (by rdivacky in 2010) Rename the ALIGN macro to LINT_ALIGN so it does not clash with machine/param.h Bump the alignment to 16bytes because lint1 memory allocator is used for objects that require 16bytes alignment on amd64 (ie. val_t). This makes lint1 work when compiled with compiler(s) that use SSE for memcpy on amd64. (e.g. clang). This allows me to compile stable-8 on a 64-bit build host running 10-stable, without dying during the xlint build. It should work fine on 11-current too. Modified: stable/8/usr.bin/xlint/lint1/decl.c stable/8/usr.bin/xlint/lint1/lint1.h stable/8/usr.bin/xlint/lint1/mem1.c Directory Properties: stable/8/usr.bin/xlint/ (props changed) Modified: stable/8/usr.bin/xlint/lint1/decl.c ============================================================================== --- stable/8/usr.bin/xlint/lint1/decl.c Tue Mar 15 01:37:58 2016 (r296886) +++ stable/8/usr.bin/xlint/lint1/decl.c Tue Mar 15 03:20:24 2016 (r296887) @@ -825,15 +825,15 @@ getbound(type_t *tp) } else if (t == FUNC) { /* compiler takes alignment of function */ error(14); - a = ALIGN(1) * CHAR_BIT; + a = LINT_ALIGN(1) * CHAR_BIT; } else { if ((a = size(t)) == 0) { a = CHAR_BIT; - } else if (a > ALIGN(1) * CHAR_BIT) { - a = ALIGN(1) * CHAR_BIT; + } else if (a > LINT_ALIGN(1) * CHAR_BIT) { + a = LINT_ALIGN(1) * CHAR_BIT; } } - if (a < CHAR_BIT || a > ALIGN(1) * CHAR_BIT) + if (a < CHAR_BIT || a > LINT_ALIGN(1) * CHAR_BIT) lerror("getbound() 1"); return (a); } Modified: stable/8/usr.bin/xlint/lint1/lint1.h ============================================================================== --- stable/8/usr.bin/xlint/lint1/lint1.h Tue Mar 15 01:37:58 2016 (r296886) +++ stable/8/usr.bin/xlint/lint1/lint1.h Tue Mar 15 03:20:24 2016 (r296887) @@ -38,8 +38,8 @@ __FBSDID("$FreeBSD$"); #include "op.h" /* XXX - works for most systems, but the whole ALIGN thing needs to go away */ -#ifndef ALIGN -#define ALIGN(x) (((x) + 7) & ~7) +#ifndef LINT_ALIGN +#define LINT_ALIGN(x) (((x) + 15) & ~15) #endif /* Modified: stable/8/usr.bin/xlint/lint1/mem1.c ============================================================================== --- stable/8/usr.bin/xlint/lint1/mem1.c Tue Mar 15 01:37:58 2016 (r296886) +++ stable/8/usr.bin/xlint/lint1/mem1.c Tue Mar 15 03:20:24 2016 (r296887) @@ -203,7 +203,7 @@ xgetblk(mbl_t **mbp, size_t s) void *p; size_t t = 0; - s = ALIGN(s); + s = LINT_ALIGN(s); if ((mb = *mbp) == NULL || mb->nfree < s) { if ((mb = frmblks) == NULL) { if (s > mblklen) {