]> code.ossystems Code Review - openembedded-core.git/commitdiff
sudo: Compile mksigname and mksiglist for build host
authorKhem Raj <raj.khem@gmail.com>
Sun, 10 Mar 2013 22:05:18 +0000 (15:05 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 23 Mar 2013 11:44:09 +0000 (11:44 +0000)
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 <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/sudo/sudo.inc

index 7721cd57a15fb6a97f4bff120d26d195fb875711..9427b570a8f6dcdfa3b5abc2f098cc7a52e4952c 100644 (file)
@@ -21,6 +21,11 @@ do_configure_prepend () {
        fi
 }
 
+# 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