blob: 49f55930df2d084135a317b04b311827fa3a76e0 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 0f7f9e3bb1d0e1b93f3ad8a1d5d7bdd3fbf27494 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Thu, 27 Mar 2014 07:20:33 +0000
4Subject: [PATCH] Makefile.am: use objcopy from the env
5
6It uses the "objcopy" directly, which is not suitable for cross compile.
7
8Upstream-Status: Pending
9
10Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11---
12 Makefile.am | 4 +++-
13 1 file changed, 3 insertions(+), 1 deletion(-)
14
15Index: git/Makefile.am
16===================================================================
17--- git.orig/Makefile.am
18+++ git/Makefile.am
19@@ -19,6 +19,8 @@
20 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
21 AM_MAKEFLAGS = --no-print-directory
22
23+OBJCOPY ?= objcopy
24+
25 gummibootlibdir = $(prefix)/lib/gummiboot
26
27 AM_CPPFLAGS = -include config.h
28@@ -148,7 +150,7 @@ $(gummiboot_solib): $(gummiboot_objects)
29 .DELETE_ON_ERROR: $(gummboot_solib)
30
31 $(gummiboot): $(gummiboot_solib)
32- $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
33+ $(AM_V_GEN) $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
34 -j .dynsym -j .rel -j .rela -j .reloc \
35 --target=efi-app-$(ARCH) $< $@
36
37@@ -183,7 +185,7 @@ $(stub_solib): $(stub_objects)
38 .DELETE_ON_ERROR: $(gummboot_solib)
39
40 $(stub): $(stub_solib)
41- $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
42+ $(AM_V_GEN) $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
43 -j .dynsym -j .rel -j .rela -j .reloc \
44 --target=efi-app-$(ARCH) $< $@
45