[J-core] bare metal sh2-elf toolchain build script.

Rob Landley rob at landley.net
Wed Oct 30 20:47:29 UTC 2019


Here's a slightly cleaned up version of the script Jeff sent me. You download
musl-cross-make and run this script in it, and it builds (and sadly installs
into /opt) an sh2-elf bare metal toolchain.

The bit at the end is nuts: the libstdc++ build's autoconf breaks (basically
saying invalid combination of options), but it's already built the _compiler_ so
he just runs the install 9without error checking) and that also fails but it's
installed the compiler first before doing it.

Yes you have to supply your sudo password twice for the install lines, because
the build between is long enough on most systems to time out.

But at least this is a reproduction sequence using current source for the thing
that builds the ROM image.

Rob

P.S. I tried to hit the libstdc++ install with environment variables to hardwire
the failing tests, I.E.

 ac_cv_func_shl_load=no ac_cv_lib_dld_shl_load=set  ac_cv_func_dlopen=no
ac_cv_lib_dl_dlopen=set ac_cv_lib_svld_dlopen=set make MAKEINFO=true

And got as far as an #include file barfing because it fell off the end of its
if/else staircase. Did I mention that libstdc++ is an abomination before
Kernighan and Ritchie?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build-sh2-elf2.sh
Type: application/x-shellscript
Size: 1316 bytes
Desc: not available
URL: <http://lists.j-core.org/pipermail/j-core/attachments/20191030/9a10f208/attachment.bin>


More information about the J-core mailing list