sudo: Compile mksigname and mksiglist for build host

Submitted by Khem Raj on March 10, 2013, 10:05 p.m.


Message ID
State Accepted
Commit 2ce5b1364ef6eb276352f7170d23dc3492c779f6
Headers show

Commit Message

Khem Raj March 10, 2013, 10:05 p.m.
cross compiling sudo doesnt work well since it uses
mksigname and mksiglist to generate C sources which
are then used in sudo build itself. With this patch
now we make sure those hosttools are compiled for
build machine. It fixes the build failures like

./mksigname > signame.c
/bin/sh: ./mksigname: cannot execute binary file
make[1]: *** [signame.c] Error 126

Signed-off-by: Khem Raj <>
 meta/recipes-extended/sudo/ |    5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-extended/sudo/ b/meta/recipes-extended/sudo/
index babea37..b8796e4 100644
--- a/meta/recipes-extended/sudo/
+++ b/meta/recipes-extended/sudo/
@@ -21,6 +21,11 @@  do_configure_prepend () {
+# mksigname/mksiglist are used on build host to generate source files
+do_compile_prepend () {
+	oe_runmake CC=$BUILD_CC CPPFLAGS="$BUILD_CPPFLAGS -I../include -I../"  -C compat mksigname mksiglist
 # Explicitly create ${localstatedir}/lib before do_install to ensure
 # the directory is accessible by all users. Otherwise the mkinstalldirs
 # script (from sudo) will recursively create ${localstatedir}/lib/sudo