Subject: Re: 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/14/2006 02:28:56
--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jun 05, 2006 at 10:12:27PM -0500, Jonathan A. Kollasch wrote:
> 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.
>=20
> Or, am I, as usual, doing something wrong?

Nope, almost certainly gcc.

I got around this with:

TOOLDIR=3D/home/jakllsch/build-1150230364/src/tooldir.NetBSD-3.0-x86_64 ./b=
uild.sh -U -u -m i386 kernel=3DINSTALL

=2E/tooldir.NetBSD-3.0-x86_64/bin/i386--netbsdelf-mdsetimage sys/arch/i386/=
compile/obj/INSTALL/netbsd distrib/i386/ramdisks/ramdisk-big/obj/ramdisk-bi=
g.fs

after setting up an override $MAKECONF with "COPTS+=3D -O2" in addition
to the stuff that was in the $MAKECONF that the original ./build.sh
release was run with.

I've send-pr(1)ed.

	Jonathan Kollasch

--2oS5YaxWCcQjTEyO
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFEj7q4Ojx1ye3hmokRAmO9AJ9pVpZ9yUpj7QzJ0fFzFT4LXIf+TwCcDXmj
j8byclffkHFNoVq9Cu4QoLw=
=zUr7
-----END PGP SIGNATURE-----

--2oS5YaxWCcQjTEyO--