arch/powerpc/boot/crtsavres.S | 5 ++--- arch/powerpc/include/uapi/asm/eeh.h | 5 ++--- arch/powerpc/include/uapi/asm/kvm.h | 5 ++--- arch/powerpc/include/uapi/asm/kvm_para.h | 5 ++--- arch/powerpc/include/uapi/asm/ps3fb.h | 3 +-- arch/powerpc/lib/crtsavres.S | 5 ++--- arch/powerpc/xmon/ppc.h | 5 +++-- 7 files changed, 14 insertions(+), 19 deletions(-)
From: Thomas Huth <thuth@redhat.com>
The FSF does not reside in the Franklin street anymore. Let's update
the address with the link to their website, as suggested in the latest
revision of the GPL-2.0 license.
(See https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt for example)
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
v2: Resend with CC: linux-spdx@vger.kernel.org as suggested here:
https://lore.kernel.org/linuxppc-dev/e5de8010-5663-47f4-a2f0-87fd88230925@csgroup.eu
arch/powerpc/boot/crtsavres.S | 5 ++---
arch/powerpc/include/uapi/asm/eeh.h | 5 ++---
arch/powerpc/include/uapi/asm/kvm.h | 5 ++---
arch/powerpc/include/uapi/asm/kvm_para.h | 5 ++---
arch/powerpc/include/uapi/asm/ps3fb.h | 3 +--
arch/powerpc/lib/crtsavres.S | 5 ++---
arch/powerpc/xmon/ppc.h | 5 +++--
7 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/arch/powerpc/boot/crtsavres.S b/arch/powerpc/boot/crtsavres.S
index 085fb2b9a8b89..a710a49a5dbca 100644
--- a/arch/powerpc/boot/crtsavres.S
+++ b/arch/powerpc/boot/crtsavres.S
@@ -26,9 +26,8 @@
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING. If not, write to
- * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ * along with this program; see the file COPYING. If not, see
+ * <https://www.gnu.org/licenses/>.
*
* As a special exception, if you link this library with files
* compiled with GCC to produce an executable, this does not cause
diff --git a/arch/powerpc/include/uapi/asm/eeh.h b/arch/powerpc/include/uapi/asm/eeh.h
index 28186071fafc4..4a117cc475299 100644
--- a/arch/powerpc/include/uapi/asm/eeh.h
+++ b/arch/powerpc/include/uapi/asm/eeh.h
@@ -9,9 +9,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, see <https://www.gnu.org/licenses/>.
*
* Copyright IBM Corp. 2015
*
diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h
index eaeda001784eb..75c1d7a48ad52 100644
--- a/arch/powerpc/include/uapi/asm/kvm.h
+++ b/arch/powerpc/include/uapi/asm/kvm.h
@@ -9,9 +9,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, see <https://www.gnu.org/licenses/>.
*
* Copyright IBM Corp. 2007
*
diff --git a/arch/powerpc/include/uapi/asm/kvm_para.h b/arch/powerpc/include/uapi/asm/kvm_para.h
index a809b1b44ddfe..66d1e17e427a6 100644
--- a/arch/powerpc/include/uapi/asm/kvm_para.h
+++ b/arch/powerpc/include/uapi/asm/kvm_para.h
@@ -9,9 +9,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, see <https://www.gnu.org/licenses/>.
*
* Copyright IBM Corp. 2008
*
diff --git a/arch/powerpc/include/uapi/asm/ps3fb.h b/arch/powerpc/include/uapi/asm/ps3fb.h
index fd7e3a0d35d57..af6322042b3b0 100644
--- a/arch/powerpc/include/uapi/asm/ps3fb.h
+++ b/arch/powerpc/include/uapi/asm/ps3fb.h
@@ -13,8 +13,7 @@
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with this program; if not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _ASM_POWERPC_PS3FB_H_
diff --git a/arch/powerpc/lib/crtsavres.S b/arch/powerpc/lib/crtsavres.S
index 8967903c15e99..c7e58b6614169 100644
--- a/arch/powerpc/lib/crtsavres.S
+++ b/arch/powerpc/lib/crtsavres.S
@@ -27,9 +27,8 @@
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING. If not, write to
- * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ * along with this program; see the file COPYING. If not, see
+ * <https://www.gnu.org/licenses/>.
*
* As a special exception, if you link this library with files
* compiled with GCC to produce an executable, this does not cause
diff --git a/arch/powerpc/xmon/ppc.h b/arch/powerpc/xmon/ppc.h
index 1d98b8dd134ef..270097f6e905b 100644
--- a/arch/powerpc/xmon/ppc.h
+++ b/arch/powerpc/xmon/ppc.h
@@ -15,8 +15,9 @@ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+along with this file; see the file COPYING. If not, see
+<https://www.gnu.org/licenses/>.
+*/
#ifndef PPC_H
#define PPC_H
--
2.50.0
On Fri, Jul 11, 2025 at 07:35:09AM +0200, Thomas Huth wrote: > From: Thomas Huth <thuth@redhat.com> > > The FSF does not reside in the Franklin street anymore. Let's update > the address with the link to their website, as suggested in the latest > revision of the GPL-2.0 license. > (See https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt for example) > > Acked-by: Segher Boessenkool <segher@kernel.crashing.org> > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > v2: Resend with CC: linux-spdx@vger.kernel.org as suggested here: > https://lore.kernel.org/linuxppc-dev/e5de8010-5663-47f4-a2f0-87fd88230925@csgroup.eu > > arch/powerpc/boot/crtsavres.S | 5 ++--- > arch/powerpc/include/uapi/asm/eeh.h | 5 ++--- > arch/powerpc/include/uapi/asm/kvm.h | 5 ++--- > arch/powerpc/include/uapi/asm/kvm_para.h | 5 ++--- > arch/powerpc/include/uapi/asm/ps3fb.h | 3 +-- > arch/powerpc/lib/crtsavres.S | 5 ++--- > arch/powerpc/xmon/ppc.h | 5 +++-- > 7 files changed, 14 insertions(+), 19 deletions(-) > > diff --git a/arch/powerpc/boot/crtsavres.S b/arch/powerpc/boot/crtsavres.S > index 085fb2b9a8b89..a710a49a5dbca 100644 > --- a/arch/powerpc/boot/crtsavres.S > +++ b/arch/powerpc/boot/crtsavres.S > @@ -26,9 +26,8 @@ > * General Public License for more details. > * > * You should have received a copy of the GNU General Public License > - * along with this program; see the file COPYING. If not, write to > - * the Free Software Foundation, 51 Franklin Street, Fifth Floor, > - * Boston, MA 02110-1301, USA. > + * along with this program; see the file COPYING. If not, see > + * <https://www.gnu.org/licenses/>. > * > * As a special exception, if you link this library with files > * compiled with GCC to produce an executable, this does not cause Please just drop all the "boilerplate" license text from these files, and use the proper SPDX line at the top of them instead. That is the overall goal for all kernel files. thanks, greg k-h
On 11/07/2025 07.52, Greg Kroah-Hartman wrote: > On Fri, Jul 11, 2025 at 07:35:09AM +0200, Thomas Huth wrote: >> From: Thomas Huth <thuth@redhat.com> >> >> The FSF does not reside in the Franklin street anymore. Let's update >> the address with the link to their website, as suggested in the latest >> revision of the GPL-2.0 license. >> (See https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt for example) >> >> Acked-by: Segher Boessenkool <segher@kernel.crashing.org> >> Signed-off-by: Thomas Huth <thuth@redhat.com> >> --- >> v2: Resend with CC: linux-spdx@vger.kernel.org as suggested here: >> https://lore.kernel.org/linuxppc-dev/e5de8010-5663-47f4-a2f0-87fd88230925@csgroup.eu >> >> arch/powerpc/boot/crtsavres.S | 5 ++--- >> arch/powerpc/include/uapi/asm/eeh.h | 5 ++--- >> arch/powerpc/include/uapi/asm/kvm.h | 5 ++--- >> arch/powerpc/include/uapi/asm/kvm_para.h | 5 ++--- >> arch/powerpc/include/uapi/asm/ps3fb.h | 3 +-- >> arch/powerpc/lib/crtsavres.S | 5 ++--- >> arch/powerpc/xmon/ppc.h | 5 +++-- >> 7 files changed, 14 insertions(+), 19 deletions(-) >> >> diff --git a/arch/powerpc/boot/crtsavres.S b/arch/powerpc/boot/crtsavres.S >> index 085fb2b9a8b89..a710a49a5dbca 100644 >> --- a/arch/powerpc/boot/crtsavres.S >> +++ b/arch/powerpc/boot/crtsavres.S >> @@ -26,9 +26,8 @@ >> * General Public License for more details. >> * >> * You should have received a copy of the GNU General Public License >> - * along with this program; see the file COPYING. If not, write to >> - * the Free Software Foundation, 51 Franklin Street, Fifth Floor, >> - * Boston, MA 02110-1301, USA. >> + * along with this program; see the file COPYING. If not, see >> + * <https://www.gnu.org/licenses/>. >> * >> * As a special exception, if you link this library with files >> * compiled with GCC to produce an executable, this does not cause > > Please just drop all the "boilerplate" license text from these files, > and use the proper SPDX line at the top of them instead. That is the > overall goal for all kernel files. Ok, I can do that for the header files ... not quite sure about the *.S files though since they contain some additional text about exceptions. I'll drop those *.S files from the next version of the patch, I think these likely need to be discussed separately. Thomas
On Fri, Jul 11, 2025 at 09:09:08AM +0200, Thomas Huth wrote: > On 11/07/2025 07.52, Greg Kroah-Hartman wrote: > > On Fri, Jul 11, 2025 at 07:35:09AM +0200, Thomas Huth wrote: > > > From: Thomas Huth <thuth@redhat.com> > > > > > > The FSF does not reside in the Franklin street anymore. Let's update > > > the address with the link to their website, as suggested in the latest > > > revision of the GPL-2.0 license. > > > (See https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt for example) > > > > > > Acked-by: Segher Boessenkool <segher@kernel.crashing.org> > > > Signed-off-by: Thomas Huth <thuth@redhat.com> > > > --- > > > v2: Resend with CC: linux-spdx@vger.kernel.org as suggested here: > > > https://lore.kernel.org/linuxppc-dev/e5de8010-5663-47f4-a2f0-87fd88230925@csgroup.eu > > > arch/powerpc/boot/crtsavres.S | 5 ++--- > > > arch/powerpc/include/uapi/asm/eeh.h | 5 ++--- > > > arch/powerpc/include/uapi/asm/kvm.h | 5 ++--- > > > arch/powerpc/include/uapi/asm/kvm_para.h | 5 ++--- > > > arch/powerpc/include/uapi/asm/ps3fb.h | 3 +-- > > > arch/powerpc/lib/crtsavres.S | 5 ++--- > > > arch/powerpc/xmon/ppc.h | 5 +++-- > > > 7 files changed, 14 insertions(+), 19 deletions(-) > > > > > > diff --git a/arch/powerpc/boot/crtsavres.S b/arch/powerpc/boot/crtsavres.S > > > index 085fb2b9a8b89..a710a49a5dbca 100644 > > > --- a/arch/powerpc/boot/crtsavres.S > > > +++ b/arch/powerpc/boot/crtsavres.S > > > @@ -26,9 +26,8 @@ > > > * General Public License for more details. > > > * > > > * You should have received a copy of the GNU General Public License > > > - * along with this program; see the file COPYING. If not, write to > > > - * the Free Software Foundation, 51 Franklin Street, Fifth Floor, > > > - * Boston, MA 02110-1301, USA. > > > + * along with this program; see the file COPYING. If not, see > > > + * <https://www.gnu.org/licenses/>. > > > * > > > * As a special exception, if you link this library with files > > > * compiled with GCC to produce an executable, this does not cause > > > > Please just drop all the "boilerplate" license text from these files, > > and use the proper SPDX line at the top of them instead. That is the > > overall goal for all kernel files. > > Ok, I can do that for the header files ... not quite sure about the *.S > files though since they contain some additional text about exceptions. That's a crazy exception, and one that should probably be talked about with the FSF to determine exactly what the SPDX lines should be. thanks, greg k-h
On Fri, Jul 11, 2025 at 09:30:31AM +0200, Greg Kroah-Hartman wrote: > That's a crazy exception, and one that should probably be talked about > with the FSF to determine exactly what the SPDX lines should be. It is called the libgcc exception and has been around forever for the files in libgcc.a that a lot of these low-level kernel helpers were copied from as the kernel doesn't link libgcc.
On Fri, Jul 11, 2025 at 12:32:57AM -0700, Christoph Hellwig wrote: > On Fri, Jul 11, 2025 at 09:30:31AM +0200, Greg Kroah-Hartman wrote: > > That's a crazy exception, and one that should probably be talked about > > with the FSF to determine exactly what the SPDX lines should be. > > It is called the libgcc exception and has been around forever for the > files in libgcc.a that a lot of these low-level kernel helpers were > copied from as the kernel doesn't link libgcc. Almost. It is called the "GCC Runtime Library Exception", and it is about a lot more than libgcc, although that of course is one of the most important things it covers :-) Not linking to libgcc is a foolish thing btw. The main reason for it originally is to not have long divisions in the kernel (for x86 anyway!), but not using libgcc is neither sufficient nor necessary for that goal. Segher
On Fri, Jul 11, 2025 at 12:32:57AM -0700, Christoph Hellwig wrote: > On Fri, Jul 11, 2025 at 09:30:31AM +0200, Greg Kroah-Hartman wrote: > > That's a crazy exception, and one that should probably be talked about > > with the FSF to determine exactly what the SPDX lines should be. > > It is called the libgcc exception and has been around forever for the > files in libgcc.a that a lot of these low-level kernel helpers were > copied from as the kernel doesn't link libgcc. Ah, so it would be something like this exception: https://spdx.org/licenses/GCC-exception-2.0.html but the wording doesn't seem to match. I'll let the license lawyers figure this out, thanks for the hint! greg k-h
On Fri, Jul 11, 2025 at 3:38 AM Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > > On Fri, Jul 11, 2025 at 12:32:57AM -0700, Christoph Hellwig wrote: > > On Fri, Jul 11, 2025 at 09:30:31AM +0200, Greg Kroah-Hartman wrote: > > > That's a crazy exception, and one that should probably be talked about > > > with the FSF to determine exactly what the SPDX lines should be. > > > > It is called the libgcc exception and has been around forever for the > > files in libgcc.a that a lot of these low-level kernel helpers were > > copied from as the kernel doesn't link libgcc. > > Ah, so it would be something like this exception: > https://spdx.org/licenses/GCC-exception-2.0.html > but the wording doesn't seem to match. > > I'll let the license lawyers figure this out, thanks for the hint! This one * In addition to the permissions in the GNU General Public License, the * Free Software Foundation gives you unlimited permission to link the * compiled version of this file with other programs, and to distribute * those programs without any restriction coming from the use of this * file. (The General Public License restrictions do apply in other * respects; for example, they cover modification of the file, and * distribution when not linked into another program.) is `GCC-exception-2.0` while this one: * As a special exception, if you link this library with files * compiled with GCC to produce an executable, this does not cause * the resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why * the executable file might be covered by the GNU General Public License. does not seem to be in the SPDX exception list. It is very similar to `GNU-compiler-exception` except it specifically mentions GCC instead of saying "a GNU compiler". Alerting Jilayne by cc. Also, and a question I remember wondering about a while ago, I don't know how SPDX treats situations where, as apparently in this case, more than one exception applies to a license grant. I don't think SPDX syntax allows `GPL-2.0-or-later WITH GCC-exception-2.0 WITH {some-additional-SPDX-exception}` or `GPL-2.0-or-later WITH GCC-exception-2.0 AND {some additional-SPDX-exception}`, i.e. I think SPDX assumes that only one exception will ever apply in a given case, although the `AdditionRef-` construct provides one way of dealing with this. Richard
On Fri, Jul 11, 2025 at 05:02:18PM -0400, Richard Fontana wrote: > On Fri, Jul 11, 2025 at 3:38 AM Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: > > > > On Fri, Jul 11, 2025 at 12:32:57AM -0700, Christoph Hellwig wrote: > > > On Fri, Jul 11, 2025 at 09:30:31AM +0200, Greg Kroah-Hartman wrote: > > > > That's a crazy exception, and one that should probably be talked about > > > > with the FSF to determine exactly what the SPDX lines should be. > > > > > > It is called the libgcc exception and has been around forever for the > > > files in libgcc.a that a lot of these low-level kernel helpers were > > > copied from as the kernel doesn't link libgcc. > > > > Ah, so it would be something like this exception: > > https://spdx.org/licenses/GCC-exception-2.0.html > > but the wording doesn't seem to match. > > > > I'll let the license lawyers figure this out, thanks for the hint! > > This one > > * In addition to the permissions in the GNU General Public License, the > * Free Software Foundation gives you unlimited permission to link the > * compiled version of this file with other programs, and to distribute > * those programs without any restriction coming from the use of this > * file. (The General Public License restrictions do apply in other > * respects; for example, they cover modification of the file, and > * distribution when not linked into another program.) > > is `GCC-exception-2.0` > > while this one: > > * As a special exception, if you link this library with files > * compiled with GCC to produce an executable, this does not cause > * the resulting executable to be covered by the GNU General Public License. > * This exception does not however invalidate any other reasons why > * the executable file might be covered by the GNU General Public License. > > does not seem to be in the SPDX exception list. It is very similar to > `GNU-compiler-exception` except it specifically mentions GCC instead > of saying "a GNU compiler". https://spdx.org/licenses/GNU-compiler-exception.html is exactly this. Segher
On Fri, Jul 11, 2025 at 7:14 PM Segher Boessenkool <segher@kernel.crashing.org> wrote: > > On Fri, Jul 11, 2025 at 05:02:18PM -0400, Richard Fontana wrote: > > while this one: > > > > * As a special exception, if you link this library with files > > * compiled with GCC to produce an executable, this does not cause > > * the resulting executable to be covered by the GNU General Public License. > > * This exception does not however invalidate any other reasons why > > * the executable file might be covered by the GNU General Public License. > > > > does not seem to be in the SPDX exception list. It is very similar to > > `GNU-compiler-exception` except it specifically mentions GCC instead > > of saying "a GNU compiler". > > https://spdx.org/licenses/GNU-compiler-exception.html > > is exactly this. No, because `GNU-compiler-exception` as defined here https://github.com/spdx/license-list-XML/blob/main/src/exceptions/GNU-compiler-exception.xml assumes use of the term "GCC" rather than "a GNU compiler". Richard
On Fri, 11 Jul 2025, Richard Fontana wrote: > > > while this one: > > > > > > * As a special exception, if you link this library with files > > > * compiled with GCC to produce an executable, this does not cause > > > * the resulting executable to be covered by the GNU General Public License. > > > * This exception does not however invalidate any other reasons why > > > * the executable file might be covered by the GNU General Public License. > > > > > > does not seem to be in the SPDX exception list. It is very similar to > > > `GNU-compiler-exception` except it specifically mentions GCC instead > > > of saying "a GNU compiler". > > > > https://spdx.org/licenses/GNU-compiler-exception.html > > > > is exactly this. > > No, because `GNU-compiler-exception` as defined here > https://github.com/spdx/license-list-XML/blob/main/src/exceptions/GNU-compiler-exception.xml > assumes use of the term "GCC" rather than "a GNU compiler". I don't know what the legal status of the statement referred is, however the original exception as published[1] by FSF says: '"GCC" means a version of the GNU Compiler Collection, with or without modifications, governed by version 3 (or a specified later version) of the GNU General Public License (GPL) with the option of using any subsequent versions published by the FSF.' which I think makes it clear that "GCC" is a collection of "GNU compilers" and therefore the two terms are synonymous to each other for the purpose of said exception (in the old days "GCC" stood for "GNU C Compiler", but the old meaning makes no sense anymore now that we have compilers for Ada, Fortran and many other languages included in GCC). NB up to date versions of CRT code refer to the exception as published rather than pasting an old version of its text: 'Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation.' References: [1] "GCC Runtime Library Exception", version 3.1, <https://www.gnu.org/licenses/gcc-exception-3.1.html> FWIW, Maciej
On Sat, Jul 12, 2025 at 11:48:16PM +0100, Maciej W. Rozycki wrote: > On Fri, 11 Jul 2025, Richard Fontana wrote: > I don't know what the legal status of the statement referred is, however > the original exception as published[1] by FSF says: > > '"GCC" means a version of the GNU Compiler Collection, with or without > modifications, governed by version 3 (or a specified later version) of the > GNU General Public License (GPL) with the option of using any subsequent > versions published by the FSF.' (which is likely the wrong license, the code in the kernel was taken from something GPLv2). > which I think makes it clear that "GCC" is a collection of "GNU compilers" > and therefore the two terms are synonymous to each other for the purpose > of said exception (in the old days "GCC" stood for "GNU C Compiler", but > the old meaning makes no sense anymore now that we have compilers for Ada, > Fortran and many other languages included in GCC). Since, what, 2001? If this matters for these files, they were forked *very* long ago! And, of course, the much better way to solve these self-inflicted problems is to just use the libgcc that your version of GCC want to use, the one it ships with itself, it being a necessary portion of the compiler! Here, an old patch of mine, this one for SuperH (I have stacks of such patches, for many archs): === commit 9289694955c6105fb6bcc35fbf9ce7acddd60674 Author: Segher Boessenkool <segher@kernel.crashing.org> Date: Mon Nov 24 09:36:50 2014 -0800 sh: Use libgcc Building the kernel with non-ancient compilers fails, because some newer libgcc functions are missing from the kernel's clone of it. Use the compiler's libgcc, instead. diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 5c8776482530..eae83b76f17c 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -171,6 +171,8 @@ KBUILD_CFLAGS += -pipe $(cflags-y) KBUILD_CPPFLAGS += $(cflags-y) KBUILD_AFLAGS += $(cflags-y) +LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) + ifeq ($(CONFIG_MCOUNT),y) KBUILD_CFLAGS += -pg endif @@ -180,6 +182,7 @@ ifeq ($(CONFIG_DWARF_UNWINDER),y) endif libs-y := arch/sh/lib/ $(libs-y) +libs-y += $(LIBGCC) BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.xz uImage.lzo \ uImage.srec uImage.bin zImage vmlinux.bin vmlinux.srec \ diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile index eb473d373ca4..2acb2d8c0366 100644 --- a/arch/sh/lib/Makefile +++ b/arch/sh/lib/Makefile @@ -6,11 +6,6 @@ lib-y = delay.o memmove.o memchr.o \ checksum.o strlen.o div64.o div64-generic.o -# Extracted from libgcc -obj-y += movmem.o ashldi3.o ashrdi3.o lshrdi3.o \ - ashlsi3.o ashrsi3.o ashiftrt.o lshrsi3.o \ - udiv_qrnnd.o - udivsi3-y := udivsi3_i4i-Os.o ifneq ($(CONFIG_CC_OPTIMIZE_FOR_SIZE),y) === Segher
On Sat, Jul 12, 2025 at 6:48 PM Maciej W. Rozycki <macro@orcam.me.uk> wrote: > > On Fri, 11 Jul 2025, Richard Fontana wrote: > > > > > while this one: > > > > > > > > * As a special exception, if you link this library with files > > > > * compiled with GCC to produce an executable, this does not cause > > > > * the resulting executable to be covered by the GNU General Public License. > > > > * This exception does not however invalidate any other reasons why > > > > * the executable file might be covered by the GNU General Public License. > > > > > > > > does not seem to be in the SPDX exception list. It is very similar to > > > > `GNU-compiler-exception` except it specifically mentions GCC instead > > > > of saying "a GNU compiler". > > > > > > https://spdx.org/licenses/GNU-compiler-exception.html > > > > > > is exactly this. > > > > No, because `GNU-compiler-exception` as defined here > > https://github.com/spdx/license-list-XML/blob/main/src/exceptions/GNU-compiler-exception.xml > > assumes use of the term "GCC" rather than "a GNU compiler". > > I don't know what the legal status of the statement referred is, however > the original exception as published[1] by FSF says: > > '"GCC" means a version of the GNU Compiler Collection, with or without > modifications, governed by version 3 (or a specified later version) of the > GNU General Public License (GPL) with the option of using any subsequent > versions published by the FSF.' > which I think makes it clear that "GCC" is a collection of "GNU compilers" > and therefore the two terms are synonymous to each other for the purpose > of said exception (in the old days "GCC" stood for "GNU C Compiler", but > the old meaning makes no sense anymore now that we have compilers for Ada, > Fortran and many other languages included in GCC). > > NB up to date versions of CRT code refer to the exception as published > rather than pasting an old version of its text: > > 'Under Section 7 of GPL version 3, you are granted additional > permissions described in the GCC Runtime Library Exception, version > 3.1, as published by the Free Software Foundation.' > > References: > > [1] "GCC Runtime Library Exception", version 3.1, > <https://www.gnu.org/licenses/gcc-exception-3.1.html> I think we're basically talking past each other. The definition of "GCC" in the GCC runtime library exception 3.1 is irrelevant because that file does not refer to that exception. In SPDX, license (and exception) identifiers are precisely defined. Unless I'm missing something there is no official SPDX identifier that corresponds to this text: As a special exception, if you link this library with files compiled with GCC to produce an executable, this does not cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. I'm not personally a major supporter of SPDX and I'm the last person who would want to be associated with SPDX pedanticism but it's a standard and if the Linux kernel project is going to use it IMO it should conform to that standard, otherwise you're basically making ad hoc definitions of pseudo-SPDX expressions or redefinitions of already-defined SPDX identifiers, which seems to defeat the purpose of using SPDX expressions at all. Under that standard, there is currently no SPDX identifier representing the above text (as far as I can tell). The solution is either to propose a modification of `GNU-compiler-exception` so that "GCC" is accepted as an alternative to "a GNU compiler", or to propose a new exception to be added to SPDX's exception list, or to use a custom-defined `AdditionRef-` identifier. Richard
FYI, I've updated the definition of the SPDX "GNU-compiler-exception" to include both variants of "compiled with GCC" and "compiled with a GNU compiler". It will be published in the next release of the SPDX License List. Therefore, it should be used to mark these files (I think I counted 7 instances of this text in kernel files). -- zvr -- ________________________________________ From: Richard Fontana <rfontana@redhat.com> Sent: Sunday, July 13, 2025 15:27 To: Maciej W. Rozycki <macro@orcam.me.uk> Cc: Segher Boessenkool <segher@kernel.crashing.org>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Christoph Hellwig <hch@infradead.org>; Thomas Huth <thuth@redhat.com>; Madhavan Srinivasan <maddy@linux.ibm.com>; Michael Ellerman <mpe@ellerman.id.au>; Thomas Gleixner <tglx@linutronix.de>; Nicholas Piggin <npiggin@gmail.com>; Christophe Leroy <christophe.leroy@csgroup.eu>; linuxppc-dev@lists.ozlabs.org <linuxppc-dev@lists.ozlabs.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; kvm@vger.kernel.org <kvm@vger.kernel.org>; linux-spdx@vger.kernel.org <linux-spdx@vger.kernel.org>; J Lovejoy <opensource@jilayne.com> Subject: Re: [PATCH v2] powerpc: Replace the obsolete address of the FSF On Sat, Jul 12, 2025 at 6:48 PM Maciej W. Rozycki <macro@orcam.me.uk> wrote: > > On Fri, 11 Jul 2025, Richard Fontana wrote: > > > > > while this one: > > > > > > > > * As a special exception, if you link this library with files > > > > * compiled with GCC to produce an executable, this does not cause > > > > * the resulting executable to be covered by the GNU General Public License. > > > > * This exception does not however invalidate any other reasons why > > > > * the executable file might be covered by the GNU General Public License. > > > > > > > > does not seem to be in the SPDX exception list. It is very similar to > > > > `GNU-compiler-exception` except it specifically mentions GCC instead > > > > of saying "a GNU compiler". > > > > > > https://spdx.org/licenses/GNU-compiler-exception.html > > > > > > is exactly this. > > > > No, because `GNU-compiler-exception` as defined here > > https://github.com/spdx/license-list-XML/blob/main/src/exceptions/GNU-compiler-exception.xml > > assumes use of the term "GCC" rather than "a GNU compiler". > > I don't know what the legal status of the statement referred is, however > the original exception as published[1] by FSF says: > > '"GCC" means a version of the GNU Compiler Collection, with or without > modifications, governed by version 3 (or a specified later version) of the > GNU General Public License (GPL) with the option of using any subsequent > versions published by the FSF.' > which I think makes it clear that "GCC" is a collection of "GNU compilers" > and therefore the two terms are synonymous to each other for the purpose > of said exception (in the old days "GCC" stood for "GNU C Compiler", but > the old meaning makes no sense anymore now that we have compilers for Ada, > Fortran and many other languages included in GCC). > > NB up to date versions of CRT code refer to the exception as published > rather than pasting an old version of its text: > > 'Under Section 7 of GPL version 3, you are granted additional > permissions described in the GCC Runtime Library Exception, version > 3.1, as published by the Free Software Foundation.' > > References: > > [1] "GCC Runtime Library Exception", version 3.1, > <https://www.gnu.org/licenses/gcc-exception-3.1.html> I think we're basically talking past each other. The definition of "GCC" in the GCC runtime library exception 3.1 is irrelevant because that file does not refer to that exception. In SPDX, license (and exception) identifiers are precisely defined. Unless I'm missing something there is no official SPDX identifier that corresponds to this text: As a special exception, if you link this library with files compiled with GCC to produce an executable, this does not cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. I'm not personally a major supporter of SPDX and I'm the last person who would want to be associated with SPDX pedanticism but it's a standard and if the Linux kernel project is going to use it IMO it should conform to that standard, otherwise you're basically making ad hoc definitions of pseudo-SPDX expressions or redefinitions of already-defined SPDX identifiers, which seems to defeat the purpose of using SPDX expressions at all. Under that standard, there is currently no SPDX identifier representing the above text (as far as I can tell). The solution is either to propose a modification of `GNU-compiler-exception` so that "GCC" is accepted as an alternative to "a GNU compiler", or to propose a new exception to be added to SPDX's exception list, or to use a custom-defined `AdditionRef-` identifier. Richard Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928
© 2016 - 2025 Red Hat, Inc.