diff options
Diffstat (limited to 'meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch')
-rw-r--r-- | meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch b/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch new file mode 100644 index 0000000000..7692709724 --- /dev/null +++ b/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch | |||
@@ -0,0 +1,71 @@ | |||
1 | make the tool to be cross compilable. | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Index: mkelfImage/configure.ac | ||
7 | =================================================================== | ||
8 | --- mkelfImage.orig/configure.ac 2012-07-14 14:04:48.964898667 -0700 | ||
9 | +++ mkelfImage/configure.ac 2012-07-14 14:10:47.800916083 -0700 | ||
10 | @@ -70,6 +70,9 @@ | ||
11 | AC_MSG_ERROR([cc not found]) | ||
12 | fi | ||
13 | eval "${with_default}_CC='$CC'" | ||
14 | + if test "x$HOST_CC" = 'x'; then | ||
15 | + AC_CHECK_PROG([HOST_CC], [$CC], [$CC], [gcc], [$PATH]) | ||
16 | + fi | ||
17 | AC_PROG_CPP | ||
18 | if test "$CPP" = no; then | ||
19 | AC_MSG_ERROR([cpp not found]) | ||
20 | @@ -172,7 +175,6 @@ | ||
21 | |||
22 | dnl ---Output variables... | ||
23 | |||
24 | -HOST_CC=$CC | ||
25 | HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)" | ||
26 | |||
27 | dnl TODO: figure out how to set these appropriately for compilers other than gcc | ||
28 | Index: mkelfImage/linux-i386/Makefile | ||
29 | =================================================================== | ||
30 | --- mkelfImage.orig/linux-i386/Makefile 2012-07-14 14:04:48.964898667 -0700 | ||
31 | +++ mkelfImage/linux-i386/Makefile 2012-07-14 14:04:49.032898671 -0700 | ||
32 | @@ -4,7 +4,7 @@ | ||
33 | |||
34 | $(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP) | ||
35 | $(MKDIR) -p $(@D) | ||
36 | - $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@ | ||
37 | + $(CC) $(HOST_CFLAGS) -c -g $< -o $@ | ||
38 | |||
39 | |||
40 | ifdef I386_CC | ||
41 | Index: mkelfImage/linux-ia64/Makefile | ||
42 | =================================================================== | ||
43 | --- mkelfImage.orig/linux-ia64/Makefile 2012-07-14 14:04:48.964898667 -0700 | ||
44 | +++ mkelfImage/linux-ia64/Makefile 2012-07-14 14:04:49.032898671 -0700 | ||
45 | @@ -4,7 +4,7 @@ | ||
46 | |||
47 | $(LIA64_OBJ)/mkelf-linux-ia64.o: $(LIA64_DIR)/mkelf-linux-ia64.c $(LIA64_DIR)/convert.bin.c $(LIA64_DEP) | ||
48 | $(MKDIR) -p $(@D) | ||
49 | - $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@ | ||
50 | + $(CC) $(HOST_CFLAGS) -c -g $< -o $@ | ||
51 | |||
52 | ifdef IA64_CC | ||
53 | |||
54 | Index: mkelfImage/main/Makefile | ||
55 | =================================================================== | ||
56 | --- mkelfImage.orig/main/Makefile 2012-07-14 14:04:48.964898667 -0700 | ||
57 | +++ mkelfImage/main/Makefile 2012-07-14 14:04:49.032898671 -0700 | ||
58 | @@ -4,11 +4,11 @@ | ||
59 | |||
60 | $(OBJDIR)/sbin/mkelfImage: $(MKELF_OBJS) $(DEPS) | ||
61 | $(MKDIR) -p $(@D) | ||
62 | - $(HOST_CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS) | ||
63 | + $(CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS) | ||
64 | |||
65 | $(OBJDIR)/main/mkelfImage.o: main/mkelfImage.c include/mkelfImage.h $(DEPS) | ||
66 | $(MKDIR) -p $(@D) | ||
67 | - $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@ | ||
68 | + $(CC) $(HOST_CFLAGS) -c $< -o $@ | ||
69 | |||
70 | $(OBJDIR)/man/man8/mkelfImage.8: main/mkelfImage.man | ||
71 | $(MKDIR) -p $(@D) | ||