LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Oleg Verych <olecom@flower.upol.cz>
To: David Miller <davem@davemloft.net>
Cc: paulus@samba.org, torvalds@linux-foundation.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: final (Re: Kbuild change breaks the ppc64 build)
Date: Thu, 8 Feb 2007 14:45:34 +0100	[thread overview]
Message-ID: <20070208134534.GV22699@flower.upol.cz> (raw)
In-Reply-To: <20070208.051706.112290704.davem@davemloft.net>

Date: Feb 08, 2007 at 05:17:06AM -0800
From: David Miller

> From: Oleg Verych <olecom@flower.upol.cz>
> Date: Thu, 8 Feb 2007 13:47:56 +0100
> 
[]
> > As i have refactored some CC checking code in Kbuild.include, it
> > turned, that some versions of `make' after calling nested functions,
> > add (or leave) prefix whitespace to result, thus ifeq[0] fails:
> 
> That's not it, did you see my fix for this problem posted
> already?

Yes, i did. Thanks, David, for fix and for comprehencive approach.

Kudos to everyone, who was forced to deal with this cr@p. Sorry for my
confusion, that fast commit was a bit of stress.

> The issue is the leading spaces on the first line of the define for
> checker-shell.  Those propagate into the callers, although they are
> reduced down to a single space.

Yes, defines leave spaces/tabs as is, it's known thing, but again,
sorry.

> This will give you spaces in the result on any version of
> make.
> 
> Here is my fix again for your reference.
> 
> diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
> index 8d7eabf..a1880e8 100644
> --- a/scripts/Kbuild.include
> +++ b/scripts/Kbuild.include
> @@ -60,16 +60,15 @@ endef
>  # Usage: option = $(call checker-shell,$(CC)...-o $$OUT,option-ok,otherwise)
>  # Exit code chooses option. $$OUT is safe location for needless output.
>  define checker-shell
> - $(strip
   ^
Roland had no space here in his patch ;)

> -  $(shell set -e; \
> -    DIR=$(KBUILD_EXTMOD); \
> -    cd $${DIR:-$(objtree)}; \
> -    OUT=$$PWD/.$$$$.null; \
> -    if $(1) >/dev/null 2>&1; \
> -      then echo "$(2)"; \
> -      else echo "$(3)"; \
> -    fi; \
> -    rm -f $$OUT))
> +$(shell set -e; \
> +  DIR=$(KBUILD_EXTMOD); \
> +  cd $${DIR:-$(objtree)}; \
> +  OUT=$$PWD/.$$$$.null; \
> +  if $(1) >/dev/null 2>&1; \
> +    then echo "$(2)"; \
> +    else echo "$(3)"; \
> +  fi; \
> +  rm -f $$OUT)
>  endef
>  
>  # as-option
>
> 

Thanks!
____

      reply	other threads:[~2007-02-08 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08 11:10 Kbuild change breaks the ppc64 build Paul Mackerras
2007-02-08 12:00 ` David Miller
2007-02-08 12:35   ` Oleg Verych
2007-02-08 14:12   ` Michal Ostrowski
2007-02-08 12:47 ` Oleg Verych
2007-02-08 13:17   ` David Miller
2007-02-08 13:45     ` Oleg Verych [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070208134534.GV22699@flower.upol.cz \
    --to=olecom@flower.upol.cz \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=torvalds@linux-foundation.org \
    --subject='final (Re: Kbuild change breaks the ppc64 build)' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).