Skip to content

Commit 54a1165

Browse files
masahir0ympe
authored andcommitted
powerpc: remove checks for binutils older than 2.25
Commit e441273 ("Documentation: raise minimum supported version of binutils to 2.25") allows us to remove the checks for old binutils. There is no more user for ld-ifversion. Remove it as well. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicholas Piggin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent 25ea739 commit 54a1165

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

arch/powerpc/Makefile

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,13 @@ machine-$(CONFIG_PPC64) += 64
4242
machine-$(CONFIG_CPU_LITTLE_ENDIAN) += le
4343
UTS_MACHINE := $(subst $(space),,$(machine-y))
4444

45-
# XXX This needs to be before we override LD below
46-
ifdef CONFIG_PPC32
47-
KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
48-
else
49-
ifeq ($(call ld-ifversion, -ge, 22500, y),y)
45+
ifeq ($(CONFIG_PPC64)$(CONFIG_LD_IS_BFD),yy)
5046
# Have the linker provide sfpr if possible.
5147
# There is a corresponding test in arch/powerpc/lib/Makefile
5248
KBUILD_LDFLAGS_MODULE += --save-restore-funcs
5349
else
5450
KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
5551
endif
56-
endif
5752

5853
ifdef CONFIG_CPU_LITTLE_ENDIAN
5954
KBUILD_CFLAGS += -mlittle-endian
@@ -398,17 +393,7 @@ endif
398393
endif
399394

400395
PHONY += checkbin
401-
# Check toolchain versions:
402-
# - gcc-4.6 is the minimum kernel-wide version so nothing required.
403396
checkbin:
404-
@if test "x${CONFIG_LD_IS_LLD}" != "xy" -a \
405-
"x$(call ld-ifversion, -le, 22400, y)" = "xy" ; then \
406-
echo -n '*** binutils 2.24 miscompiles weak symbols ' ; \
407-
echo 'in some circumstances.' ; \
408-
echo '*** binutils 2.23 do not define the TOC symbol ' ; \
409-
echo -n '*** Please use a different binutils version.' ; \
410-
false ; \
411-
fi
412397
@if test "x${CONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT}" = "xy" -a \
413398
"x${CONFIG_LD_IS_BFD}" = "xy" -a \
414399
"${CONFIG_LD_VERSION}" = "23700" ; then \

arch/powerpc/lib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
4444
# 64-bit linker creates .sfpr on demand for final link (vmlinux),
4545
# so it is only needed for modules, and only for older linkers which
4646
# do not support --save-restore-funcs
47-
ifeq ($(call ld-ifversion, -lt, 22500, y),y)
47+
ifndef CONFIG_LD_IS_BFD
4848
extra-$(CONFIG_PPC64) += crtsavres.o
4949
endif
5050

scripts/Makefile.compiler

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,3 @@ clang-min-version = $(call test-ge, $(CONFIG_CLANG_VERSION), $1)
7272
# ld-option
7373
# Usage: KBUILD_LDFLAGS += $(call ld-option, -X, -Y)
7474
ld-option = $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2),$(3))
75-
76-
# ld-ifversion
77-
# Usage: $(call ld-ifversion, -ge, 22252, y)
78-
ld-ifversion = $(shell [ $(CONFIG_LD_VERSION)0 $(1) $(2)0 ] && echo $(3) || echo $(4))

0 commit comments

Comments
 (0)