diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-devtools/mkelfimage/mkelfimage | |
download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-devtools/mkelfimage/mkelfimage')
-rw-r--r-- | meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch | 71 | ||||
-rw-r--r-- | meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch | 30 |
2 files changed, 101 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) | ||
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch b/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch new file mode 100644 index 0000000000..756a65cd92 --- /dev/null +++ b/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Let makefile find libz and zlib.h by CFLAGS and LDFLAGS. | ||
2 | |||
3 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
4 | Upstream-Status: Pending | ||
5 | --- | ||
6 | diff --git a/configure.ac b/configure.ac | ||
7 | index d1acc36..6f865b0 100644 | ||
8 | --- a/configure.ac | ||
9 | +++ b/configure.ac | ||
10 | @@ -62,7 +62,7 @@ AC_CHECK_PROG([RPM], rpm, rpm, [], [$PATH]) | ||
11 | AC_CHECK_PROG([SED], sed, sed, [], [$PATH]) | ||
12 | AC_CHECK_PROG([FIND], find, find, [], [$PATH]) | ||
13 | |||
14 | -AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS -lz"])) | ||
15 | +AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS $LDFLAGS -lz"])) | ||
16 | |||
17 | dnl Find the default programs | ||
18 | if test "with_default" != no ; then | ||
19 | @@ -175,7 +175,7 @@ fi | ||
20 | |||
21 | dnl ---Output variables... | ||
22 | |||
23 | -HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)" | ||
24 | +HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS) $CFLAGS" | ||
25 | |||
26 | dnl TODO: figure out how to set these appropriately for compilers other than gcc | ||
27 | I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)" | ||
28 | -- | ||
29 | 1.7.10.4 | ||
30 | |||