diff options
Diffstat (limited to 'meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch')
-rw-r--r-- | meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch b/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch deleted file mode 100644 index a162eb7d15..0000000000 --- a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 14 Jul 2012 14:14:07 -0700 | ||
4 | Subject: [PATCH] mkelfimage: Fix cross build | ||
5 | |||
6 | Make the tool to be cross compilable, by separating the variables for build | ||
7 | tools from those for the target. Also modified to obey LDFLAGS. | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | --- | ||
15 | Makefile.conf.in | 3 +++ | ||
16 | configure.ac | 7 +++++-- | ||
17 | linux-i386/Makefile | 2 +- | ||
18 | linux-ia64/Makefile | 2 +- | ||
19 | main/Makefile | 4 ++-- | ||
20 | 5 files changed, 12 insertions(+), 6 deletions(-) | ||
21 | |||
22 | diff --git a/Makefile.conf.in b/Makefile.conf.in | ||
23 | index 4645e44..dcb6cf2 100644 | ||
24 | --- a/Makefile.conf.in | ||
25 | +++ b/Makefile.conf.in | ||
26 | @@ -17,6 +17,9 @@ DEFS=@DEFS@ | ||
27 | LIBS=@LIBS@ | ||
28 | HOST_CC=@HOST_CC@ | ||
29 | HOST_CFLAGS=@HOST_CFLAGS@ $(DEFS) | ||
30 | +CC=@CC@ | ||
31 | +CFLAGS=@CFLAGS@ $(DEFS) | ||
32 | +LDFLAGS=@LDFLAGS@ | ||
33 | |||
34 | I386_CC =@I386_CC@ | ||
35 | I386_LD =@I386_LD@ | ||
36 | diff --git a/configure.ac b/configure.ac | ||
37 | index 652b952..0f2ac72 100644 | ||
38 | --- a/configure.ac | ||
39 | +++ b/configure.ac | ||
40 | @@ -70,6 +70,9 @@ if test "with_default" != no ; then | ||
41 | AC_MSG_ERROR([cc not found]) | ||
42 | fi | ||
43 | eval "${with_default}_CC='$CC'" | ||
44 | + if test "x$HOST_CC" = 'x'; then | ||
45 | + AC_CHECK_PROG([HOST_CC], [$CC], [$CC], [gcc], [$PATH]) | ||
46 | + fi | ||
47 | AC_PROG_CPP | ||
48 | if test "$CPP" = no; then | ||
49 | AC_MSG_ERROR([cpp not found]) | ||
50 | @@ -172,8 +175,8 @@ fi | ||
51 | |||
52 | dnl ---Output variables... | ||
53 | |||
54 | -HOST_CC=$CC | ||
55 | -HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)" | ||
56 | +CFLAGS="${CFLAGS:--O2} -Wall \$(CPPFLAGS)" | ||
57 | +HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS)" | ||
58 | |||
59 | dnl TODO: figure out how to set these appropriately for compilers other than gcc | ||
60 | I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)" | ||
61 | diff --git a/linux-i386/Makefile b/linux-i386/Makefile | ||
62 | index 51531d6..7e8aa3c 100644 | ||
63 | --- a/linux-i386/Makefile | ||
64 | +++ b/linux-i386/Makefile | ||
65 | @@ -4,7 +4,7 @@ LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile | ||
66 | |||
67 | $(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP) | ||
68 | $(MKDIR) -p $(@D) | ||
69 | - $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@ | ||
70 | + $(CC) $(CFLAGS) -c -g $< -o $@ | ||
71 | |||
72 | |||
73 | ifdef I386_CC | ||
74 | diff --git a/linux-ia64/Makefile b/linux-ia64/Makefile | ||
75 | index 38f5d8c..5df8870 100644 | ||
76 | --- a/linux-ia64/Makefile | ||
77 | +++ b/linux-ia64/Makefile | ||
78 | @@ -4,7 +4,7 @@ LIA64_DEP=Makefile Makefile.conf $(LIA64_DIR)/Makefile | ||
79 | |||
80 | $(LIA64_OBJ)/mkelf-linux-ia64.o: $(LIA64_DIR)/mkelf-linux-ia64.c $(LIA64_DIR)/convert.bin.c $(LIA64_DEP) | ||
81 | $(MKDIR) -p $(@D) | ||
82 | - $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@ | ||
83 | + $(CC) $(CFLAGS) -c -g $< -o $@ | ||
84 | |||
85 | ifdef IA64_CC | ||
86 | |||
87 | diff --git a/main/Makefile b/main/Makefile | ||
88 | index 403b0a4..cd53613 100644 | ||
89 | --- a/main/Makefile | ||
90 | +++ b/main/Makefile | ||
91 | @@ -4,11 +4,11 @@ MKELF_OBJS=$(OBJDIR)/main/mkelfImage.o \ | ||
92 | |||
93 | $(OBJDIR)/sbin/mkelfImage: $(MKELF_OBJS) $(DEPS) | ||
94 | $(MKDIR) -p $(@D) | ||
95 | - $(HOST_CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS) | ||
96 | + $(CC) $(CFLAGS) $(LDFLAGS) $(MKELF_OBJS) -o $@ $(LIBS) | ||
97 | |||
98 | $(OBJDIR)/main/mkelfImage.o: main/mkelfImage.c include/mkelfImage.h $(DEPS) | ||
99 | $(MKDIR) -p $(@D) | ||
100 | - $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@ | ||
101 | + $(CC) $(CFLAGS) -c $< -o $@ | ||
102 | |||
103 | $(OBJDIR)/man/man8/mkelfImage.8: main/mkelfImage.man | ||
104 | $(MKDIR) -p $(@D) | ||
105 | -- | ||
106 | 2.8.0 | ||