OpenCores
Issue List
gnu toolchain build script for linux, windows and macosx #24
Open ulixxe opened this issue almost 14 years ago
ulixxe commented almost 14 years ago

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

rhoads commented almost 14 years ago

Added a comment and link from 'Gnu gcc' tab to here.

Thank you for providing these.

theshadowx commented over 13 years ago

hi Thanks for these files, Unfortunately the link build-scripts-20110101.tar.bz2 Doesn't work, could you please check. Thanks

ulixxex commented over 13 years ago
theshadowx commented over 13 years ago

thanks a lot now it works

theshadowx commented over 13 years ago

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

ulixxex commented over 13 years ago

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

theshadowx commented over 13 years ago

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

theshadowx commented over 13 years ago

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

colorete87 commented about 13 years ago

and also downloading gdb fails, because the actual version is 7.3.1 and not 7.2

Best Regards

colorete87 commented about 13 years ago

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

dasdgw commented almost 13 years ago

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.

dasdgw commented almost 13 years ago

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.

dasdgw commented almost 13 years ago

sorry for the double post.

never mind about the build script.

I used crossdev under gentoo to setup the toolchain.

StefEgger commented almost 12 years ago

Awesome work, thanks a lot! Now, the toolchain is complete (at least i hope) :D Keep up the good work, dude! Best regards :)

StefEgger commented almost 12 years ago

Awesome work, thanks a lot! Now, the toolchain is complete (at least i hope) :D Keep up the good work, dude! Best regards :)

zhaodan commented over 11 years ago

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 functionterminal_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 totputs' /home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:369: undefined reference to tputs' terminal.o: In functionterminal_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 totputs' /home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:393: undefined reference to tputs' terminal.o: In functionterminal_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 totgetnum' terminal.o: In function terminal_initialize_terminal': /home/administrator/tools/work/texinfo-build/info/../../texinfo-4.13/info/terminal.c:539: undefined reference totgetent' /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 totgetstr' /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 totgetstr' /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?

ulixxex commented over 11 years ago

Did you have installed ncurses and libncurses-dev on your machine?

zhaodan commented almost 11 years ago

