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]

About the file "crt0.o"


Hi:
I installed Mandrake 8.1 linux in my computer(i686),i do not find the file "crt0.o", but my gcc can work correctly.
then I installed a cross-gcc (i686 to alpha), on the advice of the following:

The first package which needs to be installed is binutils. An assumption is made that all tools will be installed in /usr/local/alpha-dec-osf.
johnf@garfield:/tmp$ ./configure --target=alpha-dec-osf \
--prefix=/usr/local/alpha-dec-osf --with-gnu-ld --enable-64-bit-bfd
johnf@garfield:/tmp/binutils-2.9.1$ cd gas
johnf@garfield:/tmp/binutils-2.9.1/gas$ ./configure --target=alpha-dec-osf \
--prefix=/usr/local/alpha-dec-osf --with-gnu-ld --enable-64-bit-bfd
johnf@garfield:/tmp/binutils-2.9.1/gas$ cd ../ld
johnf@garfield:/tmp/binutils-2.9.1/ld$ ./configure --target=alpha-dec-osf \
--prefix=/usr/local/alpha-dec-osf --with-gnu-ld --enable-64-bit-bfd
johnf@garfield:/tmp/binutils-2.9.1/ld$ cd ..
johnf@garfield:/tmp/binutils-2.9.1$ make

johnf@garfield:/tmp/binutils-2.9.1$ sudo make install
Password:
/bin/sh ./mkinstalldirs /usr/local/alpha-dec-osf
/usr/local/alpha-dec-osf

johnf@garfield:/tmp/binutils-2.9.1$

Install GCC as follows.
johnf@garfield:/tmp/gcc-2.95.2$ ./configure --target=alpha-dec-osf \
--prefix=/usr/local/alpha-dec-osf --with-gnu-as \
--with-gnu-ld --enable-languages=c
johnf@garfield:/tmp/gcc-2.95.2$

Make sure that /usr/local/alpha-dec-osf/include contains /usr/include/* from an Alpha Operating System, Digital Unix and Linux include files have been tested. Do not overwrite any files that already exist. Also create a link to the directory in /usr/local/alpha-dec-osf/alpha-dec-osf/.
Edit the Makefile in the top level directory and on line 1520, change LANGUAGES="c c+"+ to LANGUAGES="c". Do the same on lines 1525 and 1555.
Edit gcc/Makefile. Change line 340 from LIBGCC1 = libgcc1.a to LIBGCC1 =. Similarily for line 344 CROSS_LIBGCC1 =libgcc1.cross to CROSS_LIBGCC1 =. On line 369 change LIBGCC1_TEST = libgcc1-test to LIBGCC1_TEST =.
johnf@garfield:/tmp/gcc-2.95.2$ echo '#include "alpha/osf.h"' \
>> gcc/config.h
johnf@garfield:/tmp/gcc-2.95.2$ export \
PATH=$PATH:/usr/local/alpha-dec-osf/bin
johnf@garfield:/tmp/gcc-2.95.2$ make cross LANGUAGES=c

johnf@garfield:/tmp/gcc-2.95.2$ sudo make install-cross LANGUAGES=c

johnf@garfield:/tmp/gcc-2.95.2$

Everything is OK.
But when I use this cross-compile to compile a simple file with the following command: /usr/local/alpha-dec-osf/alpha-dec-osf-gcc -o test test.c it errors : can not find the file "crt0.o".


Who can tell me why my native gcc can work correctly without the file "crt0.o", but the corss-compiler can not??

Any help will be appreciated.










_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/lccn/

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