1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/gcc/3.4.0/gcc-3.4.0-ultrasparc3-default64.patch Sun May 27 20:22:06 2007 +0000
1.3 @@ -0,0 +1,52 @@
1.4 +Date: Sat, 1 May 2004 21:08:10 +0200
1.5 +From: Jakub Jelinek <jakub@redhat.com>
1.6 +To: Dan Kegel <dank@kegel.com>, mark@codesourcery.com
1.7 +Cc: gcc-patches@gcc.gnu.org
1.8 +Subject: [PATCH] sparc64-linux --with-cpu=ultrasparc fix
1.9 +Message-ID: <20040501190810.GD5191@sunsite.ms.mff.cuni.cz>
1.10 +Reply-To: Jakub Jelinek <jakub@redhat.com>
1.11 +References: <40940B11.9080907@kegel.com>
1.12 +In-Reply-To: <40940B11.9080907@kegel.com>
1.13 +
1.14 +On Sat, May 01, 2004 at 01:39:45PM -0700, Dan Kegel wrote:
1.15 +> I'm having a bit of trouble configuring gcc-3.4.0 for sparc64-linux.
1.16 +> The resulting compiler defaults to sparc32, which is a problem
1.17 +> because it means having to figure out how to add
1.18 +> -mcpu=ultrasparc3 -Wa,-Av9a -m64 to CFLAGS for everything I build.
1.19 +> The worst part is that this even affects libgcc.a, which makes it
1.20 +> pretty hard to link any sparc64 executables. I could figure out
1.21 +> how mklibgcc and multilibbing work, and maybe thereby get a good 64 bit
1.22 +> libgcc.a,
1.23 +> but I'd kind of like to avoid that for the moment, and just really get
1.24 +> gcc to default to 64 bit output.
1.25 +>
1.26 +> What's the right way to get gcc to default to building 64 bit executables
1.27 +> when targeting sparc64-linux?
1.28 +
1.29 +There was TARGET_CPU_ultrasparc3 missing in linux64.h.
1.30 +I've commited the following fix to the trunk, but as it is not a regression,
1.31 +I'm not sure if Mark is ok with this for gcc-3_4-branch.
1.32 +
1.33 +2004-05-01 Jakub Jelinek <jakub@redhat.com>
1.34 +
1.35 + * config/sparc/linux64.h (TARGET_DEFAULT): Make 64-bit by default
1.36 + also for TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3.
1.37 +
1.38 +--- gcc-3.4.0/gcc/config/sparc/linux64.h.jj 2004-05-01 22:59:52.000000000 +0200
1.39 ++++ gcc-3.4.0/gcc/config/sparc/linux64.h 2004-05-01 23:00:41.126176529 +0200
1.40 +@@ -39,7 +39,9 @@ Boston, MA 02111-1307, USA. */
1.41 + #undef MD_EXEC_PREFIX
1.42 + #undef MD_STARTFILE_PREFIX
1.43 +
1.44 +-#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
1.45 ++#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
1.46 ++ || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
1.47 ++ || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3
1.48 + /* A 64 bit v9 compiler with stack-bias,
1.49 + in a Medium/Low code model environment. */
1.50 +
1.51 +
1.52 + Jakub
1.53 +
1.54 +
1.55 +