Gentoo Archives: gentoo-sparc

From: Zhang Weiwu <zhangweiwu@××××××.com>
To: gentoo-sparc@l.g.o
Subject: Re: [gentoo-sparc] 64-bit gentoo-sparc, how to make it happen?
Date: Sun, 25 Jun 2006 07:27:45
Message-Id: 1151220552.20229.1.camel@esmeralda.realss
In Reply to: [gentoo-sparc] 64-bit gentoo-sparc, how to make it happen? by Zhang Weiwu
1 在 2006-06-25日的 12:01 +0800,Zhang Weiwu写道:
2 > I have been using gentoo linux on my ultra-sparc U2 and U5 for two
3 > years, untill very recently I learnt the gentoo Linux is actually not
4 > 64-bit (it is 32-bit).
5 >
6 > The U2 gets broken after I upgraded OBP (when I tries Solaris 10, it
7 > prompted OBP is 32-bit OBP, I must upgrade to 64bit, then I did it, then
8 > this U2 never boots up again). I have the remaining U5 box serving as
9 > print server, it simply run out of CPU power (a single A4 brochure
10 > printing uses up CPU and caused very slow printing). I think I can run
11 > the machine in 64-bit mode, recompile related packages in 64-bit
12 > executable to regain some speed.
13 >
14 > I tried to adjust C-flags:
15 >
16 > CFLAGS="-O2 -m64 -mcpu=ultrasparc -fomit-frame-pointer -pipe"
17 > (added -m64)
18 >
19 > then emerge a package, get this error:
20 >
21 > checking whether the C compiler (gcc -O2 -m64 -mcpu=ultrasparc
22 > -fomit-frame-pointer -pipe ) works... no
23 >
24 > I think perhaps it is not possible to compile anything in 64-bit
25 > executable when the kernel itself is running in 32-bit mode. Perhaps it
26 > is not possible to run 64-bit code on 32-bit kernal at all (if this
27 > sounds obvious, I admit I am a newbie). So what should I do? Should I
28 > try to compile a kernel with -m64 first? Then there comes another
29 > question: can 32-bit OBP loads 64bit kernel? I don't know if I have 64
30 > OBP at all (and don't know how to tell it), my other U2 has had 32bit
31 > OBP, that's for sure.
32 >
33 > and even if I try to compile a 64-bit kernel, that may as well not
34 > possible because it seems gcc refuse to run with -m64 (the error message
35 > above).
36 >
37 > Besides, is 64-big executable much faster then 32-bit executable?
38 >
39 > P.S. I bet there must be an article somewhere on the Internet telling
40 > how to get 64-bit linux running on sparcs, only that I didn't find it.
41 >
42
43 an example of trying to run gcc with -m64 on 32bit system:
44
45 sappho ~ # touch abc #creates 0byte file abc
46 sappho ~ # gcc -O2 -m64 -mcpu=ultrasparc -fomit-frame-pointer -pipe abc
47 /usr/lib/gcc/sparc-unknown-linux-gnu/3.4.4/../../../crt1.o(.text+0x10):
48 In function `_start':
49 : undefined reference to `main'
50 /usr/lib/gcc/sparc-unknown-linux-gnu/3.4.4/../../../crt1.o(.text+0x1c):
51 In function `_start':
52 : undefined reference to `main'
53 collect2: ld returned 1 exit status
54
55
56 --
57 gentoo-sparc@g.o mailing list

Replies

Subject Author
Re: [gentoo-sparc] 64-bit gentoo-sparc, how to make it happen? Zhang Weiwu <zhangweiwu@××××××.com>