aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/mkelfimage
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2012-12-07 13:58:34 +0800
committerSaul Wold <sgw@linux.intel.com>2012-12-14 15:17:18 -0800
commit4d0b2ca464cec9588178100b601eda96faec0ad7 (patch)
treed2f70b8daa0214d8688872478460375a2271579c /meta/recipes-devtools/mkelfimage
parentad79360c1d992830d4f0e06a3bbf0622658c0540 (diff)
downloadopenembedded-core-4d0b2ca464cec9588178100b601eda96faec0ad7.tar.gz
mkelfimage-native:make failed if libz not in host
mkelfimage-native finds libz from host dir, not from the staging directories. Modify confiugre.ac to let makefile find libz and zlib.h by CFLAGS and LDFLAGS. [YOCTO #3547] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/mkelfimage')
-rw-r--r--meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch30
-rw-r--r--meta/recipes-devtools/mkelfimage/mkelfimage_svn.bb3
2 files changed, 32 insertions, 1 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 0000000000..756a65cd92
--- /dev/null
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
@@ -0,0 +1,30 @@
+Let makefile find libz and zlib.h by CFLAGS and LDFLAGS.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Upstream-Status: Pending
+---
+diff --git a/configure.ac b/configure.ac
+index d1acc36..6f865b0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -62,7 +62,7 @@ AC_CHECK_PROG([RPM], rpm, rpm, [], [$PATH])
+ AC_CHECK_PROG([SED], sed, sed, [], [$PATH])
+ AC_CHECK_PROG([FIND], find, find, [], [$PATH])
+
+-AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS -lz"]))
++AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS $LDFLAGS -lz"]))
+
+ dnl Find the default programs
+ if test "with_default" != no ; then
+@@ -175,7 +175,7 @@ fi
+
+ dnl ---Output variables...
+
+-HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
++HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS) $CFLAGS"
+
+ dnl TODO: figure out how to set these appropriately for compilers other than gcc
+ I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_svn.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_svn.bb
index ca145ffc8e..b53f7a7b31 100644
--- a/meta/recipes-devtools/mkelfimage/mkelfimage_svn.bb
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage_svn.bb
@@ -6,12 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a"
SRCREV = "6637"
PV = "1.0.0+svn${SRCPV}"
-PR = "r1"
+PR = "r2"
DEPENDS += "zlib"
SRC_URI = "svn://coreboot.org/coreboot/trunk/util;module=mkelfImage;protocol=svn \
file://cross-compile.patch \
+ file://fix-makefile-to-find-libz.patch \
"
S = "${WORKDIR}/mkelfImage"