Mon May 4 21:32:32 2009 UTC ()
Enable -mtune=nocona by default on x86. I have tested on a range of CPUs
and this seems to give the best results.


(ad)
diff -r1.14 -r1.15 src/gnu/usr.bin/gcc4/arch/i386/configargs.h
diff -r1.10 -r1.11 src/gnu/usr.bin/gcc4/arch/x86_64/configargs.h
diff -r1.562 -r1.563 src/share/mk/bsd.own.mk
diff -r1.31 -r1.32 src/tools/gcc/Makefile

cvs diff -r1.14 -r1.15 src/gnu/usr.bin/gcc4/arch/i386/Attic/configargs.h (expand / switch to unified diff)

--- src/gnu/usr.bin/gcc4/arch/i386/Attic/configargs.h 2009/03/27 19:38:43 1.14
+++ src/gnu/usr.bin/gcc4/arch/i386/Attic/configargs.h 2009/05/04 21:32:31 1.15
@@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
1/* This file is automatically generated. DO NOT EDIT! */ 1/* This file is automatically generated. DO NOT EDIT! */
2/* Generated from: NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp */ 2/* Generated from: NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp */
3/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ 3/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */
4 4
5/* Generated automatically. */ 5/* Generated automatically. */
6static const char configuration_arguments[] = "/home/drochner/netbsd/work.src.usbdev/tools/gcc/../../gnu/dist/gcc4/configure --target=i486--netbsdelf --enable-long-long --enable-threads --enable-__cxa_atexit --with-arch=i486 --disable-multilib --disable-symvers --build=i386-unknown-netbsdelf5.99.8 --host=i486--netbsdelf"; 6static const char configuration_arguments[] = "/home/drochner/netbsd/work.src.usbdev/tools/gcc/../../gnu/dist/gcc4/configure --target=i486--netbsdelf --enable-long-long --enable-threads --enable-__cxa_atexit --with-arch=i486 --with-tune=nocona --disable-multilib --disable-symvers --build=i386-unknown-netbsdelf5.99.8 --host=i486--netbsdelf";
7static const char thread_model[] = "posix"; 7static const char thread_model[] = "posix";
8 8
9static const struct { 9static const struct {
10 const char *name, *value; 10 const char *name, *value;
11} configure_default_options[] = { { "cpu", "i486" }, { "arch", "i486" } }; 11} configure_default_options[] = { { "cpu", "i486" }, { "arch", "i486" }, { "tune", "nocona" } };

cvs diff -r1.10 -r1.11 src/gnu/usr.bin/gcc4/arch/x86_64/Attic/configargs.h (expand / switch to unified diff)

--- src/gnu/usr.bin/gcc4/arch/x86_64/Attic/configargs.h 2008/09/01 23:52:24 1.10
+++ src/gnu/usr.bin/gcc4/arch/x86_64/Attic/configargs.h 2009/05/04 21:32:31 1.11
@@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
1/* This file is automatically generated. DO NOT EDIT! */ 1/* This file is automatically generated. DO NOT EDIT! */
2/* Generated from: NetBSD: mknative-gcc,v 1.23 2008/02/08 18:06:48 skrll Exp */ 2/* Generated from: NetBSD: mknative-gcc,v 1.23 2008/02/08 18:06:48 skrll Exp */
3/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ 3/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */
4 4
5/* Generated automatically. */ 5/* Generated automatically. */
6static const char configuration_arguments[] = "/usr/src/tools/gcc/../../gnu/dist/gcc4/configure --enable-long-long --disable-multilib --enable-threads --disable-symvers --build=x86_64-unknown-netbsd4.99.72 --host=x86_64--netbsd --target=x86_64--netbsd --enable-__cxa_atexit"; 6static const char configuration_arguments[] = "/usr/src/tools/gcc/../../gnu/dist/gcc4/configure --enable-long-long --disable-multilib --enable-threads --disable-symvers --build=x86_64-unknown-netbsd4.99.72 --host=x86_64--netbsd --target=x86_64--netbsd --enable-__cxa_atexit --with-tune=nocona";
7static const char thread_model[] = "posix"; 7static const char thread_model[] = "posix";
8 8
9static const struct { 9static const struct {
10 const char *name, *value; 10 const char *name, *value;
11} configure_default_options[] = { { "cpu", "k8" } }; 11} configure_default_options[] = { { "cpu", "k8" }, { "tune", "nocona" } };

cvs diff -r1.562 -r1.563 src/share/mk/bsd.own.mk (expand / switch to unified diff)

--- src/share/mk/bsd.own.mk 2009/05/01 20:47:53 1.562
+++ src/share/mk/bsd.own.mk 2009/05/04 21:32:31 1.563
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.own.mk,v 1.562 2009/05/01 20:47:53 apb Exp $ 1# $NetBSD: bsd.own.mk,v 1.563 2009/05/04 21:32:31 ad Exp $
2 2
3.if !defined(_BSD_OWN_MK_) 3.if !defined(_BSD_OWN_MK_)
4_BSD_OWN_MK_=1 4_BSD_OWN_MK_=1
5 5
6MAKECONF?= /etc/mk.conf 6MAKECONF?= /etc/mk.conf
7.-include "${MAKECONF}" 7.-include "${MAKECONF}"
8 8
9# 9#
10# CPU model, derived from MACHINE_ARCH 10# CPU model, derived from MACHINE_ARCH
11# 11#
12MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/} 12MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/}
13 13
14# 14#
@@ -528,26 +528,28 @@ MKPICLIB= no @@ -528,26 +528,28 @@ MKPICLIB= no
528# 528#
529# Location of the file that contains the major and minor numbers of the 529# Location of the file that contains the major and minor numbers of the
530# version of a shared library. If this file exists a shared library 530# version of a shared library. If this file exists a shared library
531# will be built by <bsd.lib.mk>. 531# will be built by <bsd.lib.mk>.
532# 532#
533SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version 533SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
534 534
535# 535#
536# GNU sources and packages sometimes see architecture names differently. 536# GNU sources and packages sometimes see architecture names differently.
537# 537#
538GNU_ARCH.coldfire=m68k 538GNU_ARCH.coldfire=m68k
539GNU_ARCH.i386=i486 539GNU_ARCH.i386=i486
540GCC_CONFIG_ARCH.i386=i486 540GCC_CONFIG_ARCH.i386=i486
 541GCC_CONFIG_TUNE.i386=nocona
 542GCC_CONFIG_TUNE.x86_64=nocona
