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]

Re: building gcc-3.2.3 as a cross compiler to make cygwin programs


Some developers will tell you that copying crt0.o etc. from the
target system is in fact the proper approach.  While this is
the only possible approach when the target is closed-source,
open source targets can be handled by actually
building the crt0.o yourself.  This works well for relatively stable
targets like Linux and glibc, but might work poorly for
targets under rapid development like cygwin.

Anyway, copying the .o's is the way to go unless you're
willing to add cygwin target support to crosstool :-)
- Dan

bertrand marquis wrote:
try to copie crt0.o and gcrt0.o from cygwin in i686-pc-cygwin/lib and it will work (it is for me)

But i'm really not sure that it is the right way to do that,

Any one know where does crt0.o and gcrt0.o must come from when building a cross compiler ??


Rainer Hochreiter a écrit:


it seems that you have forgotten to add the include and lib files from
cygwin

you must take the file needed in the cygwin installed files or find a
developpement tree that add those files, here stdio.h and put them into
$PREFIX/i686-pc-cygwin/include and $PREFIX/i686-pc-cygwin/lib


thanks for your hint - it works!

i also successfully built a cross-gcc for c++!

the next problem which occured is that during linking i get the following
error message:

[raho@pcraho cygwin]$ /opt/cygwin-cross-gcc/bin/i686-pc-cygwin-g++ hello.cpp
/opt/cygwin-cross-gcc/lib/gcc-lib/i686-pc-cygwin/3.2.3/../../../../i686-pc-cygwin/bin/ld:


crt0.o: No such file: No such file or directory
collect2: ld returned 1 exit status

this happens also on linking c sources:

[raho@pcraho cygwin]$ /opt/cygwin-cross-gcc/bin/i686-pc-cygwin-gcc hello.c
/opt/cygwin-cross-gcc/lib/gcc-lib/i686-pc-cygwin/3.2.3/../../../../i686-pc-cygwin/bin/ld:


crt0.o: No such file: No such file or directory
collect2: ld returned 1 exit status

any hints to this problem?


------
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]