Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
64 bit binaries
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
chas
n00b
n00b


Joined: 10 Apr 2005
Posts: 3

PostPosted: Sun Apr 10, 2005 11:13 am    Post subject: 64 bit binaries Reply with quote

HI,

I've installed gentoo 2005.0 on a Netra X1 and compiled the kernel as sparc64, however all my binaries seem to be 32 bit. I've changed my make.conf entries from:

CFLAGS="-O2 -mcpu=ultrasparc"
CHOST="sparc-unknown-linux-gnu"
CXXFLAGS="-O2 -mcpu=ultrasparc"

to:

CHOST="sparc64-unknown-linux-gnu"
CFLAGS="-O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-O3 -pipe -fomit-frame-pointer"

but anything I compile still seems to be compiled as 32 bit:

(with the orignal make.conf)
# file /bin/cat
/bin/cat: ELF 32-bit MSB executable, SPARC32PLUS, V8+ Required, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), stripped

(with the updated make.conf)
# file /usr/bin/pine
/usr/bin/pine: ELF 32-bit MSB executable, SPARC32PLUS, V8+ Required, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), stripped

I'd have thought that running 32 bit binaries on a 64 bit machine was a bit of a waste. Searching around, I've found references to needing gcc 3.4 for AMD64, but can find realtivley little on sparc64. Before I go messing with gcc It'd be good to know if that was the issue.

# gcc --version
gcc (GCC) 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)

Cheers,
Chas.
Back to top
View user's profile Send private message
Gecklord
Apprentice
Apprentice


Joined: 17 Mar 2004
Posts: 174

PostPosted: Sun Apr 10, 2005 1:36 pm    Post subject: Reply with quote

You can built 64 binaries by using the -m64 option but if you can compile something you won't have any performance increase, unless you have and need more than 4gb ram.
Back to top
View user's profile Send private message
Weeve
Retired Dev
Retired Dev


Joined: 30 Oct 2002
Posts: 641

PostPosted: Sun Apr 10, 2005 7:55 pm    Post subject: Reply with quote

A 64 bit userland is not supported at this time, or is having anything in your CHOST definition other than "sparc-unknown-linux-gnu".
Back to top
View user's profile Send private message
pompafrittes
n00b
n00b


Joined: 29 Feb 2004
Posts: 39
Location: Sweden

PostPosted: Tue Oct 04, 2005 4:08 am    Post subject: Reply with quote

Weeve wrote:
A 64 bit userland is not supported at this time, or is having anything in your CHOST definition other than "sparc-unknown-linux-gnu".


Hmm,

A n00b like me doesnt understand this. Does this mean that gentoo doesn't use the sparc 64-bit CPU fully? in that case what is the advantage of using sparc64?
What does userland mean?

Hope i'm asking too stupid questions

cheers
_________________
Doh
Back to top
View user's profile Send private message
georgen
n00b
n00b


Joined: 03 Oct 2005
Posts: 5

PostPosted: Tue Oct 04, 2005 6:43 am    Post subject: Reply with quote

pompafrittes,

The easy way out I know, but here is a real quick explanation of user verses kernel space ... http://en.wikipedia.org/wiki/User_space. Does anyone know of the hurdles needed to be jumped to make Gentoo! SPARC userland 64 bit?

Thanks,
George.
Back to top
View user's profile Send private message
gust4voz
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 373
Location: Buenos Aires, Argentina

PostPosted: Tue Oct 04, 2005 12:45 pm    Post subject: Reply with quote

Yes we know, but in general scenarios you won't benefit from it, it will actually be slower.
SPARC can use the extra registers from V9 processors (sparc64) even in 32-bit mode (unlike amd64 for example).
_________________
Gustavo Zacarias
Gentoo/SPARC monkey
Back to top
View user's profile Send private message
georgen
n00b
n00b


Joined: 03 Oct 2005
Posts: 5

PostPosted: Wed Oct 05, 2005 2:16 am    Post subject: what about ... Reply with quote

gust4vos,

Thanks for the reply. I don't think it's fair to say it'd actually be slower for the general case. The V9 spec goes out of it's way to state improved performance, 64-bit data and addressing, faster trap model and context switching, etc. (http://www.sparc.com/standards/SPARCV9.pdf). All around it seems a much nicer environment to be in, what am I missing? Is support for the V9 arch not going to be pursued by Gentoo!?

Thanks,
George.
Back to top
View user's profile Send private message
gust4voz
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 373
Location: Buenos Aires, Argentina

PostPosted: Wed Oct 05, 2005 1:26 pm    Post subject: Reply with quote

You're missing that the kernel actually runs in 64-bit mode, thus many of the improvements are there :-)
_________________
Gustavo Zacarias
Gentoo/SPARC monkey
Back to top
View user's profile Send private message
DStar
n00b
n00b


Joined: 26 Sep 2007
Posts: 2

PostPosted: Wed Sep 26, 2007 8:06 pm    Post subject: Reply with quote

Gecklord wrote:
You can built 64 binaries by using the -m64 option but if you can compile something you won't have any performance increase, unless you have and need more than 4gb ram.
sadly this would result in an error here :/
Code:
pso@jupiter ~ $ gcc -m64 hello.c
hello.c:1: error: -m64 is not supported by this configuration
hello.c:1: error: -mlong-double-64 not allowed with -m64
pso@jupiter ~ $
it's just the same with anything i try compiling (also when using c++)... anyone has an idea?
Back to top
View user's profile Send private message
Ferris
Retired Dev
Retired Dev


Joined: 13 Jan 2003
Posts: 426
Location: N. Virginia (USA)

PostPosted: Wed Sep 26, 2007 8:24 pm    Post subject: Reply with quote

The compiler you use for the kernel might compile it, but what are you going to link it to? All the libraries and start-up routines are 32-bit. But even if you get it to run, performance will be worse than with 32-bit userland. If you really need 64-bit user applications, I believe that someone has it more or less running, but I don't recall the details. (You would have to rebuild the compiler to support -m64, then rebuild all the libraries, .... I suppose you might be able to get a multi-lib system, but it would be a lot of work.)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum