Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
howtos:pic32mx_tools_on_solaris [2021/11/08 17:51] admin [<del>binutils 2.37</del>] |
howtos:pic32mx_tools_on_solaris [2023/11/29 17:26] admin [Stage 1 - build bootstrap gcc] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Deploy PIC32MX gcc toolchain on Solaris ====== | ====== Deploy PIC32MX gcc toolchain on Solaris ====== | ||
- | The toolchain no longer works on s11u4sru37 due to missing /usr/lib/libmpc.so.2 and /usr/lib/libmpfr.so.1 libraries - /opt/mipsel/libexec/gcc/mipsel/4.5.2/cc1 depends on them. | + | * The toolchain **binutils-2.36**, **gcc-10.3.0**, **newlib-1.4** no longer works after upgrade from **SRU62** to **SRU63**, since **libisl** was upgraded from version **15** to version **23**. Re-compilation with libisl 23 fixed the problem. |
- | Reason being the libraries were upgraded to /usr/lib/limpc.so.3 and /usr/lib/libmpfr.so.4 respectively. | + | * The toolchain no longer works on s11u4sru37 due to missing /usr/lib/libmpc.so.2 and /usr/lib/libmpfr.so.1 libraries - /opt/mipsel/libexec/gcc/mipsel/4.5.2/cc1 depends on them. Reason being the libraries were upgraded to /usr/lib/limpc.so.3 and /usr/lib/libmpfr.so.4 respectively. |
To workaround the issue, missing libraries were copied from s11u4sru30 where both old as well as new versions of those libraries are available. | To workaround the issue, missing libraries were copied from s11u4sru30 where both old as well as new versions of those libraries are available. | ||
- | Also, new tool chain has been built based on binutils 2.37, gcc 9.4.0, newlib 4.1.0 | + | Also, new tool chain has been built based on binutils 2.36, gcc 10.3.0, newlib 4.1.0. |
===== binutils 2.36 ===== | ===== binutils 2.36 ===== | ||
* start building new one | * start building new one | ||
<code> | <code> | ||
$ export PATH=/usr/gnu/bin:$PATH | $ export PATH=/usr/gnu/bin:$PATH | ||
- | $ mkdir ~/projects/gcc-mips/ | + | $ mkdir ~/projects/gcc-mips-10.3.0/ |
- | $ cd ~/projects/gcc-mips/ | + | $ cd ~/projects/gcc-mips-10.3.0/ |
$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.36.tar.gz -O /tmp/binutils-2.36.tar.gz | $ wget http://ftp.gnu.org/gnu/binutils/binutils-2.36.tar.gz -O /tmp/binutils-2.36.tar.gz | ||
$ tar xvpf /tmp/binutils-2.36.tar.gz | $ tar xvpf /tmp/binutils-2.36.tar.gz | ||
Line 59: | Line 59: | ||
<code> | <code> | ||
$ cd build-gcc-el-10.3.0 | $ cd build-gcc-el-10.3.0 | ||
- | $ ../gcc-10.3.0/configure --target=mipsel --prefix=/opt/mipsel --without-headers --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c --with-local-prefix=/opt/mipsel --with-native-system-header-dir=/opt/mipsel/include/ --disable-nls --disable-shared --enable-multilib --disable-decimal-float -disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath | + | $ ../gcc-10.3.0/configure --target=mipsel --prefix=/opt/mipsel-10.3.0 --without-headers --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c --with-local-prefix=/opt/mipsel --with-native-system-header-dir=/opt/mipsel/include/ --disable-nls --disable-shared --enable-multilib --disable-decimal-float -disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath |
$ make | $ make | ||
$ sudo make install | $ sudo make install | ||
Line 65: | Line 65: | ||
* **--enable-multilib** - builds several variants of libraries (big-endian, little-endian hard-float and soft-float). Default is little-endian hard-float. | * **--enable-multilib** - builds several variants of libraries (big-endian, little-endian hard-float and soft-float). Default is little-endian hard-float. | ||
<code> | <code> | ||
- | $ /opt/mipsel/bin/mipsel-gcc -print-multi-lib | + | $ /opt/mipsel-10.3.0/bin/mipsel-gcc -print-multi-lib |
.; | .; | ||
soft-float;@msoft-float | soft-float;@msoft-float | ||
Line 174: | Line 174: | ||
$ vim -p ./mipsel/newlib/targ-include/newlib.h ./mipsel/newlib/newlib.h | $ vim -p ./mipsel/newlib/targ-include/newlib.h ./mipsel/newlib/newlib.h | ||
$ make ; echo $? | $ make ; echo $? | ||
+ | $ sudo make install | ||
+ | </code> | ||
+ | |||
+ | ===== Stage 3 - deploy gcc and g++ with newlib suport ===== | ||
+ | <code> | ||
+ | $ cd ~/projects/gcc-mips/build-gcc-el-10.3.0 | ||
+ | $ ../gcc-10.3.0/configure --target=mipsel --prefix=/opt/mipsel --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c,c++ --with-local-prefix=/opt/mipsel --with-native-system-header-dir=/opt/mipsel/include --disable-nls --disable-shared --enable-multilib --disable-decimal-float -disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath | ||
+ | $ make -j 10 ; echo $? | ||
$ sudo make install | $ sudo make install | ||
</code> | </code> |