Enable -mtune=nocona by default on x86. I have tested on a range of CPUs and this seems to give the best results.diff -r1.14 -r1.15 src/gnu/usr.bin/gcc4/arch/i386/configargs.h
(ad)
--- 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. */ | |
6 | static 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"; | 6 | static 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"; | |
7 | static const char thread_model[] = "posix"; | 7 | static const char thread_model[] = "posix"; | |
8 | 8 | |||
9 | static const struct { | 9 | static 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" } }; |
--- 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. */ | |
6 | static 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"; | 6 | static 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"; | |
7 | static const char thread_model[] = "posix"; | 7 | static const char thread_model[] = "posix"; | |
8 | 8 | |||
9 | static const struct { | 9 | static 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" } }; |
--- 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
--- 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 | |||
5 | GCC_LANGUAGES=c c++ objc | 5 | GCC_LANGUAGES=c c++ objc | |
6 | MODULE= gcc4 | 6 | MODULE= gcc4 | |
7 | MKNATIVE_TARGET= gcc4 | 7 | MKNATIVE_TARGET= gcc4 | |
8 | MKNATIVE_CONFIG_TARGET_LIBS= | 8 | MKNATIVE_CONFIG_TARGET_LIBS= | |
9 | BINENV= /usr/bin/env -i | 9 | BINENV= /usr/bin/env -i | |
10 | 10 | |||
11 | VAX_CONFIGURE_ARGS= | 11 | VAX_CONFIGURE_ARGS= | |
12 | 12 | |||
13 | .if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" | 13 | .if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" | |
14 | MULTILIB_ARGS= --enable-multilib | 14 | MULTILIB_ARGS= --enable-multilib | |
15 | .else | 15 | .else | |
16 | MULTILIB_ARGS= --disable-multilib | 16 | MULTILIB_ARGS= --disable-multilib | |
17 | .endif | 17 | .endif | |
18 | 18 | |||
19 | COMMON_CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} \ | 19 | COMMON_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}) | |
25 | COMMON_CONFIGURE_ARGS+= --with-arch=${GCC_CONFIG_ARCH.${MACHINE_ARCH}} | 25 | COMMON_CONFIGURE_ARGS+= --with-arch=${GCC_CONFIG_ARCH.${MACHINE_ARCH}} | |
26 | .endif | 26 | .endif | |
27 | .if defined(GCC_CONFIG_TUNE.${MACHINE_ARCH}) | |||
28 | COMMON_CONFIGURE_ARGS+= --with-tune=${GCC_CONFIG_TUNE.${MACHINE_ARCH}} | |||
29 | .endif | |||
27 | 30 | |||
28 | CONFIGURE_ARGS= ${COMMON_CONFIGURE_ARGS} \ | 31 | CONFIGURE_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 | |||
34 | MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \ | 37 | MAKE_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 | |||
39 | CONFIGURE_ENV+= gcc_cv_libc_provides_ssp=yes | 42 | CONFIGURE_ENV+= gcc_cv_libc_provides_ssp=yes |