by 11:58 0 comments
OPENRISC toolchain for FreeBSD

Exact steps.

1. Download gcc and other utils  zip files from openrisc git page

2. Unzip the scr file. It has binutils and other required files

3. run configure
./configure --target=$TARGET --prefix=$PREFIX --with-sysroot --enable-maintainermode --enable-shared --enable-ld

4. configure will succeed. Then run make command

5.
the make failed ld
 
10. adding the option to ld
 
added this, line ld/configure.tgt
or1k-*-freebsd* | or1knd-*-freebsd*)        targ_emul=elf32or1k ;;

other bsd targets had _fbsd extension. It throwed some error when configured like that.
so leaving as elf as used by rtems. need to revisit
 
6. Next gdb compilation will fail , because -lsim is not added.
    Added it in the gdb/Makefile after -ls lm. It succeeded
 
7. rda compilation failed. You need to compile rda in or1k-freebsd* directory. Otherwise it will fail
You may need to maunually edit acinclude.m4 file for correct path 
   It will say gcc cannot compile binaries. ZTo fix you need to manualyy compile 
rda. for this go rda directorr

./configure -- target=$TARGET --prefix=$PREFIX

it may fail at some libtool version mismatch error (LT__INIT). To fix this you follow

http://www.howtodoityourself.org/how-to-fix-libtool-version-mismatch-error.html

after this make and make install
 
 

8.  this makes binutils and complete
 
9/ Now compile GCC
 
gcc we need to edit gcc/config.gcc and libgcc/config.host and add the corresponding entries
 
10. after that there is in libatomic library. I removed its compilation --disable-libatomic
 
11. after compilation succeeded
 
12. make install installed file 



Unknown

Developer

Open Source Ethusiast.

0 comments:

Post a Comment