This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
hesi726 wrote: > > Which target should i assign when I want build a cross-compile with gcc at my i686-linux-2.2.14 for sun saloris(sparc)? It depends on your Solaris2 target... Solaris2.4 isn't the same as Solaris2.7. But the target name is 'sparc-solaris2.x', and you must know the 'x' yourself. > Is it sparc-elf?If so,after i build the cross-compile ,what should i do? > For example , I compile and link a "Hello,World" program with > sparc-elf-gcc at my linux machine,but it don't work at solaris , > why? If the executable type is '.EXE' in DOS and the executable type is '.EXE' in VAX/VMS, should one be able to run DOS executables under VAX/VMS and VAX/VMS executables under DOS ? Or at least WinNT-executables under MS-DOS and of course all DOS-executables under WinNT ? Even the answer to the last is "No"... The ELF-object format is not an ABI... If the 'fully defined target' for your 'sparc-elf' executables is Solaris2, you may run them there, but first you must have: 1. The 'pure' sparc-elf C-library, 'libc.a' from newlib. This has none of the low-level I/O-routines (read(), write(), open(),...) and memory handling routines included. 2. The glue library to SPARC/Solaris2.x, 'libsolaris2.a' (or something). This includes all the missing low-level I/O-routines etc., implemented using the syscall-mechanism for Solaris2/SVR4. Please see the <sys/syscall.h> about the syscalls or use the Solaris2 docs (preferred if you are aiming into a "Free C library for Solaris2")... Your programs will be statically linked. The big question is why you would like to do this when the Sparc/Solaris2.7 and 2.8 install media is available freely and you can find the target headers and libs there. If you have the Solaris2 machine available, copying the target stuff from it is the natural choice, after solving the legal issues first... Cheers, Kai ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |