Skip to content

Commit c330b50

Browse files
rnavmpe
authored andcommitted
powerpc/Makefile: Remove bits related to the previous use of -mcmodel=large
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. Reviewed-by: Christophe Leroy <[email protected]> Signed-off-by: Naveen N Rao <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent 2d8ebee commit c330b50

File tree

9 files changed

+1
-21
lines changed

9 files changed

+1
-21
lines changed

arch/powerpc/Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y)
114114

115115
ifdef CONFIG_PPC64
116116
ifndef CONFIG_PPC_KERNEL_PCREL
117-
ifeq ($(call cc-option-yn,-mcmodel=medium),y)
118117
# -mcmodel=medium breaks modules because it uses 32bit offsets from
119118
# the TOC pointer to create pointers where possible. Pointers into the
120119
# percpu data area are created by this method.
@@ -124,9 +123,6 @@ ifeq ($(call cc-option-yn,-mcmodel=medium),y)
124123
# kernel percpu data space (starting with 0xc...). We need a full
125124
# 64bit relocation for this to work, hence -mcmodel=large.
126125
KBUILD_CFLAGS_MODULE += -mcmodel=large
127-
else
128-
export NO_MINIMAL_TOC := -mno-minimal-toc
129-
endif
130126
endif
131127
endif
132128

@@ -139,7 +135,7 @@ CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
139135
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc)
140136
endif
141137
endif
142-
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc))
138+
CFLAGS-$(CONFIG_PPC64) += -mcmodel=medium
143139
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
144140
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mlong-double-128)
145141

arch/powerpc/kernel/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# Makefile for the linux kernel.
44
#
55

6-
ifdef CONFIG_PPC64
7-
CFLAGS_prom_init.o += $(NO_MINIMAL_TOC)
8-
endif
96
ifdef CONFIG_PPC32
107
CFLAGS_prom_init.o += -fPIC
118
CFLAGS_btext.o += -fPIC

arch/powerpc/lib/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# Makefile for ppc-specific library files..
44
#
55

6-
ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
7-
86
CFLAGS_code-patching.o += -fno-stack-protector
97
CFLAGS_feature-fixups.o += -fno-stack-protector
108

arch/powerpc/mm/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# Makefile for the linux ppc-specific parts of the memory manager.
44
#
55

6-
ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
7-
86
obj-y := fault.o mem.o pgtable.o maccess.o pageattr.o \
97
init_$(BITS).o pgtable_$(BITS).o \
108
pgtable-frag.o ioremap.o ioremap_$(BITS).o \

arch/powerpc/mm/book3s64/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3-
ccflags-y := $(NO_MINIMAL_TOC)
4-
53
obj-y += mmu_context.o pgtable.o trace.o
64
ifdef CONFIG_PPC_64S_HASH_MMU
75
CFLAGS_REMOVE_slb.o = $(CC_FLAGS_FTRACE)

arch/powerpc/mm/nohash/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3-
ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
4-
53
obj-y += mmu_context.o tlb.o tlb_low.o kup.o
64
obj-$(CONFIG_PPC_BOOK3E_64) += tlb_low_64e.o book3e_pgtable.o
75
obj-$(CONFIG_40x) += 40x.o

arch/powerpc/platforms/pseries/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
32
ccflags-$(CONFIG_PPC_PSERIES_DEBUG) += -DDEBUG
43

54
obj-y := lpar.o hvCall.o nvram.o reconfig.o \

arch/powerpc/sysdev/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3-
ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
4-
53
mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o
64
obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-obj-y)
75
obj-$(CONFIG_MPIC_TIMER) += mpic_timer.o

arch/powerpc/xmon/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ KCSAN_SANITIZE := n
1010
# Disable ftrace for the entire directory
1111
ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE)
1212

13-
ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
14-
1513
# Clang stores addresses on the stack causing the frame size to blow
1614
# out. See https://github.com/ClangBuiltLinux/linux/issues/252
1715
ccflags-$(CONFIG_CC_IS_CLANG) += -Wframe-larger-than=4096

0 commit comments

Comments
 (0)