瀏覽代碼

powerpc: Reject binutils 2.24 when building little endian

There is a bug in binutils 2.24 which causes miscompilation if we're
building little endian and using weak symbols (which the kernel does).

It is fixed in binutils commit 57fa7b8c7e59 "Correct elf_merge_st_other
arguments for weak symbols", which is in binutils 2.25 and has been
backported to the binutils 2.24 branch and has been picked up by most
distros it seems.

However if we're running stock 2.24 (no extra version) then the bug is
present, so check for that and bail.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Michael Ellerman 10 年之前
父節點
當前提交
60e065f70b
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      arch/powerpc/Makefile

+ 8 - 0
arch/powerpc/Makefile

@@ -339,6 +339,14 @@ checkbin:
 		echo 'disable kernel modules' ; \
 		echo 'disable kernel modules' ; \
 		false ; \
 		false ; \
 	fi
 	fi
+	@if test "x${CONFIG_CPU_LITTLE_ENDIAN}" = "xy" \
+	    && $(LD) --version | head -1 | grep ' 2\.24$$' >/dev/null ; then \
+		echo -n '*** binutils 2.24 miscompiles weak symbols ' ; \
+		echo 'in some circumstances.' ; \
+		echo -n '*** Please use a different binutils version.' ; \
+		false ; \
+	fi
+
 
 
 CLEAN_FILES += $(TOUT)
 CLEAN_FILES += $(TOUT)