2

I want to check if a file in GCC that is linked into my program, such as libgcc.a and crti.o, is covered by The GCC Runtime Library Exception. According to the FAQ, I should check its license header, but I couldn't find it in the GCC installation directory.

Although it is written at the head of crti.S that it is covered by the exception, it seems strange to me to check the license by looking at the source code. Additionally, I couldn't find the license of a library (archive file) there. COPYING.LIB and COPYING.RUNTIME may be licenses of libraries, though they don't indicate which files they cover.

Is there a list of files covered by the exception somewhere? Where can I find the license of a library in GCC?

1
  • The source code is the best place to mark the license, because it avoids the problem you're having. Yet you call it "strange"...
    – Ben Voigt
    Apr 12, 2023 at 14:22

1 Answer 1

5

According to the FAQ, I should check its license header, but I couldn't find it in the GCC installation directory.

This is probably a result of your distribution not including a copy of the source code. In many cases, the source code is split into a different package. For example, Debian provides gcc-12 and gcc-12-source, and you can install either or both of these packages independently.

Although it is written at the head of crti.S that it is covered by the exception, it seems strange to me to check the license by looking at the source code.

This is typical of GNU projects, as recommended by the FSF. While the FSF and the various GNU projects are nominally independent organizations, they are de facto closely-related, and tend to follow the same principles and practices, so if the FSF says to do something, a GNU project will usually follow the FSF's advice. While it may seem strange to you, this way of indicating licensing is in my experience fairly typical for larger FOSS projects.

Additionally, I couldn't find the license of a library (archive file) there. COPYING.LIB and COPYING.RUNTIME may be licenses of libraries, though they don't indicate which files they cover.

You will need to take this up with the GCC project. If they have not clearly stated the license applicable to some file, then we cannot apply the license on their behalf, because we do not own the copyright. I would suggest filing a bug stating that the licensing information is missing or unclear, and see how they respond. Alternatively, you can email [email protected] and ask for licensing information. In either case, be sure to clearly and unambiguously identify the file that you're confused about (i.e. do not just say "a library" - specify the exact path within their Git repository to an individual file or set of files).

Your Answer

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

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