From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Naveen N Rao <naveen@kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] powerpc/Makefile: Remove bits related to the previous use of -mcmodel=large
Date: Tue, 9 Jan 2024 15:15:35 +0000 [thread overview]
Message-ID: <47691590-3698-4dea-b093-6619796fa9ea@csgroup.eu> (raw)
In-Reply-To: <20240109133420.3048719-1-naveen@kernel.org>
Le 09/01/2024 à 14:34, Naveen N Rao a écrit :
> All supported compilers today (gcc v5.1+ and clang v11+) have support for
> -mcmodel=medium. As such, NO_MINIMAL_TOC is no longer being set. Remove
> NO_MINIMAL_TOC as well as the fallback to -mminimal-toc.
>
> Signed-off-by: Naveen N Rao <naveen@kernel.org>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Small comment below,
> ---
> arch/powerpc/Makefile | 6 +-----
> arch/powerpc/kernel/Makefile | 3 ---
> arch/powerpc/lib/Makefile | 2 --
> arch/powerpc/mm/Makefile | 2 --
> arch/powerpc/mm/book3s64/Makefile | 2 --
> arch/powerpc/mm/nohash/Makefile | 2 --
> arch/powerpc/platforms/pseries/Makefile | 1 -
> arch/powerpc/sysdev/Makefile | 2 --
> arch/powerpc/xmon/Makefile | 2 --
> 9 files changed, 1 insertion(+), 21 deletions(-)
>
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 051247027da0..a0eb0fb1aba8 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -114,7 +114,6 @@ LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y)
>
> ifdef CONFIG_PPC64
> ifndef CONFIG_PPC_KERNEL_PCREL
> -ifeq ($(call cc-option-yn,-mcmodel=medium),y)
> # -mcmodel=medium breaks modules because it uses 32bit offsets from
> # the TOC pointer to create pointers where possible. Pointers into the
> # percpu data area are created by this method.
> @@ -124,9 +123,6 @@ ifeq ($(call cc-option-yn,-mcmodel=medium),y)
> # kernel percpu data space (starting with 0xc...). We need a full
> # 64bit relocation for this to work, hence -mcmodel=large.
> KBUILD_CFLAGS_MODULE += -mcmodel=large
> -else
> - export NO_MINIMAL_TOC := -mno-minimal-toc
> -endif
> endif
> endif
>
> @@ -139,7 +135,7 @@ CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
> CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc)
> endif
> endif
> -CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc))
> +CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium)
Should we still use $(call cc-option here ?
As we only deal with medium model now, shouldn't we make it such that it
fails in case the compiler doesn't support -mcmodel=medium ?
> CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
> CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mlong-double-128)
>
next prev parent reply other threads:[~2024-01-09 15:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 13:34 [PATCH] powerpc/Makefile: Remove bits related to the previous use of -mcmodel=large Naveen N Rao
2024-01-09 15:15 ` Christophe Leroy [this message]
2024-01-09 18:39 ` Segher Boessenkool
2024-01-10 13:49 ` Naveen N Rao
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=47691590-3698-4dea-b093-6619796fa9ea@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=naveen@kernel.org \
/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