Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2004 12:19:43 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        current@FreeBSD.org
Cc:        Dima Dorfman <dd@FreeBSD.org>
Subject:    One method of compile testing WARNS changes on several architectures
Message-ID:  <20040913091943.GB31628@ip.net.ua>
In-Reply-To: <200409130834.i8D8Y2ls032527@freefall.freebsd.org>
References:  <200409130834.i8D8Y2ls032527@freefall.freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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=2 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.
> 
To test with a minimal time effort, you do this (while in src/):

$ make toolchain TARGET_ARCH=<arch>

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=<bit> TARGET_ARCH=<arch>

(The underscore before "depend" is intentional.)  <bit> is a part
of src/ tree that you want to test (can be a list), and <arch>
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=alpha
make toolchain TARGET_ARCH=amd64

2.  Test changes:

make _depend everything SUBDIR_OVERRIDE=bin/cat TARGET_ARCH=alpha
make _depend everything SUBDIR_OVERRIDE=bin/cat TARGET_ARCH=amd64

3.  You can then modify cat's sources/makefile, and repeat step #2.

P.S.  The syntax for PC98 would be "TARGET_ARCH=i386 TARGET=pc98".


Cheers,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBRWYvqRfpzJluFF4RAuv2AJwKmW/3sqCDWLNMFd1WEzGcRZMjzQCgmzKC
oumD9+AGq8v8k12Nr3p9Qus=
=PA8B
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040913091943.GB31628>