541GNU_ARCH.m68000=m68010 543GNU_ARCH.m68000=m68010
542GNU_ARCH.sh3eb=sh 544GNU_ARCH.sh3eb=sh
543GNU_ARCH.sh3el=shle 545GNU_ARCH.sh3el=shle
544GNU_ARCH.mips64eb=mips64 546GNU_ARCH.mips64eb=mips64
545MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} 547MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
546 548
547# 549#
548# In order to identify NetBSD to GNU packages, we sometimes need 550# In order to identify NetBSD to GNU packages, we sometimes need
549# an "elf" tag for historically a.out platforms. 551# an "elf" tag for historically a.out platforms.
550# 552#
551.if ${OBJECT_FMT} == "ELF" && \ 553.if ${OBJECT_FMT} == "ELF" && \
552 (${MACHINE_GNU_ARCH} == "arm" || \ 554 (${MACHINE_GNU_ARCH} == "arm" || \
553 ${MACHINE_GNU_ARCH} == "armeb" || \ 555 ${MACHINE_GNU_ARCH} == "armeb" || \

cvs diff -r1.31 -r1.32 src/tools/gcc/Makefile (expand / switch to unified diff)

--- src/tools/gcc/Makefile 2009/03/27 19:19:49 1.31
+++ src/tools/gcc/Makefile 2009/05/04 21:32:31 1.32
@@ -1,39 +1,42 @@ @@ -1,39 +1,42 @@
1# $NetBSD: Makefile,v 1.31 2009/03/27 19:19:49 drochner Exp $ 1# $NetBSD: Makefile,v 1.32 2009/05/04 21:32:31 ad Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
5GCC_LANGUAGES=c c++ objc 5GCC_LANGUAGES=c c++ objc
6MODULE= gcc4 6MODULE= gcc4
7MKNATIVE_TARGET= gcc4 7MKNATIVE_TARGET= gcc4
8MKNATIVE_CONFIG_TARGET_LIBS= 8MKNATIVE_CONFIG_TARGET_LIBS=
9BINENV= /usr/bin/env -i 9BINENV= /usr/bin/env -i
10 10
11VAX_CONFIGURE_ARGS= 11VAX_CONFIGURE_ARGS=
12 12
13.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" 13.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64"
14MULTILIB_ARGS= --enable-multilib 14MULTILIB_ARGS= --enable-multilib
15.else 15.else
16MULTILIB_ARGS= --disable-multilib 16MULTILIB_ARGS= --disable-multilib
17.endif 17.endif
18 18
19COMMON_CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} \ 19COMMON_CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} \
20 --enable-long-long \ 20 --enable-long-long \
21 --enable-threads \ 21 --enable-threads \
22 ${VAX_CONFIGURE_ARGS} \ 22 ${VAX_CONFIGURE_ARGS} \
23 --enable-__cxa_atexit 23 --enable-__cxa_atexit
24.if defined(GCC_CONFIG_ARCH.${MACHINE_ARCH}) 24.if defined(GCC_CONFIG_ARCH.${MACHINE_ARCH})
25COMMON_CONFIGURE_ARGS+= --with-arch=${GCC_CONFIG_ARCH.${MACHINE_ARCH}} 25COMMON_CONFIGURE_ARGS+= --with-arch=${GCC_CONFIG_ARCH.${MACHINE_ARCH}}
26.endif 26.endif
 27.if defined(GCC_CONFIG_TUNE.${MACHINE_ARCH})
 28COMMON_CONFIGURE_ARGS+= --with-tune=${GCC_CONFIG_TUNE.${MACHINE_ARCH}}
 29.endif
27 30
28CONFIGURE_ARGS= ${COMMON_CONFIGURE_ARGS} \ 31CONFIGURE_ARGS= ${COMMON_CONFIGURE_ARGS} \
29 --disable-nls \ 32 --disable-nls \
30 ${MULTILIB_ARGS} \ 33 ${MULTILIB_ARGS} \
31 --program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \ 34 --program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
32 --enable-languages="${GCC_LANGUAGES}" 35 --enable-languages="${GCC_LANGUAGES}"
33 36
34MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \ 37MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \
35 LIBGCC= LIBGCC1= LIBGCC1_TEST= LIBGCC2= INSTALL_LIBGCC= \ 38 LIBGCC= LIBGCC1= LIBGCC1_TEST= LIBGCC2= INSTALL_LIBGCC= \
36 EXTRA_PARTS= CPPFLAGS=-DNETBSD_TOOLS \ 39 EXTRA_PARTS= CPPFLAGS=-DNETBSD_TOOLS \
37 AR=${HOST_AR:Q} RANLIB=${HOST_RANLIB:Q} 40 AR=${HOST_AR:Q} RANLIB=${HOST_RANLIB:Q}
38 41
39CONFIGURE_ENV+= gcc_cv_libc_provides_ssp=yes 42CONFIGURE_ENV+= gcc_cv_libc_provides_ssp=yes