LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Oleg Verych <olecom@flower.upol.cz>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: The who needs reviews anyways [PATCH]
Date: Fri, 9 Feb 2007 06:22:45 +0100	[thread overview]
Message-ID: <20070209052245.GC28386@flower.upol.cz> (raw)
In-Reply-To: <Pine.LNX.4.64.0702082227020.14457@scrub.home>

On Thu, Feb 08, 2007 at 10:48:51PM +0100, Roman Zippel wrote:
[]
> - printf has other side effects, instead stop pretending we support 
>   something else than bash

More on printf, `sh', tmpfiles.

As we know original problem is: something from binutils is removing
output files on failure. 

> -	  else if [ -x /bin/bash ]; then echo /bin/bash; \
> -	  else echo sh; fi ; fi)
> +	  else if [ -x /bin/bash ]; then echo /bin/bash; fi; fi)
> +ifeq ($(CONFIG_SHELL),)
> +$(error bash is required to build the kernel)
> +endif
> +SHELL := $(CONFIG_SHELL)

here is policy to have `bash' introduced, so due to original
issue, where `root' users ended with removed /dev/null, may policy to have
`non root' user to build kernel be added? Thus

this:
> +# output directory for tests below
> +TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
[]
> +# try-run
> +# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
> +# Exit code chooses option. "$$TMP" is can be used as temporary file and
> +# is automatically cleaned up.
> +try-run = $(shell set -e;		\
this:
> +	TMP="$(TMPOUT).$$$$.tmp";	\
[]
> +	if ($(1)) >/dev/null 2>&1;	\
> +	then echo "$(2)";		\
> +	else echo "$(3)";		\
> +	fi;				\
this:
> +	rm -f "$$TMP")

may be removed, and to make TMP=/dev/null? And to forget currently about
my silly symlinks, and this crappy sets of output files?

As for `printf', as i've wrote, only in case of % and quotes in
arguments, something else must be added to handle that. But i think, it's
paranoia.

> -as-instr = $(call checker-shell,\
> -   printf "$(1)" | $(CC) $(AFLAGS) -c -xassembler -o $$OUT -,$(2),$(3))

`printf $(1)' is pretty enough.

____

  parent reply	other threads:[~2007-02-09  5:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08 21:48 Roman Zippel
2007-02-08 22:05 ` Sam Ravnborg
2007-02-08 22:22 ` Linus Torvalds
2007-02-08 22:53   ` Roman Zippel
2007-02-08 23:02     ` Linus Torvalds
2007-02-08 23:20       ` Roman Zippel
2007-02-09  2:29         ` Valdis.Kletnieks
2007-02-08 23:03 ` Kbuild refactoring (Re: The who needs reviews anyways [PATCH]) Oleg Verych
2007-02-09  0:06 ` The who needs reviews anyways [PATCH] Andreas Schwab
2007-02-09  1:21   ` Roman Zippel
2007-02-09  5:22 ` Oleg Verych [this message]
2007-02-09 11:35   ` Roman Zippel
2007-02-09 21:42     ` Oleg Verych

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=20070209052245.GC28386@flower.upol.cz \
    --to=olecom@flower.upol.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=zippel@linux-m68k.org \
    --subject='Re: The who needs reviews anyways [PATCH]' \
    /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).