This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

No targets compiling cross


I have been trying to make gcc as a cross compiler, and I get the following
errors:

configure: error: installation or configuration problem: C compiler cannot create executables.
make[2]: *** No targets.  Stop.
make[1]: *** [../libiberty/libiberty.a] Error 2
make: *** [all-target-libstdc++] Error 2

I have been following the script in the crossgcc faq, that says to make
binutils, gcc, and glibc in that order (section 4.1).  In order to get a clean
set of include files, I compiled glibc first, not intended as the final
compile, and linked in the kernel includes into the directory where glibc
installed to.

The cross compiler will (if I get it working) run on an amd k6-2, and compile
code for a pentium.  Here is the set of commands I used:

Make glibc for its headers:
        tar xvfz tars/glibc-2.1.2.tar.gz
        mkdir b-glibc
        cd b-glibc
        ../glibc-2.1.2/configure --host=i586-linux --prefix=/root/gcc-work/i1-glibc --enable-add-ons --with-headers=/usr/src/linux/include
        make
        make install
        cd ..
        ln -s /usr/src/linux/include/linux /root/gcc-work/i1-glibc/include/
        ln -s /usr/src/linux/include/asm /root/gcc-work/i1-glibc/include/

Make binutils
        tar xvfz tars/binutils-2.9.1.tar.gz
        mkdir b-binutils
        cd b-binutils
        ../binutils-2.9.1/configure --host=i586-linux --target=i586-linux --prefix=/root/gcc-work/install
        make all install
        cd ..
        PATH=$PATH:/root/gcc-work/install/bin

Make gcc
        tar xvfz tars/gcc-2.95.2.tar.gz
        mkdir b-gcc
        cd b-gcc
        ../gcc-2.95.2/configure --target=i586-elf-linux --prefix=/root/gcc-work/install --with-headers=/root/gcc-work/i1-glibc/include
        make all install

(sorry that this looks like a mess, but I want to be thorough)

gcc does compile as a non-cross compiler just fine.

Can anyone tell me what I'm doing wrong in the configuration, as indicated by
the error?  Thanks in advance,
					-Erik


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


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