5

I'm an embedded software engineer working with IA-32 type processors. We are looking for a compiler tool chain - preferable free.

We used to use Mentor Graphics CodeBench Lite but it's no longer available.

We have looked at other GCC distributions but none of them have a bare metal implementation of glibc. None except newlib but we can't use it because of the GPL and LGPL licencing issues. We're an OEM and our customers (and us) have proprietary code.

Any suggestions welcome.

jkayca
  • 241
  • 3
  • 5

2 Answers2

5

Sourcery's "lite" gpl tools are still available, it's just that Mentor likes to play hide-the-link.

If you want a lightweight C library with non-GPL licensing, you might look at Bionic from Android.

However, you concern may be mistaken. IANAL but most C library licenses have a linking exception of some sort which you may want to research with the help of your lawyers - their utility as system libraries would be extremely limited without.

And actually, a quick search of the newlib licensing page (which is complicated) seems to show that more of it is under BSD-style licenses than under GPL-style ones, though care would be needed to sort it all out.

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117
  • 3
    I agree with Chris; but stack overflow is not for 'lawyers'. I have seen *newlib* portability implementations in many proprietary products. See: [libc for embedded](http://stackoverflow.com/questions/4921553/small-libc-for-embedded-systems). [*eCos*](http://en.wikipedia.org/wiki/ECos) originally used *newlib* (as well as Cygwin). I also noticed [Musl](http://www.etalabs.net/compare_libcs.html) recently. BSD type `libc` are also useful, but not for *bare metal* (as with *Musl* and *Bionic*). – artless noise Jun 05 '13 at 21:34
  • Note that, though the Sourcery Lite tools are still available, the version for IA-32 bare-metal targets isn't on the Lite Edition page. – Brooks Moses Jun 06 '13 at 07:51
  • Incidentally, some Google-searching does find the download link for the older IA-32 bare-metal CodeBench Lite Edition toolchains -- but of course the reason the link isn't on the main Lite Edition page is that they're outdated and no longer getting updated: https://sourcery.mentor.com/GNUToolchain/subscription28188?lite=IA32. If you want to use Newlib, it's probably worth downloading the sources from there and looking at the included `.sh` file to see how it was built. – Brooks Moses Jun 06 '13 at 07:57
3

Mentor may no longer be providing a Lite edition of the IA-32 bare-metal toolchain, but I'm pretty sure it's still supported in the commercial editions, and a basic license is not that expensive.

As Chris says, the Newlib licensing page is a bit complicated -- but the gist of it is that basically all of it that you need for a bare-metal system is BSD licensed; IIRC, the parts that are GPL-licensed are clearly-delineated system-specific pieces that reference things in the Linux kernel or the like (and thus have to be GPL-licensed), and those aren't included in the bare-metal builds. I think they're even all in one or two distinct directories that you can just delete. Obviously you should do the analysis for yourself, but that's the result you should expect to find.

A shortcut that may be useful: The download page for the most recent version of CodeBench Lite for IA-32 ELF that was produced is on this page. If you download the source tarball from there, you'll get the Newlib sources that were used to build that, and there's also a .sh file in the package indicating how it was configured and built. You'll note that in the documentation (licenses are in the back of the Getting Started Guide) the Newlib binaries are simply listed as BSD-licensed, so this should show you how Mentor got a compiled library that fits that licensing description.

(Disclaimer: I used to work for Mentor until recently.)

Brooks Moses
  • 9,267
  • 2
  • 33
  • 57