diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2012-12-07 13:58:34 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-17 17:24:50 +0000 |
| commit | b70784ce581de8c0bf38227106e7313bb485c3d3 (patch) | |
| tree | bcc7d957d58cd7871b02c629510272f2b5c1afd1 | |
| parent | 958162e96b4a4f23bca94500b5f20975633dd5c6 (diff) | |
| download | poky-b70784ce581de8c0bf38227106e7313bb485c3d3.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]
(From OE-Core rev: 4d0b2ca464cec9588178100b601eda96faec0ad7)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch | 30 | ||||
| -rw-r--r-- | meta/recipes-devtools/mkelfimage/mkelfimage_svn.bb | 3 |
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 @@ | |||
| 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 | |||
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" | |||
| 6 | 6 | ||
| 7 | SRCREV = "6637" | 7 | SRCREV = "6637" |
| 8 | PV = "1.0.0+svn${SRCPV}" | 8 | PV = "1.0.0+svn${SRCPV}" |
| 9 | PR = "r1" | 9 | PR = "r2" |
| 10 | 10 | ||
| 11 | DEPENDS += "zlib" | 11 | DEPENDS += "zlib" |
| 12 | 12 | ||
| 13 | SRC_URI = "svn://coreboot.org/coreboot/trunk/util;module=mkelfImage;protocol=svn \ | 13 | SRC_URI = "svn://coreboot.org/coreboot/trunk/util;module=mkelfImage;protocol=svn \ |
| 14 | file://cross-compile.patch \ | 14 | file://cross-compile.patch \ |
| 15 | file://fix-makefile-to-find-libz.patch \ | ||
| 15 | " | 16 | " |
| 16 | 17 | ||
| 17 | S = "${WORKDIR}/mkelfImage" | 18 | S = "${WORKDIR}/mkelfImage" |
