It is important to realize that the "GPL" can refer to two licenses.
- The GNU General Public License
- The GNU Lesser General Public License (aka) The Library General Public License
Either one is very clear to specify that it considers code from a library intermixed with a program as a combined work. This means, if your program loads a library through a dynamic loader (i.e. a common shared object), or links against it statically, the resulting executable is a combined work of the program itself and the libraries that support it.
Now, the differences between the two licenses become very important.
The GPL states that if your program uses a library (or any other code covered by the GPL), it must be released under the same terms as the GPL. This (again) is because the GPL considers the resulting program to be a combined work of your code, plus the work of others.
Fortunately (or not? depending on your views), the GNU C Library is not covered by the GPL. It is covered by the LGPL. The LGPL says that simply loading and using the system C library does constitute a combined work, but an exception is made that allows proprietary applications to do so without having to comply with the distribution requirements of the GPL. So, in this case, Oracle is free to use the system C library (needed to run their code) without being obligated to release their source code.
If Oracle released software that needed to load or link against a GPL covered library, say .. readline()
, then yes, they would be obligated to share the code. Oracle (like many others that write software for UNIX-like operating systems) is careful to choose libraries that are released under a more permissive license (aka 2 or 3-clause BSD), or implement their own.
As far as the kernel goes, simply using its syscall interface does not constitute a combined work. While most of us just let the system C library abstract these complexities away, you are completely free to implement your own syscalls under whatever terms you want. This illustrates why the LGPL for the system C library was a very strategic choice. If it were the other way around, GNU/Linux would have deterred more developers than they attracted. Note also, that many of the Linux headers that define the magic numbers needed to talk to the kernel's syscall interface have no license mentioned whatsoever. See linux/sysctl.h
for example, or this note from Linus himself in the COPYING
file distributed with the kernel:
NOTE! This copyright does not
cover user programs that use kernel
services by normal system calls - this
is merely considered normal use of
the kernel, and does not fall under
the heading of "derived work". Also
note that the GPL below is copyrighted
by the Free Software Foundation, but
the instance of code that it refers to
(the Linux kernel) is copyrighted by
me and others who actually wrote it.
Also note that the only valid version
of the GPL as far as the kernel is
concerned is this particular version
of the license (ie v2, not v2.2 or
v3.x or whatever), unless explicitly
otherwise stated.
Linus Torvalds
Note, Linus specifically says using the kernel headers and syscall interface does not constitute a derived (as in modified) or combined (as in simply used) work. This, among other things is part of the rift between Linux and GNU. I mention this only because you indirectly mention the ramifications of the GPL. Linus (sometimes) wants code that modifies the kernel, but chose the GPL to ensure the (sometimes) was his choice.
In short, if you link against or load a library that is covered by the GPL, you must make your code available under the same license. If you link against or load a library that is covered by the LGPL, the terms of licensing are up to you.
Note also that the LGPL has a lot more to say, especially regarding modifications, statically linking, etc. What I've described is just the bit that answers your question.
Finally, The GPL applies only when you distribute or convey a program. You can do whatever you want to your software on your computer and you are under no obligation to share it with other users of your computer (or server, or whatever). The AGPL has things to say about that, if the software interacts with a network .. but that's a topic for a different question.
The FSF takes GPL related questions at [email protected] - if you are ever in doubt about a particular case and want to make sure you don't get in trouble, they are rather friendly and happy to answer questions .. even if you are making non-free software. They like it when people take some effort to ensure they follow the license appropriately, which unfortunately doesn't happen from time to time.
This topic is still just as sensitive as it was in the early 90's.