11

I'm trying to understand how licensing generally works in software development, but this seems to be a rather broad topic that won't have a single straight-forward answer. Hopefully this example is specific enough to illuminate where my confusion on the subject may lie.

The GCC compiler is licensed under GNU General Public License v3, summarized here. The wording of this license seems to imply that any work a create using this compiler must include the GCC license, copyright, and link to the source. Am I grossly misinterpreting the intent of the GPL? What is expected as I begin to distribute my own work?

candied_orange
  • 102,279
  • 24
  • 197
  • 315
Jace
  • 229
  • 2
  • 7
  • 2
    I'm voting to close this question as off-topic because It is asking for legal advice (specific advice about legal disclaimers on a software product) –  Aug 05 '16 at 01:41
  • 1
    @Snowman The topic of my question is what I imagine to be a common and necessary practice in software programming. This community has answered several similar questions. http://programmers.stackexchange.com/questions/178231/how-do-i-properly-credit-authors-of-software-released-under-the-mit-license http://programmers.stackexchange.com/questions/324259/what-exactly-do-i-have-to-distribute-to-comply-with-gpl-license – Jace Aug 05 '16 at 01:59
  • 2
    I'm voting to close this question as unclear. The title and body are not in agreement. the body seems unfocused. Indeed we answer liciencing questions. We don't answer questions that require this much guessing. – candied_orange Aug 05 '16 at 02:38
  • 1
    @CandiedOrange I might not have a clear understanding of the process. I've read that any open source libraries incorporated into a project must be credited and documented in the project that uses them. I just want to know if that's the case for ALL aspects of programming. – Jace Aug 05 '16 at 02:47
  • Jace if you had simply asked that I would have answered with: depends on each things licence and user agreement. – candied_orange Aug 05 '16 at 02:50
  • 1
    There is no 'one size fits all' here. You need to be aware of the license requirements of each open source lib you use. There is no single answer to this. – GrandmasterB Aug 05 '16 at 03:05
  • @CandiedOrange For instance, the GCC compiler is licensed under GNU GPLv3, which seems to indicate that any program I create using the GCC compiler must also be open source, and I must provide the GCC compiler I used along with the program I want to share. That just seems ridiculously inconvenient, but maybe I'm reading this wrong https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)#summary – Jace Aug 05 '16 at 03:07
  • Jace again that's much than what you've posted as a question. The problem is you keep doing it in comments. We are not supposed to have a discussion here. Either use what you've learned to edit your question or delete it and ask a better one. Please see [how to ask](http://programmers.stackexchange.com/help/how-to-ask). – candied_orange Aug 05 '16 at 03:14
  • @CandiedOrange I've edited my question now. Hopefully this more specific example of what I'm trying to understand will be a bit more palatable. My apologies for the broad nature of my original request. This is not a topic I'm familiar with. – Jace Aug 05 '16 at 03:42
  • edited question looks like a duplicate of [GPL and code producing software](http://programmers.stackexchange.com/questions/269541/gpl-and-code-producing-software). See also: [Licensing of content created by licensed code](http://programmers.stackexchange.com/a/278288/31260): "The compiler is released under the GPL. It is perfectly fine to use that to compile programs that are not released under the GPL. What you are restricted from is modifying the GNU compiler itself and not putting those modifications under the GPL. Lots of very proprietary code is compiled with the GNU compiler..." – gnat Aug 05 '16 at 03:43
  • 1
    @gnat I see, so the GPL contains rules about using the source code, and generally does not govern the product of the application itself. – Jace Aug 05 '16 at 03:51
  • Possible duplicate of [GPL and code producing software](https://softwareengineering.stackexchange.com/questions/269541/gpl-and-code-producing-software) – gnat Aug 03 '17 at 14:12

1 Answers1

17

This would be covered by the GCC Runtime Library Exception. If you use GCC as-is to compile your program, the resulting binary is not covered by the GPLv3 and you can license it under any terms you wish. Your source code is not subject to the GPLv3 merely because you use GCC to compile it to a binary, the only way GCC's license would impact your source code is if you directly copy portions of the GCC code into your source code itself (which, of course, would mean some of the source code isn't yours).

Todd Knarr
  • 1,019
  • 1
  • 9
  • 11
  • I see. As long as the code is my own original source, then I own the product of that code, and don't have to worry about crediting the source(I don't deserve much credit, anyways.) What about using the standard libraries? I can't imagine getting very far in a C program without stdio. – Jace Aug 05 '16 at 03:59
  • Oh, I guess the standard libraries are addressed with the GCC Runtime Library Exception, right? – Jace Aug 05 '16 at 04:02
  • 1
    The GNU implementations of libc and libstdc++ are licensed with that exception, yes. Other implementations may have different terms. You'd need to check your system's libc/libstdc++ implementations, but the norm for Linux systems using GCC is to use the GNU implementations. – Todd Knarr Aug 05 '16 at 04:09
  • 1
    Actually going is LGPL2.1+ or LGPL2+ (can't remember which, but it doesn't matter for these purposes). As long as you dynamically link to the copy of going on the user's system, you will be fine. – Demi Aug 05 '16 at 04:30
  • 1
    An example of a compiler that copies large swaths of code into the generated output verbatim is GNU Bison, which is precisely why GNU Bison has an exception in the license allowing you to use that code in the output without being subject to the GPL. – Jörg W Mittag Aug 05 '16 at 07:16