Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Dec 2008 18:25:44 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, kientzle@FreeBSD.org, "M. Warner Losh" <imp@bsdimp.com>, src-committers@FreeBSD.org
Subject:   Re: svn commit: r185499 - head
Message-ID:  <86k5afyhrb.fsf@ds4.des.no>
In-Reply-To: <20081204163542.GQ27096@elvis.mu.org> (Alfred Perlstein's message of "Thu, 4 Dec 2008 08:35:42 -0800")
References:  <49338E98.7020104@freebsd.org> <863ah8rvcd.fsf@ds4.des.no> <20081201132554.GD27096@elvis.mu.org> <20081201.221040.-1350500631.imp@bsdimp.com> <20081204095756.GP27096@elvis.mu.org> <863ah4158t.fsf@ds4.des.no> <20081204163542.GQ27096@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein <alfred@freebsd.org> writes:
> Really?  So a person on a i386 platform that touches let's say
> src/sys/proc.h will have quality checked via "make buildworld"
> to the degree that they know it won't break all other platforms
> too?

You are trying to turn this into a developers vs. tinderbox issue.  It's
not.  The kind of mistakes that break the tinderbox directly affect
users and other developers.

If your changes affect MD code or relies on the size or endianness of
specific types, you should cross-build to an architecture with different
register width and endianness.  I wish I didn't have to point this out;
it should be obvious to anyone.  After all, it's been almost ten years
since we added our first non-i386 platform (alpha).  I created the
tinderbox precisely because obrien@ got mad at me for repeatedly
breaking the alpha build.

Most bit-width issues can be caught by cross-building to amd64 if you're
working on i386, and to i386 if you're working on amd64.  However, the
most common bit-width-related mistake is to assume that various types
(long, size_t, time_t etc) are the same size as int, so you are far less
likely to break i386 (where they are) when working on amd64 (where they
aren't) than the reverse.

Endianness issues will usually only become apparent when you *run* the
code, but they're usually a matter of network vs host order, and will
therefore show up on both i386 and amd64.

The final class of problems is those that arise from the use of MD
interfaces that are implemented only on i386 and amd64.  These two
platforms are sufficiently similar that code written for one usually
compiles and runs on the other, but it may not compile and run on, say,
powerpc or sparc64.  For instance, certain atomic operations are not
implemented on arm (or weren't, the last time I looked).  Therefore, you
are probably better off cross-building to powerpc (32-bit big-endian)
when working on amd64 (64-bit little-endian), and to sparc64 (64-bit
big-endian) when working on i386 (32-bit little-endian).

Cross-building is easy.  It is described in build(7), which every
committer should read.  If anything in that man page is unclear, feel
free to ask me, or ru@ if I'm unavailable - and to update the man page
once you've been enlightened.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



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