3

I'm currently working on a software project which makes heavy use of the Red Hat Newlib as the C standard library. We now need to figure out the license of basically every third-party software component we use in the project in order to comply with our open source software policy. This of course includes the Newlib libraries, e.g. libm.a and libc.a.

Since Newlib is a collection of software from several sources (as stated in COPYING.NEWLIB), I don't really know which license listed in the license file applies to which code file. For example: The project uses strncasecmp() which is defined in newlib/libc/string/strncasecmp.c in the Newlib GitHub repository. In the source file, no license information can be found. The generic license file COPYING.NEWLIB lists 56 different licenses from different institutions and individuals. But there's no real information which license applies to which part of Newlib. So I'm kind of lost at this point. I don't think I have to comply with each and every license listed in COPYING.NEWLIB?

Has someone faced the same problem and can me give some guidance here?

1
  • The file strncasecmp.c in Newlib says "<<strncasecmp>> is in the Berkeley Software Distribution." That's not a license, of course, but it may help you to locate a version of that function which is licensed as you see fit. This is a fairly simple function (almost trivial), so you could alternatively rewrite that one function yourself, and use the old one only as a test to make sure your new version behaves identically to the old one.
    – Brandin
    Sep 27, 2022 at 7:20

3 Answers 3

3

Usual I am not a lawyer statement applies.

The COPYING.NEWLIB file says:

Each file may have its own copyright/license that is embedded in the source 
file.  Unless otherwise noted in the body of the source file(s), the following copyright
notices will apply to the contents of the newlib subdirectory

The COPYING.NEWLIB further mentions that some licenses apply to specific targets only, for example:

(10) Stephane Carrez (m68hc11-elf/m68hc12-elf targets only)
(21) Free Software Foundation LGPL License (*-linux* targets only)
(22) Xavier Leroy LGPL License (i[3456]86-*-linux* targets only)
(24) Hewlett-Packard  (hppa targets only)

Therefore if a file has an embedded license header then the specific license there applies, otherwise ALL licenses in COPYING.NEWLIB apply, except those that are target specific and do not match the target used during compilation.

1
  • In the newlib/libc/string directory (which the OP asked about), an example of a file which does include its own embedded license header is strstr.c. So if you used only that file, then you'd only need to comply with that one license. Most of the other files in that directory don't seem to have embedded license statements, so what you said here is correct, that all licenses would apply.
    – Brandin
    Sep 27, 2022 at 7:09
1

The generic license file COPYING.NEWLIB lists 56 different licenses from different institutions and individuals. But there's no real information which license applies to which part of Newlib. So I'm kind of lost at this point. I don't think I have to comply with each and every license listed in COPYING.NEWLIB?

If Newlib is part of the product you are distributing, then you definitely have to comply with all those licenses.

The only escape here is if you can indicate all portions of the code that is covered by one of those licenses and you can prove that those portions are not part of the product you distribute, then you are not bound by that license. But that can be a really hard exercise, especially when some code evolved over time.

On the other hand, if your use of Newlib is exclusively because it provides the implementation of the C standard library on the Red Hat platform, but your application can run on any Linux system with whatever C standard library that system provides, then you can safely ignore Newlib.

1
  • Several of the license statements in COPYING.NEWLIB specify a specific target, e.g. (39) says "(epiphany-* targets)". So if you are building the library and not using such a target, then technically you don't have to comply with (39). However, from a practical standpoint, your suggestion to comply with "all of them" is probably best, especially since they all seem to be permissive licenses (I didn't read them all yet). Source code distributions include all the targets, of course, so in that case definitely one would need to comply with all of them.
    – Brandin
    Sep 27, 2022 at 7:03
0

Each file contains specific copyright notice.

Because there are files, that are licensed under GNU LGPL/GPL, you should learn how does it work. If you use files licensed under GPL, your app must be GPLv3.

Because it's library, if you use it, you should include COPYING.Newlib to your executables. Note that AT&T uses term "BSD License", so you should ask "What version of BSD License? 2-Clause, 3-Clause?"

IT'S NOT LEGAL ADVICE

Edit: Because of date of copyright, I found the BSD-License terms at historical OSI website (year 2002), so probably it's apply: https://web.archive.org/web/20020627100357/http://opensource.org/licenses/bsd-license.php IT'S NOT LEGAL ADVICE TOO

2
  • Thanks for your answer! I'm aware of the impliciations of LGPL/GPL, copyleft and other license obligations. I'm just wondering how I can figure out the license of each component in a library like Newlib. The corresponding source files often neither contain a copyright notice nor a license notice, see github.com/bminor/newlib/blob/master/newlib/libc/string/… as an example. The COPYING.Newlib only lists licenses of components contained in the library without referencing them directly.
    – Athazo
    Jan 17, 2022 at 10:15
  • COPYING.NewLib specify only non-copyleft licenses or LGPL. So only what you should do is: redistribute COPYING.Newlib, LGPL licenses (2.0,2.1, {3.0?}) and redistribute Newlib source to be sure you are not infringing on copyright But in most LGPL cases, there are LGPL headers in the files. Remember: Better to do more than regret it later! THIS IS NOT A LEGAL ADVICE
    – Maniues
    Jan 17, 2022 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.