From: Pak Woon <pak.woon@nec.com.au>
To: linux-mips@linux-mips.org
Subject: Re: Roll-your-own Toolchain Builds
Date: Thu, 05 Oct 2006 16:02:14 +1000 [thread overview]
Message-ID: <45249FE6.8080800@nec.com.au> (raw)
In-Reply-To: <Pine.LNX.4.64.0610031034490.28786@yvahk3.pbagnpgbe.fr>
Daniel Stenberg wrote:
> On Tue, 3 Oct 2006, Pak Woon wrote:
>
>> I am trying to roll-my-own toolchain by following the instructions
>> outlined in http://www.linux-mips.org/wiki/Toolchains.
>
>
>> binutils-2.16.91.0.6-5
>> gcc-4.1.1-1.fc5
>
>
> Funny, since that page says that the recommended gcc version is 3.4.4
> and binutils 2.16.1... (even though I've had no problems with 3.4.6 myself)
First of all, thank you all for your suggestions. I have successfully
built my own toolchain (using binutils-2.16.1 and gcc-3.4.4). I have
also successfully built the kernel for the target board. (with git
checkout linux-2.16.18-stable)
[ltu@PAKW-FEDORA linux.git]$ readelf -h vmlinux
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x803c3000
Start of program headers: 52 (bytes into file)
Start of section headers: 3056172 (bytes into file)
Flags: 0x70001001, noreorder, o32, mips32r2
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 1
Size of section headers: 40 (bytes)
Number of section headers: 34
Section header string table index: 31
I am now trying to build a simple program with my new toolchain and I've
come across the "can't find crt1.o" problem again. I am struggling with
this.
[ltu@PAKW-FEDORA tmp]$ mips-unknown-linux-gnu-gcc -v hello.c
Using built-in specs.
Configured with: ../gcc-3.4.4/configure
--target=mips-unknown-linux-gnu
--prefix=/home/ltu/development/mips-linux-toolchain
--enable-languages=c --without-headers --with-gnu-ld --with-gnu-as
--disable-shared --disable-threads
Thread model: single
gcc version 3.4.4
/home/ltu/development/mips-linux-toolchain/libexec/gcc/mips-unknown-linux-gnu/3.4.4/cc1
-quiet -v hello.c -quiet -dumpbase hello.c -auxbase hello -version -o
/tmp/ccETB2Cl.s
ignoring nonexistent directory
"/home/ltu/development/mips-linux-toolchain/lib/gcc/mips-unknown-linux-gnu/3.4.4/../../../../mips-unknown-linux-gnu/sys-include"
ignoring nonexistent directory
"/home/ltu/development/mips-linux-toolchain/lib/gcc/mips-unknown-linux-gnu/3.4.4/../../../../mips-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/home/ltu/development/mips-linux-toolchain/lib/gcc/mips-unknown-linux-gnu/3.4.4/include
End of search list.
GNU C version 3.4.4 (mips-unknown-linux-gnu)
compiled by GNU C version 4.1.1 20060525 (Red Hat 4.1.1-1).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64461
hello.c: In function `main':
hello.c:2: warning: return type of 'main' is not `int'
/home/ltu/development/mips-linux-toolchain/lib/gcc/mips-unknown-linux-gnu/3.4.4/../../../../mips-unknown-linux-gnu/bin/as
-EB -no-mdebug -32 -v -KPIC -o /tmp/ccoPzQTv.o /tmp/ccETB2Cl.s
GNU assembler version 2.16.1 (mips-unknown-linux-gnu) using BFD version
2.16.1
/home/ltu/development/mips-linux-toolchain/libexec/gcc/mips-unknown-linux-gnu/3.4.4/collect2
--eh-frame-hdr -EB -dynamic-linker /lib/ld.so.1 crt1.o crti.o
/home/ltu/development/mips-linux-toolchain/lib/gcc/mips-unknown-linux-gnu/3.4.4/crtbegin.o
-L/home/ltu/development/mips-linux-toolchain/lib/gcc/mips-unknown-linux-gnu/3.4.4
-L/home/ltu/development/mips-linux-toolchain/lib/gcc/mips-unknown-linux-gnu/3.4.4/../../../../mips-unknown-linux-gnu/lib
/tmp/ccoPzQTv.o -lgcc -rpath-link /lib:/usr/lib -lc -lgcc
/home/ltu/development/mips-linux-toolchain/lib/gcc/mips-unknown-linux-gnu/3.4.4/crtend.o
crtn.o
/home/ltu/development/mips-linux-toolchain/lib/gcc/mips-unknown-linux-gnu/3.4.4/../../../../mips-unknown-linux-gnu/bin/ld:
crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
[ltu@PAKW-FEDORA tmp]$ echo $PATH
/home/ltu/development/mips-linux-toolchain/bin:/bin:/usr/bin
[ltu@PAKW-FEDORA tmp]$
From my understanding, to compile code for my MIPS target, I need to
use mips-unknown-linux-gnu-gcc (which, I assume is the same as
/mips-linux-toolchain/mips-unknwn-linux-gnu/bin/gcc). I have ensured my
$PATH is the bare minimum. This is the same problem as I was getting
when I was trying to build a gcc-4.1.1-1.fc5 based cross compiler. I am
really stuck.
FYI, my hello.c is:
void main ( void )
{
volatile int i,j,k;
i = 2;
j = 1;
k = i + j;
}
Thanks in advance
Regards,
Pak
next prev parent reply other threads:[~2006-10-05 6:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-02 14:14 [PATCH] remove Momentum / PMC-Sierra Jaguar ATX evaluation board Yoichi Yuasa
2006-10-02 15:18 ` Ralf Baechle
2006-10-03 1:44 ` Yoichi Yuasa
2006-10-03 7:55 ` Roll-your-own Toolchain Builds Pak Woon
2006-10-03 8:33 ` Yoichi Yuasa
2006-10-03 8:50 ` Pak Woon
2006-10-03 8:37 ` Daniel Stenberg
2006-10-05 6:02 ` Pak Woon [this message]
2006-10-05 6:17 ` Yoichi Yuasa
2006-10-05 6:51 ` Pak Woon
2006-10-05 7:10 ` Yoichi Yuasa
2006-10-05 7:39 ` Yoichi Yuasa
2006-10-03 20:25 ` Jim Wilson
2006-10-03 9:45 ` [PATCH] remove Momentum / PMC-Sierra Jaguar ATX evaluation board Maciej W. Rozycki
-- strict thread matches above, loose matches on Subject: below --
2006-10-03 17:45 Roll-your-own Toolchain Builds Kaz Kylheku
2006-10-03 17:45 ` Kaz Kylheku
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45249FE6.8080800@nec.com.au \
--to=pak.woon@nec.com.au \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox