Skip to contentSkip to conversation

sudo: Compile mksigname and mksiglist for build host

PATCH New Khem Raj 1 participant 1 message Mar 10, 2013

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 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

---
 meta/recipes-extended/sudo/sudo.inc |    5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-extended/sudo/sudo.inc +5 -0
index babea37..b8796e4 100644
@@ -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
Signature · 1 line
1.7.9.5