Subject: Re: gcc on x86 - any cool gimmicks?
To: Peter Seebach <seebs@plethora.net>
From: Wojciech Puchar <wojtek@chylonia.3miasto.net>
List: port-i386
Date: 08/07/2002 22:43:47
> To: port-i386@netbsd.org
> Subject: gcc on x86 - any cool gimmicks?
>
> It just occurred to me: By default, gcc is building 386-compatible binaries
> with reasonably general optimization. Does gcc know enough to optimize
> well for PII or PIII processors? Is doing this remotely safe or supported?
yes. it's 30-50% speedup.
i added to /usr/src/gnu/usr.bin/egcs
CPPFLAGS+= -DHAVE_CONFIG_H -DPREFIX=\"/usr\" \
-DDEFAULT_TARGET_VERSION=\"${EGCS_VERSION}\" \
-DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_ARCH}-netbsd\" \
-DSTANDARD_STARTFILE_PREFIX=\"/usr/lib/\" \
-DSTANDARD_EXEC_PREFIX=\"/usr/libexec/\" \
-DTOOLDIR_BASE_PREFIX=\"/usr/libexec/\" \
extra line -DTARGET_CPU_DEFAULT=2
in my 1.5.3 sources, did make;make install;make clean in this directory
then did normal build of everything to /altroot, packed everything to
.tgz, unpacked it with --unlink to /
so i have pentium optimized binaries and pentium-defaulting cc, then
recompiled my custom kernel, then packages from /usr/src/pkgsrc
i can send you already done .tgz if you like.