Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cross-compiling for alpha
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
few
Guru
Guru


Joined: 03 Mar 2008
Posts: 448

PostPosted: Tue Aug 19, 2008 11:20 am    Post subject: cross-compiling for alpha Reply with quote

Hi,

i used crossdev to build a cross-compiler on x86 for alpha. This one is working, but...

when i tried to run it on the target machine i got
bash: ./3d_3: cannot execute binary file

the reason is:
3d_3: Elf format 64 bit LSB Executable file, Unknown Architecture, not stripped
while systems ls for example is:
/bin/ls: COFF format alpha dynamically linked, demand paged executable or object module stripped - version 3.13-14

I found out that one can change the target format with -Wl,--oformat=...

this gives the supported formats:
# alpha-unknown-linux-gnu-objdump -i
BFD header file version (GNU Binutils) 2.18
elf64-alpha
(header little endian, data little endian)
alpha
ecoff-littlealpha
(header little endian, data little endian)
alpha
elf64-little
(header little endian, data little endian)
alpha
elf64-big
(header big endian, data big endian)
alpha
elf32-little
(header little endian, data little endian)
alpha
elf32-big
(header big endian, data big endian)
alpha
srec
(header endianness unknown, data endianness unknown)
alpha
symbolsrec
(header endianness unknown, data endianness unknown)
alpha
tekhex
(header endianness unknown, data endianness unknown)
alpha
binary
(header endianness unknown, data endianness unknown)
alpha
ihex
(header endianness unknown, data endianness unknown)
alpha

elf64-alpha ecoff-littlealpha elf64-little elf64-big
alpha elf64-alpha ecoff-littlealpha elf64-little elf64-big

elf32-little elf32-big srec symbolsrec tekhex binary ihex
alpha elf32-little elf32-big srec symbolsrec tekhex binary ihex

so 2 questions:
1) is one of the supported formats the format used on the target machine (which one?)?
2) if so how do i get my toolchain into this format? (is adding the linker option in make.conf and recompiling enough?)


thanks for your help


PS: the target machines processors:
32 x Alpha EV7 (21364) - 1150MHz, 64kB-I + 64KB-D L1, 1.75MB L2
and its os:
Tru64 UNIX 5.1B
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3601
Location: USA

PostPosted: Tue Aug 19, 2008 8:36 pm    Post subject: Reply with quote

How did you invoke crossdev? did you target for tru64 (not linux)? The binary file formats are different, it looks like tru64 needs coff binaries and not elf.

I'm not sure how well crossdev works for cross OS, though I do recall using it to build avr-gcc...

At one point I built gcc for my DECstation, and needed to run

mipsel-netbsd-dec-gcc

to compile binaries for that NetBSD machine with my Linux x86 box.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2395

PostPosted: Tue Aug 19, 2008 9:55 pm    Post subject: Reply with quote

few,

you have a nice piece of computing hardware there. would you like to tell us what you do with this machine?
any why do you need crossdev? this baby should compile _EVERYTHING_ in time.
Back to top
View user's profile Send private message
few
Guru
Guru


Joined: 03 Mar 2008
Posts: 448

PostPosted: Wed Aug 20, 2008 8:57 pm    Post subject: Reply with quote

Thanks for your replies.

eccerr0r wrote:
How did you invoke crossdev? did you target for tru64 (not linux)? The binary file formats are different, it looks like tru64 needs coff binaries and not elf.


I used linux as target. crossdev -t help does not show something more useful (i my eyes). So i tried
crossdev -t alphaev7-dec-osf5.1b
crossdev starts building but it fails at compiling gcc-stage1. First it complains about a.out.h missing and after copying it from the target system (together with some other include-files) it fails with some other message. I am going to try this tomorrow again and to post some error messages.

alex.blackbit wrote:
few,

you have a nice piece of computing hardware there. would you like to tell us what you do with this machine?
any why do you need crossdev? this baby should compile _EVERYTHING_ in time.


This machine is used for scientific computing and i am an user. The problem with it is, that the software on it is horribly out of date. I tried to build my own environment with all the libs i need and a more recent gcc. After that i wanted to compile my program statically and then copy it over there.
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2395

PostPosted: Wed Aug 20, 2008 9:08 pm    Post subject: Reply with quote

few,

you could try to bootstrap portage. but i am quite sure nobody before tried that on tru64.
good luck.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures 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