在 2006-06-25日的 12:01 +0800,Zhang Weiwu写道:
> I have been using gentoo linux on my ultra-sparc U2 and U5 for two
> years, untill very recently I learnt the gentoo Linux is actually not
> 64-bit (it is 32-bit).
> 
> The U2 gets broken after I upgraded OBP (when I tries Solaris 10, it
> prompted OBP is 32-bit OBP, I must upgrade to 64bit, then I did it, then
> this U2 never boots up again). I have the remaining U5 box serving as
> print server, it simply run out of CPU power (a single A4 brochure
> printing uses up CPU and caused very slow printing). I think I can run
> the machine in 64-bit mode, recompile related packages in 64-bit
> executable to regain some speed.
> 
> I tried to adjust C-flags:
> 
> CFLAGS="-O2 -m64 -mcpu=ultrasparc -fomit-frame-pointer -pipe"
> (added -m64)
> 
> then emerge a package, get this error:
> 
> checking whether the C compiler (gcc -O2 -m64 -mcpu=ultrasparc
> -fomit-frame-pointer -pipe ) works... no
> 
> I think perhaps it is not possible to compile anything in 64-bit
> executable when the kernel itself is running in 32-bit mode. Perhaps it
> is not possible to run 64-bit code on 32-bit kernal at all (if this
> sounds obvious, I admit I am a newbie). So what should I do? Should I
> try to compile a kernel with -m64 first? Then there comes another
> question: can 32-bit OBP loads 64bit kernel? I don't know if I have 64
> OBP at all (and don't know how to tell it), my other U2 has had 32bit
> OBP, that's for sure.
> 
> and even if I try to compile a 64-bit kernel, that may as well not
> possible because it seems gcc refuse to run with -m64 (the error message
> above).
> 
> Besides, is 64-big executable much faster then 32-bit executable?
> 
> P.S. I bet there must be an article somewhere on the Internet telling
> how to get 64-bit linux running on sparcs, only that I didn't find it.
> 

an example of trying to run gcc with -m64 on 32bit system:

sappho ~ # touch abc  #creates 0byte file abc 
sappho ~ # gcc -O2 -m64 -mcpu=ultrasparc -fomit-frame-pointer -pipe abc
/usr/lib/gcc/sparc-unknown-linux-gnu/3.4.4/../../../crt1.o(.text+0x10):
In function `_start':
: undefined reference to `main'
/usr/lib/gcc/sparc-unknown-linux-gnu/3.4.4/../../../crt1.o(.text+0x1c):
In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status


-- 
[email protected] mailing list

Reply via email to