On the 3.3 branch: [eric@localhost obj.sparc]$ gcc/xgcc -Bgcc -S -### t.c -m64 Reading specs from gcc/specs Configured with: ../configure --host=i586-redhat-linux-gnu --target=sparc-sun-solaris2.8 --prefix=/usr/local --enable-checking=misc,tree,rtlflag --enable-languages=c,c++ Thread model: posix gcc version 3.3.5 20040703 (prerelease) "gcc/cc1" "-quiet" "-iprefix" "/home/eric/cvs/gcc-3_3-branch/obj.sparc/gcc/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.5/" "-isystem" "gcc/include" "-D__GNUC__=3" "-D__GNUC_MINOR__=3" "-D__GNUC_PATCHLEVEL__=5" "-Dsparc" "-D__sparc__" "-D__sparc" "-D__arch64__" "-Acpu=sparc64" "-Amachine=sparcv9" "-D__sparcv9" "t.c" "-mptr64" "-mstack-bias" "-mno-v8plus" "-mcpu=v9" "-quiet" "-dumpbase" "t.c" "-m64" "-auxbase" "t" "-o" "t.s" On the 3.4 branch and up: [eric@localhost obj.sparc]$ gcc/xgcc -Bgcc -S -### t.c -m64 Reading specs from gcc/specs Configured with: ../configure --host=i586-redhat-linux-gnu --target=sparc-sun-solaris2.8 --prefix=/usr/local --enable-checking=misc,tree,rtlflag --enable-languages=c,c++ Thread model: posix gcc version 3.4.2 20040706 (prerelease) "gcc/cc1" "-quiet" "-iprefix" "/home/eric/cvs/gcc-3_4-branch/obj.sparc/gcc/../lib/gcc/sparc-sun-solaris2.8/3.4.2/" "-isystem" "gcc/include" "-D__arch64__" "-D__sparcv9" "t.c" "-mptr64" "-mstack-bias" "-mno-v8plus" "-quiet" "-dumpbase" "t.c" "-m64" "-mcpu=v7" "-auxbase" "t" "-o" "t.s" which I find stupid. This comes from the --with-cpu mechanism at configure time, which defaults to v7 on sparc-*-*, so the driver behaves as if -mcpu=v7 were passed.
Investigating.
Subject: Bug 16416 CVSROOT: /cvs/gcc Module name: gcc Changes by: ebotcazou@gcc.gnu.org 2004-07-09 08:31:34 Modified files: gcc : ChangeLog gcc/config/sparc: sol2-bi.h Log message: PR target/16416 * config/sparc/sol2-bi.h (OPTION_DEFAULT_SPECS): New macro. Override default settings to account for -m32 and -m64. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4409&r2=2.4410 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sparc/sol2-bi.h.diff?cvsroot=gcc&r1=1.17&r2=1.18
Subject: Bug 16416 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: ebotcazou@gcc.gnu.org 2004-07-09 08:33:01 Modified files: gcc : ChangeLog gcc/config/sparc: sol2-bi.h Log message: PR target/16416 * config/sparc/sol2-bi.h (OPTION_DEFAULT_SPECS): New macro. Override default settings to account for -m32 and -m64. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.543&r2=2.2326.2.544 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sparc/sol2-bi.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.14.4.2&r2=1.14.4.3
See http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00897.html