[OE-core] [RFC PATCH] grub-efi: Do not use help2man

Richard Purdie richard.purdie at linuxfoundation.org
Mon Jul 2 20:31:07 UTC 2012


On Mon, 2012-07-02 at 13:09 -0700, Darren Hart wrote:
> Fixes [YOCTO #2527]
> 
> Modify configure.ac and the generated configure script to avoid using
> help2man during the compilation process. For grub-efi we are only
> deploying the EFI payload and are not installing grub on the target
> root filesystem. Therefor, we do not need the man pages.
> 
> Signed-off-by: Darren Hart <dvhart at linux.intel.com>
> CC: Paul Eggleton <paul.eggleton at linux.intel.com>
> CC: Radu Moisan <radu.moisan at intel.com>
> ---
>  .../grub/files/grub-1.99-disable-help2man.patch    |  231 ++++++++++++++++++++
>  meta/recipes-bsp/grub/grub-efi-native_1.99.bb      |    3 +-
>  2 files changed, 233 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-bsp/grub/files/grub-1.99-disable-help2man.patch
> 
> diff --git a/meta/recipes-bsp/grub/files/grub-1.99-disable-help2man.patch b/meta/recipes-bsp/grub/files/grub-1.99-disable-help2man.patch
> new file mode 100644
> index 0000000..b007cae
> --- /dev/null
> +++ b/meta/recipes-bsp/grub/files/grub-1.99-disable-help2man.patch
> @@ -0,0 +1,231 @@
> +Upstream-Status: Inappropriate (Bitbake build environment)
> +
> +We do not need the man pages when building just the EFI payload for the target,
> +all the tools are built for the host. This does not trigger GRUB's built-in
> +cross-compilation check, so force it. After the change to configure.ac,
> +autogen.sh was run in devshell and the resulting configure was used to generate
> +the configure diff. The configure diff was included to avoid having to add
> +autogen.sh to a do_configure_prepend() routine which would slow down the build
> +unnecessarily.
> +   
> +Signed-off-by: Darren Hart <dvhart at linux.intel.com>
> +
> +Index: grub-1.99/configure.ac
> +===================================================================
> +--- grub-1.99.orig/configure.ac
> ++++ grub-1.99/configure.ac
> +@@ -275,11 +275,12 @@ if test x$grub_cv_apple_cc = xyes ; then
> +   HOST_CFLAGS="$HOST_CFLAGS -fnested-functions"
> + fi
> + 
> +-if test "x$cross_compiling" = xyes; then
> +-  AC_MSG_WARN([cannot generate manual pages while cross compiling])
> +-else
> +-  AC_PATH_PROG(HELP2MAN, help2man)
> +-fi
> ++# Force behaving as though we are cross-compiling with respect to HELP2MAN
> ++#if test "x$cross_compiling" = xyes; then
> ++AC_MSG_WARN([cannot generate manual pages while cross compiling])
> ++#else
> ++#  AC_PATH_PROG(HELP2MAN, help2man)
> ++#fi
> + 
> + # Check for functions and headers.
> + AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf getextmntent)
> +Index: grub-1.99/configure
> +===================================================================
> +--- grub-1.99.orig/configure
> ++++ grub-1.99/configure

Isn't configure regenerated so we don't need this second bit patching
configure, just configure.ac?

Cheers,

Richard





More information about the Openembedded-core mailing list