OSDN Git Service

android: use ld.bfd instead of ld.gold kernel-4.4
authorChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 25 May 2017 09:16:50 +0000 (17:16 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 7 Dec 2018 06:25:32 +0000 (14:25 +0800)
We build the kernel with android toolchain. But kernel needs
ld.bfd to be linked correctly.

Makefile

index 714bfb4..cd182d7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -345,7 +345,7 @@ include scripts/Kbuild.include
 
 # Make variables (CC, etc...)
 AS             = $(CROSS_COMPILE)as
-LD             = $(CROSS_COMPILE)ld
+LD             = $(CROSS_COMPILE)ld$(if $(wildcard $(lastword $(CROSS_COMPILE))ld.bfd),.bfd)
 CC             = $(CROSS_COMPILE)gcc
 CPP            = $(CC) -E
 AR             = $(CROSS_COMPILE)ar