[PATCH] Allow simple cross-compilation of library

Jon Loeliger jdl at jdl.com
Wed Jun 27 23:22:57 EST 2012


[ Forwarded to devicetree dev list for comment. --jdl ]


------- Forwarded Message

Subject: [PATCH] Allow simple cross-compilation of library
To: jdl at jdl.com
From: Christoffer Dall <c.dall at virtualopensystems.com>
Date: Tue, 05 Jun 2012 13:09:59 -0400
Message-ID: <20120605170959.12774.39782.stgit at ubuntu>


This is extremely useful when cross-compiling the library to be
linked with cross-compiled QEMU.

Signed-off-by: Christoffer Dall <c.dall at virtualopensystems.com>
- ---
 Makefile |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 1169e6c..efa79c1 100644
- --- a/Makefile
+++ b/Makefile
@@ -15,6 +15,10 @@ EXTRAVERSION =
 LOCAL_VERSION =
 CONFIG_LOCALVERSION =
 
+CC=${CROSS_COMPILE}gcc
+LD=${CROSS_COMPILE}ld
+AS=${CROSS_COMPILE}as
+
 CPPFLAGS = -I libfdt -I .
 WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
 	-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls


------- End of Forwarded Message



More information about the devicetree-discuss mailing list