Skip to contentSkip to conversation

powerpc: Replace the obsolete address of the FSF

PATCH In review Thomas Huth 7 participants 15 messages Jul 11, 2025 – Jul 25, 2025

Subsystems (5)
KVM PowerPC SuperH KVM PowerPC +1 more subsystems
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 powerpc: Replace the obsolete address of the FSF

From: Thomas Huth <[email protected]>

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)

---
v2: Resend with CC: [email protected] as suggested here:

     https://lore.kernel.org/linuxppc-dev/[email protected]
 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(-)
arch/powerpc/boot/crtsavres.S +2 -3
index 085fb2b9a8b89..a710a49a5dbca 100644
@@ -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
arch/powerpc/include/uapi/asm/eeh.h +2 -3
index 28186071fafc4..4a117cc475299 100644
@@ -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
  *
arch/powerpc/include/uapi/asm/kvm.h +2 -3
index eaeda001784eb..75c1d7a48ad52 100644
@@ -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
  *
arch/powerpc/include/uapi/asm/kvm_para.h +2 -3
index a809b1b44ddfe..66d1e17e427a6 100644
@@ -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
  *
arch/powerpc/include/uapi/asm/ps3fb.h +1 -2
index fd7e3a0d35d57..af6322042b3b0 100644
@@ -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_
arch/powerpc/lib/crtsavres.S +2 -3
index 8967903c15e99..c7e58b6614169 100644
@@ -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
arch/powerpc/xmon/ppc.h +3 -2
index 1d98b8dd134ef..270097f6e905b 100644
@@ -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
Signature · 1 line
2.50.0
#1 lore raw
Quoted 28 lines · Thomas Huth

From: Thomas Huth <[email protected]>

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)

---
v2: Resend with CC: [email protected] as suggested here:

     https://lore.kernel.org/linuxppc-dev/[email protected]
 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(-)
arch/powerpc/boot/crtsavres.S +0 -0
index 085fb2b9a8b89..a710a49a5dbca 100644
@@ -26,9 +26,8 @@
  * General Public License for more details.

arch/powerpc/boot/crtsavres.S line 33

Quoted 10 lines
arch/powerpc/boot/crtsavres.S +2 -3
  *
  * 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

#2 lore raw
Quoted 35 lines · Greg Kroah-Hartman
Quoted 34 lines · Thomas Huth

From: Thomas Huth <[email protected]>

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)

---
v2: Resend with CC: [email protected] as suggested here:

      https://lore.kernel.org/linuxppc-dev/[email protected]
  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(-)
arch/powerpc/boot/crtsavres.S +1 -3
index 085fb2b9a8b89..a710a49a5dbca 100644
@@ -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
Quoted 8 lines

arch/powerpc/boot/crtsavres.S line 33

Quoted 4 lines
arch/powerpc/boot/crtsavres.S +1 -0
+ * <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

#3 lore raw
Quoted 44 lines · Thomas Huth
Quoted 34 lines · Greg Kroah-Hartman
Quoted 33 lines · Thomas Huth

From: Thomas Huth <[email protected]>

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)

---
v2: Resend with CC: [email protected] as suggested here:

      https://lore.kernel.org/linuxppc-dev/[email protected]
  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(-)
arch/powerpc/boot/crtsavres.S +1 -3
index 085fb2b9a8b89..a710a49a5dbca 100644
@@ -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
Quoted 8 lines

arch/powerpc/boot/crtsavres.S line 33

Quoted 4 lines
arch/powerpc/boot/crtsavres.S +1 -0
+ * <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.

Quoted 2 lines

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

#4 lore raw
Quoted 2 lines · Greg Kroah-Hartman

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.

#5 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 2 lines · Greg Kroah-Hartman

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

#6 lore raw
Quoted 10 lines · Greg Kroah-Hartman
Quoted 7 lines · Christoph Hellwig
Quoted 2 lines · Greg Kroah-Hartman

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.

Quoted 5 lines

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

#7 lore raw
Quoted 38 lines · Richard Fontana
Quoted 10 lines · Greg Kroah-Hartman
Quoted 7 lines · Christoph Hellwig
Quoted 2 lines · Greg Kroah-Hartman

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.

Quoted 5 lines

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.
Quoted 3 lines

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

#14 lore raw
In reply to Christoph Hellwig
Quoted 7 lines · Christoph Hellwig
Quoted 2 lines · Greg Kroah-Hartman

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

#8 lore raw
In reply to Segher Boessenkool
Quoted 11 lines · Segher Boessenkool
Quoted 8 lines · Richard Fontana

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.
Quoted 7 lines
Quoted 3 lines

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

#9 lore raw
Quoted 12 lines · Richard Fontana
Quoted 12 lines
Quoted 11 lines

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

Quoted 7 lines
Quoted 3 lines

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

#10 lore raw
Quoted 40 lines · Maciej W. Rozycki
Quoted 12 lines · Richard Fontana
Quoted 12 lines
Quoted 11 lines

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

Quoted 7 lines
Quoted 3 lines

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:

Quoted 8 lines

'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

#13 lore raw
In reply to Maciej W. Rozycki
Quoted 8 lines · Maciej W. Rozycki

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

Quoted 5 lines

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 <[email protected]>
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.

arch/sh/Makefile +3 -0
index 5c8776482530..eae83b76f17c 100644
@@ -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 \
arch/sh/lib/Makefile +0 -5
index eb473d373ca4..2acb2d8c0366 100644
@@ -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

#11 lore raw
In reply to Richard Fontana

Thanks, Richard.

I've opened an issue for the SPDX License List https://github.com/spdx/license-list-XML/issues/2785 and if no one else reacts faster, I plan to submit a PR to implement this next week.

-- zvr --
________________________________
From: Richard Fontana <[email protected]>
Sent: Sunday, July 13, 2025 16:27
To: Maciej W. Rozycki <[email protected]>
Cc: Segher Boessenkool <[email protected]>; Greg Kroah-Hartman <[email protected]>; Christoph Hellwig <[email protected]>; Thomas Huth <[email protected]>; Madhavan Srinivasan <[email protected]>; Michael Ellerman <[email protected]>; Thomas Gleixner <[email protected]>; Nicholas Piggin <[email protected]>; Christophe Leroy <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; J Lovejoy <[email protected]>
Subject: Re: [PATCH v2] powerpc: Replace the obsolete address of the FSF

Quoted 40 lines · Maciej W. Rozycki
Quoted 12 lines · Richard Fontana
Quoted 12 lines
Quoted 11 lines

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

Quoted 7 lines
Quoted 3 lines

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:

Quoted 8 lines

'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

#12 lore raw
In reply to Richard Fontana

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 <[email protected]>
Sent: Sunday, July 13, 2025 15:27
To: Maciej W. Rozycki <[email protected]>
Cc: Segher Boessenkool <[email protected]>; Greg Kroah-Hartman <[email protected]>; Christoph Hellwig <[email protected]>; Thomas Huth <[email protected]>; Madhavan Srinivasan <[email protected]>; Michael Ellerman <[email protected]>; Thomas Gleixner <[email protected]>; Nicholas Piggin <[email protected]>; Christophe Leroy <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; J Lovejoy <[email protected]> Subject: Re: [PATCH v2] powerpc: Replace the obsolete address of the FSF

Quoted 88 lines · Maciej W. Rozycki
Quoted 32 lines · Richard Fontana
Quoted 24 lines
Quoted 16 lines

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.

Quoted 5 lines

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

Quoted 5 lines

https://spdx.org/licenses/GNU-compiler-exception.html

is exactly this.

Quoted 5 lines

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

Quoted 7 lines

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