yann@1
|
1 |
Date: Sat, 1 May 2004 21:08:10 +0200
|
yann@1
|
2 |
From: Jakub Jelinek <jakub@redhat.com>
|
yann@1
|
3 |
To: Dan Kegel <dank@kegel.com>, mark@codesourcery.com
|
yann@1
|
4 |
Cc: gcc-patches@gcc.gnu.org
|
yann@1
|
5 |
Subject: [PATCH] sparc64-linux --with-cpu=ultrasparc fix
|
yann@1
|
6 |
Message-ID: <20040501190810.GD5191@sunsite.ms.mff.cuni.cz>
|
yann@1
|
7 |
Reply-To: Jakub Jelinek <jakub@redhat.com>
|
yann@1
|
8 |
References: <40940B11.9080907@kegel.com>
|
yann@1
|
9 |
In-Reply-To: <40940B11.9080907@kegel.com>
|
yann@1
|
10 |
|
yann@1
|
11 |
On Sat, May 01, 2004 at 01:39:45PM -0700, Dan Kegel wrote:
|
yann@1
|
12 |
> I'm having a bit of trouble configuring gcc-3.4.0 for sparc64-linux.
|
yann@1
|
13 |
> The resulting compiler defaults to sparc32, which is a problem
|
yann@1
|
14 |
> because it means having to figure out how to add
|
yann@1
|
15 |
> -mcpu=ultrasparc3 -Wa,-Av9a -m64 to CFLAGS for everything I build.
|
yann@1
|
16 |
> The worst part is that this even affects libgcc.a, which makes it
|
yann@1
|
17 |
> pretty hard to link any sparc64 executables. I could figure out
|
yann@1
|
18 |
> how mklibgcc and multilibbing work, and maybe thereby get a good 64 bit
|
yann@1
|
19 |
> libgcc.a,
|
yann@1
|
20 |
> but I'd kind of like to avoid that for the moment, and just really get
|
yann@1
|
21 |
> gcc to default to 64 bit output.
|
yann@1
|
22 |
>
|
yann@1
|
23 |
> What's the right way to get gcc to default to building 64 bit executables
|
yann@1
|
24 |
> when targeting sparc64-linux?
|
yann@1
|
25 |
|
yann@1
|
26 |
There was TARGET_CPU_ultrasparc3 missing in linux64.h.
|
yann@1
|
27 |
I've commited the following fix to the trunk, but as it is not a regression,
|
yann@1
|
28 |
I'm not sure if Mark is ok with this for gcc-3_4-branch.
|
yann@1
|
29 |
|
yann@1
|
30 |
2004-05-01 Jakub Jelinek <jakub@redhat.com>
|
yann@1
|
31 |
|
yann@1
|
32 |
* config/sparc/linux64.h (TARGET_DEFAULT): Make 64-bit by default
|
yann@1
|
33 |
also for TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3.
|
yann@1
|
34 |
|
yann@1
|
35 |
--- gcc-3.4.0/gcc/config/sparc/linux64.h.jj 2004-05-01 22:59:52.000000000 +0200
|
yann@1
|
36 |
+++ gcc-3.4.0/gcc/config/sparc/linux64.h 2004-05-01 23:00:41.126176529 +0200
|
yann@1
|
37 |
@@ -39,7 +39,9 @@ Boston, MA 02111-1307, USA. */
|
yann@1
|
38 |
#undef MD_EXEC_PREFIX
|
yann@1
|
39 |
#undef MD_STARTFILE_PREFIX
|
yann@1
|
40 |
|
yann@1
|
41 |
-#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
|
yann@1
|
42 |
+#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
|
yann@1
|
43 |
+ || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
|
yann@1
|
44 |
+ || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3
|
yann@1
|
45 |
/* A 64 bit v9 compiler with stack-bias,
|
yann@1
|
46 |
in a Medium/Low code model environment. */
|
yann@1
|
47 |
|
yann@1
|
48 |
|
yann@1
|
49 |
Jakub
|
yann@1
|
50 |
|
yann@1
|
51 |
|
yann@1
|
52 |
|