Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the license for programs that are compiled with GCC? [closed]

If a programming language compiler is released under the GPL like GCC, does that mean programs written and compiled by it must be under GPL licenses?

I mean when we use GCC or other compilation system with a GPL license, does the software that use these have to be GPL licensed too?

like image 535
mlibre Avatar asked Jul 06 '15 17:07

mlibre


People also ask

What is the license for the GCC compiler?

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?

Does GCC have to be under GPL?

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 ...

How do I run an executable program from a GCC file?

When you run this command, the compiler generates an executable program called a.out. To run the executable program type the following command: To give the executable program a different name, we can add the "-o" option to the gcc command after the name of the file we are compiling, as shown below:

What programs are licensed under the GPL?

Prominent free software programs licensed under the GPL include the Linux kernel and the GNU Compiler Collection (GCC).


1 Answers

The GPL handles this explicitly. It only covers work that is derived from the original work covered by the GPL by copying or modifying GPL licensed code. The output of the program is explicitly excluded from the terms and conditions of the GPL.

Since a binary compiled with GCC is the output of GCC it is not covered by the GPL except you link against parts of the GCC or include code into your program which you have copied from the source code of GCC.

You can read the whole GPL here.

like image 134
frigge Avatar answered Sep 20 '22 22:09

frigge