sudo: Compile mksigname and mksiglist for build host

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

(From OE-Core rev: 2ce5b1364ef6eb276352f7170d23dc3492c779f6)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj 2013-03-10 15:05:18 -07:00 committed by Richard Purdie
parent 619e1df31d
commit c2fd9a1e0f
1 changed files with 5 additions and 0 deletions

View 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