kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Richard Fontana <rfontana@redhat.com>,
	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, linux-kernel@vger.kernel.org,
	kvm@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
Date: Sun, 13 Jul 2025 09:01:14 -0500	[thread overview]
Message-ID: <aHO8KoFHQVoCK96W@gate> (raw)
In-Reply-To: <alpine.DEB.2.21.2507122332310.45111@angie.orcam.me.uk>

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

  parent reply	other threads:[~2025-07-13 14:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11  5:35 [PATCH v2] powerpc: Replace the obsolete address of the FSF Thomas Huth
2025-07-11  5:52 ` Greg Kroah-Hartman
2025-07-11  7:09   ` Thomas Huth
2025-07-11  7:30     ` Greg Kroah-Hartman
2025-07-11  7:32       ` Christoph Hellwig
2025-07-11  7:38         ` Greg Kroah-Hartman
2025-07-11 21:02           ` Richard Fontana
2025-07-11 23:13             ` Segher Boessenkool
2025-07-11 23:25               ` Richard Fontana
2025-07-12 22:48                 ` Maciej W. Rozycki
2025-07-13 13:27                   ` Richard Fontana
2025-07-25  8:44                     ` Zavras, Alexios
2025-07-13 14:01                   ` Segher Boessenkool [this message]
2025-07-11 23:19         ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aHO8KoFHQVoCK96W@gate \
    --to=segher@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spdx@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=macro@orcam.me.uk \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=opensource@jilayne.com \
    --cc=rfontana@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).