I met a problem, something wrong with the linking library process. bitcnts.o: In function main': (.text+0x150): undefined reference toclock' bitcnts.o: In function main': (.text+0x1bc): undefined reference toprintf' bitcnts.o: In function main': (.text+0x1e4): undefined reference toprintf' bitcnts.o: In function main': (.text+0x204): undefined reference toprintf' bitcnts.o: In function main': (.text+0x270): undefined reference to_impure_ptr' bitcnts.o: In function main': (.text+0x284): undefined reference tofwrite' bitcnts.o: In function main': (.text+0x28c): undefined reference toexit' bitfiles.o: In function bfopen': (.text+0x18): undefined reference tomalloc' bitfiles.o: In function bfopen': (.text+0x2c): undefined reference tofopen' bitfiles.o: In function bfopen': (.text+0x5c): undefined reference tofree' bitfiles.o: In function bfread': (.text+0xbc): undefined reference tofgetc' bitfiles.o: In function bfwrite': (.text+0x158): undefined reference tofputc' bitfiles.o: In function bfclose': (.text+0x1a0): undefined reference tofclose' bitfiles.o: In function bfclose': (.text+0x1b4): undefined reference tofree' bstr_i.o: In function bstr_i': (.text+0x58): undefined reference tostrchr' 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 toatoi' bitcnts.o: In function main': (.text+0xf8): undefined reference toclock' bitcnts.o: In function main': (.text+0x100): undefined reference torand' bitcnts.o: In function main': (.text+0x150): undefined reference toclock' bitcnts.o: In function main': (.text+0x1bc): undefined reference toprintf' bitcnts.o: In function main': (.text+0x1e4): undefined reference toprintf' bitcnts.o: In function main': (.text+0x204): undefined reference toprintf' bitcnts.o: In function main': (.text+0x270): undefined reference to_impure_ptr' bitcnts.o: In function main': (.text+0x284): undefined reference tofwrite' bitcnts.o: In function main': (.text+0x28c): undefined reference toexit' bitfiles.o: In function bfopen': (.text+0x18): undefined reference tomalloc' bitfiles.o: In function bfopen': (.text+0x2c): undefined reference tofopen' bitfiles.o: In function bfopen': (.text+0x5c): undefined reference tofree' bitfiles.o: In function bfread': (.text+0xbc): undefined reference tofgetc' bitfiles.o: In function bfwrite': (.text+0x158): undefined reference tofputc' bitfiles.o: In function bfclose': (.text+0x1a0): undefined reference tofclose' bitfiles.o: In function bfclose': (.text+0x1b4): undefined reference tofree' bstr_i.o: In function bstr_i': (.text+0x58): undefined reference tostrchr' 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 toatoi' bitcnts.o: In function main': (.text+0xf8): undefined reference toclock' bitcnts.o: In function main': (.text+0x100): undefined reference torand' bitcnts.o: In function main': (.text+0x150): undefined reference toclock' bitcnts.o: In function main': (.text+0x1bc): undefined reference toprintf' bitcnts.o: In function main': (.text+0x1e4): undefined reference toprintf' bitcnts.o: In function main': (.text+0x204): undefined reference toprintf' bitcnts.o: In function main': (.text+0x270): undefined reference to_impure_ptr' bitcnts.o: In function main': (.text+0x284): undefined reference tofwrite' bitcnts.o: In function main': (.text+0x28c): undefined reference toexit' bitfiles.o: In function bfopen': (.text+0x18): undefined reference tomalloc' bitfiles.o: In function bfopen': (.text+0x2c): undefined reference tofopen' bitfiles.o: In function bfopen': (.text+0x5c): undefined reference tofree' bitfiles.o: In function bfread': (.text+0xbc): undefined reference tofgetc' bitfiles.o: In function bfwrite': (.text+0x158): undefined reference tofputc' bitfiles.o: In function bfclose': (.text+0x1a0): undefined reference tofclose' bitfiles.o: In function bfclose': (.text+0x1b4): undefined reference tofree' bstr_i.o: In function bstr_i': (.text+0x58): undefined reference tostrchr' 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 tomain' boot.o: In function entry': (.text+0x24): undefined reference tomain' bstr_i.o: In function bstr_i': (.text+0x58): undefined reference tostrchr' 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 toatoi' bitcnts.o: In function main': (.text+0xf8): undefined reference toclock' bitcnts.o: In function main': (.text+0x100): undefined reference torand' bitcnts.o: In function main': (.text+0x150): undefined reference toclock' bitcnts.o: In function main': (.text+0x1bc): undefined reference toprintf' bitcnts.o: In function main': (.text+0x1e4): undefined reference toprintf' bitcnts.o: In function main': (.text+0x204): undefined reference toprintf' bitcnts.o: In function main': (.text+0x270): undefined reference to_impure_ptr' bitcnts.o: In function main': (.text+0x284): undefined reference tofwrite' bitcnts.o: In function main': (.text+0x28c): undefined reference toexit' bitfiles.o: In function bfopen': (.text+0x18): undefined reference tomalloc' bitfiles.o: In function bfopen': (.text+0x2c): undefined reference tofopen' bitfiles.o: In function bfopen': (.text+0x5c): undefined reference tofree' bitfiles.o: In function bfread': (.text+0xbc): undefined reference tofgetc' bitfiles.o: In function bfwrite': (.text+0x158): undefined reference tofputc' bitfiles.o: In function bfclose': (.text+0x1a0): undefined reference tofclose' bitfiles.o: In function bfclose': (.text+0x1b4): undefined reference tofree' bstr_i.o: In function bstr_i': (.text+0x58): undefined reference tostrchr' 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 toatoi' bitcnts.o: In function main': (.text+0xf8): undefined reference toclock' bitcnts.o: In function main': (.text+0x100): undefined reference torand' bitcnts.o: In function main': (.text+0x150): undefined reference toclock' bitcnts.o: In function main': (.text+0x1bc): undefined reference toprintf' bitcnts.o: In function main': (.text+0x1e4): undefined reference toprintf' bitcnts.o: In function main': (.text+0x204): undefined reference toprintf' bitcnts.o: In function main': (.text+0x270): undefined reference to_impure_ptr' bitcnts.o: In function main': (.text+0x284): undefined reference tofwrite' bitcnts.o: In function main': (.text+0x28c): undefined reference toexit' bitfiles.o: In function bfopen': (.text+0x18): undefined reference tomalloc' bitfiles.o: In function bfopen': (.text+0x2c): undefined reference tofopen' bitfiles.o: In function bfopen': (.text+0x5c): undefined reference tofree' bitfiles.o: In function bfread': (.text+0xbc): undefined reference tofgetc' bitfiles.o: In function bfwrite': (.text+0x158): undefined reference tofputc' bitfiles.o: In function bfclose': (.text+0x1a0): undefined reference tofclose' bitfiles.o: In function bfclose': (.text+0x1b4): undefined reference tofree' bstr_i.o: In function bstr_i': (.text+0x58): undefined reference tostrchr' 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!

rhoads commented almost 11 years ago

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


Assignee
No one
Labels
Idea