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] |
Other format: | [Raw text] |
Okay, seems like everything's in place: binutils-2.11.2 gcc-3.0.4 Solaris 7's libs and includes gdb-5.1.1 I ran into two more things I can't quite figure out: 1. Hello World compilation: program hw.cpp: #include <stdio.h> main (int argc, char** argv) { printf ("Hello World!\n"); return 0; } Compiled with native compiler and dynamically linked (gcc hw.cpp): #file a.out a.out: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped sized 5853 bytes. Compiled with cross compiler and statically linked: (using (using cd $xcompiler/bin; ./gcc hw.cpp) #file a.out a.out: ELF 32-bit MSB executable SPARC Version 1, statically linked, not stripped sized 299766 bytes. And finally, compiled with cross-compiler and dynamically linked: (using cd $xcompiler/bin; ./gcc hw.cpp ../lib/libstdc++.so.2.10.0) #file a.out a.out: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped and for some weird reason, sized 369284 bytes. WHY SO BIG? Here's ldd on this binary: 14:55|[May] mikisu:/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/bin#ldd -r a.out libstdc++.so.2.10.0 => /usr/local/lib/libstdc++.so.2.10.0 libm.so.1 => /usr/lib/libm.so.1 libc.so.1 => /usr/lib/libc.so.1 libdl.so.1 => /usr/lib/libdl.so.1 /usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1 Where I come to funny thing #2 - it's using /usr/local/lib/libstdc++.so.2.10.0 instead of /usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/lib/libstdc++.so.2.10.0 I don't think I want that to happen. Does that mean I did something wrong when configuring/building the linker(or compiler)? If so, what, or how can I figure out what? And are the two anomalies connected? Thanks :-) Some additional info: Host System is sparc-sun-solaris2.8, on a Sun Fire280R server. Here's how gcc identifies itself: #./gcc -v Reading specs from /usr/local/cpl/sparc-sun-solaris2.7/lib/gcc-lib/sparc-sun-solaris2.7/3.0.4/specs Configured with: ../configure --target=sparc-sun-solaris2.7 --prefix=/usr/local/cpl/sparc-sun-solaris2.7 -v --with-headers=/usr/local/cpl/sol7/include --with-libs=/usr/local/cpl/sol7/lib --with-gnu-as --with-gnu-ld --with-gnu-ar Thread model: posix gcc version 3.0.4 And, if it helps with anything, here's truss: #truss a.out execve("/usr/local/cpl/sparc-sun-solaris2.7/bin/a.out", 0xFFBEFC44, 0xFFBEFC4C) argc = 1 mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFF3A0000 resolvepath("/usr/lib/ld.so.1", "/usr/lib/ld.so.1", 1023) = 16 stat("/usr/local/cpl/sparc-sun-solaris2.7/bin/a.out", 0xFFBEF980) = 0 open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT open("/usr/lib/libstdc++.so.2.10.0", O_RDONLY) Err#2 ENOENT open("/usr/local/kde/lib/libstdc++.so.2.10.0", O_RDONLY) Err#2 ENOENT open("/usr/local/qt/lib/libstdc++.so.2.10.0", O_RDONLY) Err#2 ENOENT open("/usr/dt/lib/libstdc++.so.2.10.0", O_RDONLY) Err#2 ENOENT open("/usr/openwin/lib/libstdc++.so.2.10.0", O_RDONLY) Err#2 ENOENT open("/opt/SUNWspro/lib/libstdc++.so.2.10.0", O_RDONLY) Err#2 ENOENT open("/usr/local/lib/libstdc++.so.2.10.0", O_RDONLY) = 3 fstat(3, 0xFFBEF314) = 0 mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF390000 mmap(0x00000000, 450560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF310000 mmap(0xFF370000, 48816, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 327680) = 0xFF370000 mmap(0xFF37C000, 1836, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFF37C000 munmap(0xFF362000, 57344) = 0 memcntl(0xFF310000, 166280, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 close(3) = 0 open("/usr/lib/libm.so.1", O_RDONLY) = 3 fstat(3, 0xFFBEF314) = 0 mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000 mmap(0x00000000, 155648, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF2E0000 mmap(0xFF304000, 4228, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 81920) = 0xFF304000 munmap(0xFF2F6000, 57344) = 0 memcntl(0xFF2E0000, 8144, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 close(3) = 0 open("/usr/lib/libc.so.1", O_RDONLY) = 3 fstat(3, 0xFFBEF314) = 0 mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000 mmap(0x00000000, 786432, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF200000 mmap(0xFF2B8000, 24812, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 688128) = 0xFF2B8000 munmap(0xFF2A8000, 65536) = 0 memcntl(0xFF200000, 113332, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 close(3) = 0 open("/usr/lib/libdl.so.1", O_RDONLY) = 3 fstat(3, 0xFFBEF314) = 0 mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000 close(3) = 0 open("/usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1", O_RDONLY) = 3 fstat(3, 0xFFBEF1A4) = 0 mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF2D0000 close(3) = 0 ioctl(1, TCGETA, 0xFFBEECC4) = 0 Hello World! write(1, " H e l l o W o r l d !".., 13) = 13 llseek(0, 0, SEEK_CUR) = 525463 llseek(0, 0, SEEK_CUR) = 525498 _exit(0) -- Miki Shapiro <mikis@aAladdin.com> Unixophilic Software Developer Aladdin Knowledge Systems --------------------------------------------- Tel: +972-(4)-8811433 ICQ: 3EE853 --------------------------------------------- If at first you don't succeed... ... SkyDiving is probbably not for you. On 05/02/2002 09:35:30 PM ZE3 Kai Ruottu wrote: > >miki.shapiro@eAladdin.com wrote: >> >> I'm now attempting to compile either newlib-1.9.0 or glibc-1.09.1 >> >> For now, I opted for newlib, doing this: >> a. added the /.../cross-compiler-dir/bin to my tcsh path >> b. configured as follows: >> >> 13:51|[May] mikisu:/usr/src/cross2/newlib-1.9.0/build#../configure >> --target=sparc-sun-solaris2.7 --prefix=/usr/local/cpl/sparc-sun-solaris2.7 > > Neither glibc-1.09.1 or newlib is ported to Solaris2 very well or at all... >Some support for SunOS 4 seems to exist in newlib, but the 'newlib/libc/sys/sparc64' >seems to be for the ESA 'erc32' or some other embedded system... > > The Sun's own Solaris2.7 headers and libraries are easily available, Sun sent the >Solaris2.7 installation media as free for all home users, students, testers etc. >So the obvious question is why you want to try the glibc-1.09.1 or newlib ports? >There will be man-months to do before glibc-1.09.1 or newlib will be even near the >Sun's own basic C-library... Then there are all the extra termcap, curses, network, >X11 etc. libs to port... > > Once I bettered the SCO 3.2 / SVR3.2/i386 support in glibc-1.09.1 and newlib, because >the SCO's own DevSys costed $1000 or so, and the headers and libs from it were needed >for the "free GCC" (ie. getting GCC to work costed the $1000...) and for simple compiles. >But why Sparc/Solaris2.7 ? > >Cheers, Kai > > ******************************* IMPORTANT ! ********************************** The content of this email and any attachments are confidential and intended for the named recipient(s) only. If you have received this email in error please notify the sender immediately. Do not disclose the content of this message or make copies. This email was scanned by eSafe Mail for viruses, vandals and other malicious content. ****************************************************************************** ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |