Hi, I updated my gnu toolchain build script, now it work with MinGW too. So it can be used to build gnu as, ld, gcc and gdb for windows (I built it with both cygwin and mingw), for linux (I built it with redhat and ubuntu) and for macosx (I built it with 10.6.5). Below there are the links for built scripts, for Windows toolchain built with MinGW and for MinGW used to built the toolchain for windows. The toolchain has the latest version of gnu tools (binutils 2.21, newlib 1.19, gcc 4.5.2 and gdb 7.2). http://dl.dropbox.com/u/159574/build-scripts-20110101.tar.bz2 http://dl.dropbox.com/u/159574/Toolchain_setup.exe http://dl.dropbox.com/u/159574/MinGW_setup.exe See you Santo
Added a comment and link from 'Gnu gcc' tab to here.
Thank you for providing these.
hi Thanks for these files, Unfortunately the link build-scripts-20110101.tar.bz2 Doesn't work, could you please check. Thanks
thanks a lot now it works
hi friend,
there is a problem in your script files, in _download.sh, there is "no" line where the package "newlib-1.19.0" is being downloaded. But in the xx_build_all.sh, this package is extracted what make an error message to be shown.
thanks again
Ali
Hi Ali, in _download.sh the line is
wget -P $download_dir ftp://sources.redhat.com/pub/newlib/$NEWLIB_SRC.tar.gz
Maybe you have some problem to download it because the link is on a ftp server. You can try to download it manually from ftp://sources.redhat.com/pub/newlib/ and put it in "download" directory. Let me know if it works. See you Santo
hi Santo,
My mistake, you re right, well i know why it wasn't downloaded, as i can't launch to the ftp server of Redhat so I downloaded it from another site.
After a long time of compiling, i got it installed. i tested it and until now it worked well.
this is gonna let me not to use virtual machine and use windows.
Thanks a lot, Great work
Ali
hi Santo,
My mistake, you re right, well i know why it wasn't downloaded, as i can't launch to the ftp server of Redhat so I downloaded it from another site.
After a long time of compiling, i got it installed. i tested it and until now it worked well.
this is gonna let me not to use virtual machine and use windows.
Thanks a lot, Great work
Ali
and also downloading gdb fails, because the actual version is 7.3.1 and not 7.2
Best Regards
Sorry about the last message.
The thing is that the donwload script fails when downloading binutils and gdb because the actual version are: for binutils: 2.21.1 instead of 2.21 for gbd: 7.3.1 instead of 7.2
this can be easily fixed by changing the version in the _env-only.sh script
Regards
hi,
the build scripts under http://dl.dropbox.com/u/159574/build-scripts-20110201.tar.bz2 seems to be missing.
thanks for shareing the great work.
hi,
the build scripts under http://dl.dropbox.com/u/159574/build-scripts-20110201.tar.bz2 seems to be missing.
thanks for shareing the great work.
sorry for the double post.
never mind about the build script.
I used crossdev under gentoo to setup the toolchain.
Awesome work, thanks a lot! Now, the toolchain is complete (at least i hope) :D Keep up the good work, dude! Best regards :)
Awesome work, thanks a lot! Now, the toolchain is complete (at least i hope) :D Keep up the good work, dude! Best regards :)
Did someone meet this error? :
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:235: undefined reference to tgoto'
terminal.o: In function
terminal_delete_lines':
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:365: undefined reference to tgoto'
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:365: undefined reference to
tputs'
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:369: undefined reference to tputs'
terminal.o: In function
terminal_insert_lines':
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:389: undefined reference to tgoto'
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:389: undefined reference to
tputs'
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:393: undefined reference to tputs'
terminal.o: In function
terminal_get_screen_size':
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:481: undefined reference to tgetnum'
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:493: undefined reference to
tgetnum'
terminal.o: In function terminal_initialize_terminal':
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:539: undefined reference to
tgetent'
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:553: undefined reference to tgetstr'
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:579: undefined reference to
tgetstr'
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:580: undefined reference to tgetstr'
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:581: undefined reference to
tgetstr'
/home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:582: undefined reference to `tgetstr'
Error building texinfo Error configuring texinfo
How to solve it?
Did you have installed ncurses and libncurses-dev on your machine?
I met a problem, something wrong with the linking library process.
bitcnts.o: In function main':
(.text+0x150): undefined reference to
clock'
bitcnts.o: In function main':
(.text+0x1bc): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x1e4): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x204): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x270): undefined reference to
_impure_ptr'
bitcnts.o: In function main':
(.text+0x284): undefined reference to
fwrite'
bitcnts.o: In function main':
(.text+0x28c): undefined reference to
exit'
bitfiles.o: In function bfopen':
(.text+0x18): undefined reference to
malloc'
bitfiles.o: In function bfopen':
(.text+0x2c): undefined reference to
fopen'
bitfiles.o: In function bfopen':
(.text+0x5c): undefined reference to
free'
bitfiles.o: In function bfread':
(.text+0xbc): undefined reference to
fgetc'
bitfiles.o: In function bfwrite':
(.text+0x158): undefined reference to
fputc'
bitfiles.o: In function bfclose':
(.text+0x1a0): undefined reference to
fclose'
bitfiles.o: In function bfclose':
(.text+0x1b4): undefined reference to
free'
bstr_i.o: In function bstr_i':
(.text+0x58): undefined reference to
strchr'
gmake: *** bitcount Error 1
E:\polito\graduate\P2012\plasma_latest\plasma\trunk\tools\MIPS_Toolchain\bin>gma
ke bitcount
mips-elf-as -o boot.o boot.asm
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls no_os.c
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_1.c
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_2.c
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_3.c
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_4.c
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnts.c -L/path/to/
libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitfiles.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitstrng.c
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bstr_i.c
mips-elf-ld -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf boot.o bit
cnt_1.o bitcnt_2.o bitcnt_3.o bitcnt_4.o bitcnts.o bitfiles.o bitstrng.o bstr_i.
o no_os.o
bitcnts.o: In function main':
(.text+0xa0): undefined reference to
atoi'
bitcnts.o: In function main':
(.text+0xf8): undefined reference to
clock'
bitcnts.o: In function main':
(.text+0x100): undefined reference to
rand'
bitcnts.o: In function main':
(.text+0x150): undefined reference to
clock'
bitcnts.o: In function main':
(.text+0x1bc): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x1e4): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x204): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x270): undefined reference to
_impure_ptr'
bitcnts.o: In function main':
(.text+0x284): undefined reference to
fwrite'
bitcnts.o: In function main':
(.text+0x28c): undefined reference to
exit'
bitfiles.o: In function bfopen':
(.text+0x18): undefined reference to
malloc'
bitfiles.o: In function bfopen':
(.text+0x2c): undefined reference to
fopen'
bitfiles.o: In function bfopen':
(.text+0x5c): undefined reference to
free'
bitfiles.o: In function bfread':
(.text+0xbc): undefined reference to
fgetc'
bitfiles.o: In function bfwrite':
(.text+0x158): undefined reference to
fputc'
bitfiles.o: In function bfclose':
(.text+0x1a0): undefined reference to
fclose'
bitfiles.o: In function bfclose':
(.text+0x1b4): undefined reference to
free'
bstr_i.o: In function bstr_i':
(.text+0x58): undefined reference to
strchr'
gmake: *** bitcount Error 1
E:\polito\graduate\P2012\plasma_latest\plasma\trunk\tools\MIPS_Toolchain\bin>gma
ke bitcount
mips-elf-as -o boot.o boot.asm
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls no_os.c
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_1.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_2.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_3.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_4.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnts.c -L/path/to/
libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitfiles.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitstrng.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bstr_i.c -L/path/to/l
ibc.a -lc
mips-elf-ld -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf boot.o bit
cnt_1.o bitcnt_2.o bitcnt_3.o bitcnt_4.o bitcnts.o bitfiles.o bitstrng.o bstr_i.
o no_os.o
bitcnts.o: In function main':
(.text+0xa0): undefined reference to
atoi'
bitcnts.o: In function main':
(.text+0xf8): undefined reference to
clock'
bitcnts.o: In function main':
(.text+0x100): undefined reference to
rand'
bitcnts.o: In function main':
(.text+0x150): undefined reference to
clock'
bitcnts.o: In function main':
(.text+0x1bc): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x1e4): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x204): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x270): undefined reference to
_impure_ptr'
bitcnts.o: In function main':
(.text+0x284): undefined reference to
fwrite'
bitcnts.o: In function main':
(.text+0x28c): undefined reference to
exit'
bitfiles.o: In function bfopen':
(.text+0x18): undefined reference to
malloc'
bitfiles.o: In function bfopen':
(.text+0x2c): undefined reference to
fopen'
bitfiles.o: In function bfopen':
(.text+0x5c): undefined reference to
free'
bitfiles.o: In function bfread':
(.text+0xbc): undefined reference to
fgetc'
bitfiles.o: In function bfwrite':
(.text+0x158): undefined reference to
fputc'
bitfiles.o: In function bfclose':
(.text+0x1a0): undefined reference to
fclose'
bitfiles.o: In function bfclose':
(.text+0x1b4): undefined reference to
free'
bstr_i.o: In function bstr_i':
(.text+0x58): undefined reference to
strchr'
gmake: *** bitcount Error 1
E:\polito\graduate\P2012\plasma_latest\plasma\trunk\tools\MIPS_Toolchain\bin>gma
ke bitcount
mips-elf-as -o boot.o boot.asm
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls no_os.c
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_1.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_2.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_3.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_4.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnts.c -L/path/to/
libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitfiles.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitstrng.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bstr_i.c -L/path/to/l
ibc.a -lc
mips-elf-ld -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf boot.o bit
cnt_1.o bitcnt_2.o bitcnt_3.o bitcnt_4.o bitstrng.o bstr_i.o no_os.o
boot.o: In function entry':
(.text+0x20): undefined reference to
main'
boot.o: In function entry':
(.text+0x24): undefined reference to
main'
bstr_i.o: In function bstr_i':
(.text+0x58): undefined reference to
strchr'
gmake: *** bitcount Error 1
E:\polito\graduate\P2012\plasma_latest\plasma\trunk\tools\MIPS_Toolchain\bin>gma
ke bitcount
mips-elf-as -o boot.o boot.asm
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls no_os.c
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_1.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_2.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_3.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_4.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnts.c -L/path/to/
libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitfiles.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitstrng.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bstr_i.c -L/path/to/l
ibc.a -lc
mips-elf-ld -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf boot.o bit
cnt_1.o bitcnt_2.o bitcnt_3.o bitcnt_4.o bitcnts.o bitfiles.o bitstrng.o bstr_i.
o no_os.o
bitcnts.o: In function main':
(.text+0xa0): undefined reference to
atoi'
bitcnts.o: In function main':
(.text+0xf8): undefined reference to
clock'
bitcnts.o: In function main':
(.text+0x100): undefined reference to
rand'
bitcnts.o: In function main':
(.text+0x150): undefined reference to
clock'
bitcnts.o: In function main':
(.text+0x1bc): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x1e4): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x204): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x270): undefined reference to
_impure_ptr'
bitcnts.o: In function main':
(.text+0x284): undefined reference to
fwrite'
bitcnts.o: In function main':
(.text+0x28c): undefined reference to
exit'
bitfiles.o: In function bfopen':
(.text+0x18): undefined reference to
malloc'
bitfiles.o: In function bfopen':
(.text+0x2c): undefined reference to
fopen'
bitfiles.o: In function bfopen':
(.text+0x5c): undefined reference to
free'
bitfiles.o: In function bfread':
(.text+0xbc): undefined reference to
fgetc'
bitfiles.o: In function bfwrite':
(.text+0x158): undefined reference to
fputc'
bitfiles.o: In function bfclose':
(.text+0x1a0): undefined reference to
fclose'
bitfiles.o: In function bfclose':
(.text+0x1b4): undefined reference to
free'
bstr_i.o: In function bstr_i':
(.text+0x58): undefined reference to
strchr'
gmake: *** bitcount Error 1
E:\polito\graduate\P2012\plasma_latest\plasma\trunk\tools\MIPS_Toolchain\bin>gma
ke bitcount
mips-elf-as -o boot.o boot.asm
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls no_os.c
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_1.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_2.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_3.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnt_4.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitcnts.c -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitfiles.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bitstrng.c -L/path/to
/libc.a -lc
mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls bstr_i.c -L/path/to/l
ibc.a -lc
mips-elf-ld -Ttext 0x10000000 -eentry -Map test.map -s -N -o test.axf boot.o bit
cnt_1.o bitcnt_2.o bitcnt_3.o bitcnt_4.o bitcnts.o bitfiles.o bitstrng.o bstr_i.
o no_os.o
bitcnts.o: In function main':
(.text+0xa0): undefined reference to
atoi'
bitcnts.o: In function main':
(.text+0xf8): undefined reference to
clock'
bitcnts.o: In function main':
(.text+0x100): undefined reference to
rand'
bitcnts.o: In function main':
(.text+0x150): undefined reference to
clock'
bitcnts.o: In function main':
(.text+0x1bc): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x1e4): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x204): undefined reference to
printf'
bitcnts.o: In function main':
(.text+0x270): undefined reference to
_impure_ptr'
bitcnts.o: In function main':
(.text+0x284): undefined reference to
fwrite'
bitcnts.o: In function main':
(.text+0x28c): undefined reference to
exit'
bitfiles.o: In function bfopen':
(.text+0x18): undefined reference to
malloc'
bitfiles.o: In function bfopen':
(.text+0x2c): undefined reference to
fopen'
bitfiles.o: In function bfopen':
(.text+0x5c): undefined reference to
free'
bitfiles.o: In function bfread':
(.text+0xbc): undefined reference to
fgetc'
bitfiles.o: In function bfwrite':
(.text+0x158): undefined reference to
fputc'
bitfiles.o: In function bfclose':
(.text+0x1a0): undefined reference to
fclose'
bitfiles.o: In function bfclose':
(.text+0x1b4): undefined reference to
free'
bstr_i.o: In function bstr_i':
(.text+0x58): undefined reference to
strchr'
gmake: *** bitcount Error 1
E:\polito\graduate\P2012\plasma_latest\plasma\trunk\tools\MIPS_Toolchain\bin>
##when I compile the helloworld.c also meet the problem, but I put the mips-elf-gcc -O2 -Wall -c -s -fno-pic -mips1 -mno-abicalls helloworld.c -L/path/to/libc.a -lc then is ok!
Yukai,
It appears that your problem is not related to GNU tool chain build script problems, but instead trying to make operating system calls without including the operating system. Since this is a different problem please create a different problem report.
Since you aren't running Linux, including Linux libraries won't work. You need to either be running the operating system in the "kernel" directory, or you need to write your own version of all of the functions, or you need to pull the needed functions from the "kernel" directory.
To run without an operating system and use the function "printf" you could also compile and link "kernel/clib.c" and implement printf() based on UartPrintCritical() in "kernel/uart.c" without the OS calls.
Steve