OpenCores
no use no use 1/1 no use no use
share my cross tools compile configuration
by godspeed1989 on Dec 9, 2011
godspeed1989
Posts: 12
Joined: Sep 6, 2011
Last seen: Oct 3, 2012
cross_compiler is or32-elf-

1.binutils: binutils-2.20.1-or32-svn.tar.bz2
../configure --target=or32-elf --prefix=$PREFIX

2.gcc: gcc-4.5.1-or32-1.0rc1.tar.bz2
mkdir build
cd build
../configure --target=or32-elf --prefix=$PREFIX \
--with-gnu-as --with-gnu-ld \
--with-newlib \ //if you use uclibc, replace this lines
--verbose \
--enable-languages=c \
--disable-nls \
--disable-shared \
--disable-threads \
--disable-decimal-float \
--disable-libmudflap \
--disable-libssp \
--disable-multilib

3.newlib: newlib-1.18.0-or32-1.0rc1.tar.bz2
../configure --target=or32-elf --prefix=$PREFIX

4.or1ksim: or1ksim-0.5.0rc2.tar.bz2
../configure --target=or32-elf --prefix=$PREFIX

5.gdb: gdb-7.2-or32-1.0rc1.tar.bz2
file ~/gdb-7.2-or32/sim/or32/Makefile
+SIM_CFLAGS = $OR1KSIM/include
+SIM_EXTRA_LIBS = -lm $OR1KSIM/lib/libsim.a
file ~/gdb-7.2-or32/gdb/Makefile
+CLIBS += $OR1KSIM/lib/libsim.a
file ~/gdb-7.2-or32/opcodes/or32-opc.c
replace curpass -> _curpass
replace or32_letters -> _or32_letters
As this 2 vars is multiple defined in libsim.a.
RE: share my cross tools compile configuration
by jeremybennett on Dec 12, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019
cross_compiler is or32-elf-

1.binutils: binutils-2.20.1-or32-svn.tar.bz2
../configure --target=or32-elf --prefix=$PREFIX

2.gcc: gcc-4.5.1-or32-1.0rc1.tar.bz2
mkdir build
cd build
../configure --target=or32-elf --prefix=$PREFIX \
--with-gnu-as --with-gnu-ld \
--with-newlib \ //if you use uclibc, replace this lines
--verbose \
--enable-languages=c \
--disable-nls \
--disable-shared \
--disable-threads \
--disable-decimal-float \
--disable-libmudflap \
--disable-libssp \
--disable-multilib

3.newlib: newlib-1.18.0-or32-1.0rc1.tar.bz2
../configure --target=or32-elf --prefix=$PREFIX

4.or1ksim: or1ksim-0.5.0rc2.tar.bz2
../configure --target=or32-elf --prefix=$PREFIX

Hi godspeed1989

Thanks for this. This is essentially what is done by the bld-all.sh script for ELF. If you use uClibc it is more complex, since you need a 2-stage GCC compilation to properly pull in the libraries.

5.gdb: gdb-7.2-or32-1.0rc1.tar.bz2
file ~/gdb-7.2-or32/sim/or32/Makefile
+SIM_CFLAGS = $OR1KSIM/include
+SIM_EXTRA_LIBS = -lm $OR1KSIM/lib/libsim.a
file ~/gdb-7.2-or32/gdb/Makefile
+CLIBS += $OR1KSIM/lib/libsim.a
file ~/gdb-7.2-or32/opcodes/or32-opc.c
replace curpass -> _curpass
replace or32_letters -> _or32_letters
As this 2 vars is multiple defined in libsim.a.

This doesn't look quite right. You should not need to alter Makefiles (which are autogenerated). You should be able to pass any parameters on the make command line. Look at how it is done in bld-all.sh.

The multiple definition is new to me. I suspect it is a consequence of the CLIBS definition (GDB does not use libsim.a, it is only part of the simulator). If it is reproducible, please file it as a bug . in Bugzilla.

Best wishes,

Jeremy

--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com

RE: share my cross tools compile configuration
by godspeed1989 on Dec 13, 2011
godspeed1989
Posts: 12
Joined: Sep 6, 2011
Last seen: Oct 3, 2012
1.The reason why I modify gdb's Makefile is I didn't add or1ksim's library into system environment variable, which leads to undefined reference during compiling.

2.I'm not sure whether this error is reproducible. May be just because I modified the Makefile :)
If it is really a bug, how can I report it, I have never done this before :(
RE: share my cross tools compile configuration
by jeremybennett on Dec 13, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019
1.The reason why I modify gdb's Makefile is I didn't add or1ksim's library into system environment variable, which leads to undefined reference during compiling.

Hi godspeed1989

I'm not sure why you need to do all this. The idea of the --with-or1ksim flag to GDB configure is to sort all this out for you.

2.I'm not sure whether this error is reproducible. May be just because I modified the Makefile :)
If it is really a bug, how can I report it, I have never done this before :(

Details on using Bugzilla are on the Wiki (http://opencores.org/or1k/OR1K:Community_portal#Bug_reporting). However I am not sure this is a bug - you are not supposed to modify the Makefiles, since they are automatically generated during configuration. Can you try configuring using --with-or1ksim and see if your problems go away.

Alternatively, use the bld-all.sh script, which automates the entire tool chain building process.

Best wishes,

Jeremy

no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.