summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch')
-rw-r--r--meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch30
1 files changed, 30 insertions, 0 deletions
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 0000000..756a65c
--- /dev/null
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
@@ -0,0 +1,30 @@
1Let makefile find libz and zlib.h by CFLAGS and LDFLAGS.
2
3Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
4Upstream-Status: Pending
5---
6diff --git a/configure.ac b/configure.ac
7index 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--
291.7.10.4
30