Who can tell me how to make the cross-compiler i686 to alpha

yzshen@mail.ustc.edu.cn yzshen@mail.ustc.edu.cn
Mon Nov 25 20:29:00 GMT 2002


Hi all:
  I want to make a cross-compiler linux-i686 to alpha-dec-osf. But I don't
know what i need and the procedure to make it.
  A week ago, I made a corss-compiler according to the following procedure:

first install binutil-2.9.1:

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".

  I wonder whether this procedure lost someting??

Any help will be appreciated!!

                                         Shen Yingzhe




------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list