This is the mail archive of the crossgcc@sourceware.org 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]

Should these two compilers produce the same code?


Hello,

I have a native fedora core 3 compiler:
$ gcc -v
Reading specs from
/usr/lib/gcc/i386-redhat-linux/3.4.4/specs
Configured with: ../configure 
--prefix=/usr 
--mandir=/usr/share/man 
--infodir=/usr/share/info 
--enable-shared 
--enable-threads=posix 
--disable-checking 
--with-system-zlib 
--enable-__cxa_atexit 
--disable-libunwind-exceptions 
--enable-java-awt=gtk 
--host=i386-redhat-linux
Thread model: posix
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)

and a cygwin cross compiler:
$ gcc -v
Reading specs from
/opt/jtool/gcc-3.4.4-glibc-2.3.5/i686-fc3-linux-gnu/lib/gcc/i686-fc3-linux-gnu/3.4.4/specs
Configured with: ../gcc-3.4.4-20050721/configure 
--target=i686-fc3-linux-gnu 
--prefix=/opt/jtool/gcc-3.4.4-glibc-2.3.5/i686-fc3-linux-gnu

--with-headers=/opt/jtool/gcc-3.4.4-glibc-2.3.5/i686-fc3-linux-gnu/i686-fc3-linux-gnu/usr/include

--with-local-prefix=/opt/jtool/gcc-3.4.4-glibc-2.3.5/i686-fc3-linux-gnu/i686-fc3-linux-gnu

--disable-nls 
--enable-threads=posix 
--enable-symvers=gnu 
--enable-__cxa_atexit 
--enable-languages=c,c++ 
--enable-shared 
--enable-c99 
--enable-long-long 
--disable-libstdcxx-pch
Thread model: posix
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)

I have noticed that they are able to produce the same
object files; however, the shared libraries that they
produce are drastically different. I am wondering if
at least part of this is a result of the fact that
some of gcc's own objects and shared libraries that
are being linked as part of these "generated" shared
libraries are different. Things like: crtbeginS.o,
libstdc++.so.6.0.3, and crtendS.o. If so, Im not sure
what to do about it. I tried configuring the two
compilers as similarly as possible.  Should it be
possible to generate matching shared libraries from a
cross compiler?

Thanks,
J

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]