Subject: GCC4 breaks i386 kernels compiled with -Os?
To: None <current-users@NetBSD.org>
From: Jonathan A. Kollasch <jakllsch@kollasch.net>
List: current-users
Date: 06/05/2006 22:12:27
--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

I thought I'd give GCC 4 a spin on a build of -current.

MAKECONF points to:
HAVE_GCC=4
CFLAGS+= -pipe

So, the build successfully completed and all, then I go to
netboot the INSTALL kernel on an old OptiPlex GX1p box.

When the riser board (containing a com@isa and ppb@pci) is
installed it gets to com2 at isa0 and reboots.  Without the
riser board it gets to isapnp0 at isa0 and reboots.

However when I boot the GENERIC_LAPTOP kernel on my Compaq M2005US
it gets to userlevel fine.  Booting GENERIC on the OptiPlex also
works.

I'm inclined to believe, based on my previous experience with GCC's
optimizer, and that INSTALL kernels are compiled with -Os, that GCC
is not doing the right thing when told to optimize for size.

Or, am I, as usual, doing something wrong?

	Jonathan Kollasch

--zhXaljGHf11kAtnf
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFEhPKaOjx1ye3hmokRAii0AJwN41NG53kzVNlxrRgX61sMBSi8UwCfaFV0
lnzTXpctedtZcchVOfGxVy0=
=d3lH
-----END PGP SIGNATURE-----

--zhXaljGHf11kAtnf--