[PATCH] kexec: Teach configure to find the strip binary.

Simon Horman horms at verge.net.au
Mon Dec 3 19:09:08 EST 2012


On Mon, Dec 03, 2012 at 02:25:25PM -0800, Eric W. Biederman wrote:
> 
> For some reason my version of the Makefile generated by configure
> included the line STRIP=strp.  Rerunning configure from a fresh slate
> did not regenerate that line so I don't know how it got there.  So add
> the code to Makefile.in and configure.ac to autodetect the strip binary.
> 
> This is needed so that we can remove from purgatory all of the
> relocations to sections that are not needed at runtime, by stripping
> out those sections.
> 
> Signed-off-by: "Eric W. Biederman" <ebiederm at xmission.com>

Thanks, I removed the last hunk, which seems to be a white-space only
change to purgatory/arch/x86_64/Makefile, and applied the rest.

> ---
>  Makefile.in                    |    1 +
>  configure.ac                   |    2 ++
>  purgatory/arch/x86_64/Makefile |    2 +-
>  3 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile.in b/Makefile.in
> index ba2e638..7a50200 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -64,6 +64,7 @@ SED		= @SED@
>  FIND		= @FIND@
>  XARGS		= @XARGS@
>  DIRNAME		= @DIRNAME@
> +STRIP		= @STRIP@
>  
>  
>  pkgdatadir = $(datadir)/$(PACKAGE_NAME)
> diff --git a/configure.ac b/configure.ac
> index 401b11e..b7e4f2e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -142,6 +142,7 @@ AC_CHECK_PROG([SED],      sed,      sed,      "no", [$PATH])
>  AC_CHECK_PROG([FIND],     find,     find,     "no", [$PATH])
>  AC_CHECK_PROG([XARGS],    xargs,    xargs,    "no", [$PATH])
>  AC_CHECK_PROG([DIRNAME],  dirname,  dirname,  "no", [$PATH])
> +AC_CHECK_PROG([STRIP],    strip,    strip,    "no", [$PATH])
>  
>  dnl See if I have a usable copy of zlib available
>  if test "$with_zlib" = yes ; then
> @@ -185,6 +186,7 @@ if test "$SED"     = "no"; then AC_MSG_ERROR([ sed not found]); fi
>  if test "$FIND"    = "no"; then AC_MSG_ERROR([ find not found]); fi
>  if test "$XARGS"   = "no"; then AC_MSG_ERROR([ xargs not found]); fi
>  if test "$DIRNAME" = "no"; then AC_MSG_ERROR([ dirname not found]); fi
> +if test "$STRIP"   = "no"; then AC_MSG_ERROR([ strip not found]); fi
>  
>  dnl ---Output variables...
>  AC_SUBST([BUILD_CC])
> diff --git a/purgatory/arch/x86_64/Makefile b/purgatory/arch/x86_64/Makefile
> index 7300937..bfc7b24 100644
> --- a/purgatory/arch/x86_64/Makefile
> +++ b/purgatory/arch/x86_64/Makefile
> @@ -16,7 +16,7 @@ dist += purgatory/arch/x86_64/Makefile $(x86_64_PURGATORY_SRCS_native) 	\
>  	purgatory/arch/x86_64/purgatory-x86_64.h
>  
>  # Don't add sources in i386/ to dist, as i386/Makefile adds them
> -x86_64_PURGATORY_SRCS += purgatory/arch/i386/entry32-16.S
> +x86_64_PURGATORY_SRCS +=  purgatory/arch/i386/entry32-16.S
>  x86_64_PURGATORY_SRCS += purgatory/arch/i386/entry32-16-debug.S
>  x86_64_PURGATORY_SRCS += purgatory/arch/i386/crashdump_backup.c
>  x86_64_PURGATORY_SRCS += purgatory/arch/i386/console-x86.c
> -- 
> 1.7.5.4
> 



More information about the kexec mailing list