From owner-freebsd-current@FreeBSD.ORG Mon Sep 13 09:19:47 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4BEDE16A4CE; Mon, 13 Sep 2004 09:19:47 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BE8043D45; Mon, 13 Sep 2004 09:19:46 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i8D9JgUW083573 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Sep 2004 12:19:43 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id i8D9JiMT013954; Mon, 13 Sep 2004 12:19:44 +0300 (EEST) (envelope-from ru) Date: Mon, 13 Sep 2004 12:19:43 +0300 From: Ruslan Ermilov To: current@FreeBSD.org Message-ID: <20040913091943.GB31628@ip.net.ua> References: <200409130834.i8D8Y2ls032527@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: <200409130834.i8D8Y2ls032527@freefall.freebsd.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new cc: Dima Dorfman Subject: One method of compile testing WARNS changes on several architectures X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 09:19:47 -0000 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I thought I'd sent this out, because the standard method (through "make universe") is very time consuming when the only thing you want is to compile-test a change that covers a small part of src/. The method offered here will save you many hours then. On Mon, Sep 13, 2004 at 08:34:02AM +0000, Dima Dorfman wrote: > When you make changes like this, it's a good idea to see if you can > clamp down the program to a higher WARNS level. In this case, the > program compiles cleanly with WARNS=3D2 after your change, so I set > that. Setting WARNS in the Makefile makes sure that future changes to > the program don't cause more warnings. Since WARNS means that warnings > will break the build, though, it's good to be able to test the change > on more than one architecture to make sure you don't miss any > platform-specific issues. >=20 To test with a minimal time effort, you do this (while in src/): $ make toolchain TARGET_ARCH=3D This step should be repeated for each architecture to be tested against. This will take a lot of time, but an order less than a full buildworld. $ make _depend everything SUBDIR_OVERRIDER=3D TARGET_ARCH=3D (The underscore before "depend" is intentional.) is a part of src/ tree that you want to test (can be a list), and should be looped over with each architecture to be tested against. Example. To test if a changed bin/cat still compiles cleanly under Alpha and AMD64, e.g. due to you clamping down the WARNS level, you do this: 1. Prepare the toolchains: make toolchain TARGET_ARCH=3Dalpha make toolchain TARGET_ARCH=3Damd64 2. Test changes: make _depend everything SUBDIR_OVERRIDE=3Dbin/cat TARGET_ARCH=3Dalpha make _depend everything SUBDIR_OVERRIDE=3Dbin/cat TARGET_ARCH=3Damd64 3. You can then modify cat's sources/makefile, and repeat step #2. P.S. The syntax for PC98 would be "TARGET_ARCH=3Di386 TARGET=3Dpc98". Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBRWYvqRfpzJluFF4RAuv2AJwKmW/3sqCDWLNMFd1WEzGcRZMjzQCgmzKC oumD9+AGq8v8k12Nr3p9Qus= =PA8B -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD--