linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: Nick Desaulniers <ndesaulniers@google.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Richard Purdie <richard.purdie@linuxfoundation.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Michal Marek <michal.lkml@markovi.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/3] kbuild: change the default shell to bash
Date: Fri, 19 Aug 2022 15:56:00 +0900	[thread overview]
Message-ID: <20220819065604.295572-1-masahiroy@kernel.org> (raw)


This is related to the discussion about the portability [1].

I wrote this code some time ago for some reason. My motivation at that
time was trap handling.

We use the EXIT trap in several places. The POSIX [2] mentions the 'EXIT'
as the trap condition, but nothing about the actual conditions that trigger
the EXIT trap. Bash invokes the EXIT trap when it exits after receiving
an unhandled signal, while dash does not.

I did not submit the patches because I lost the use-case of the EXIT trap
except cleaning temporary files. It is harmless to have temp files left over.

Recently, I saw a bug report regarding the portability of 'echo'
('echo' is a shell's built-in command. The behavior is different between
bash and dash).

I am sharing this patch set as RFC in case somebody might have interest or comment.
I am still wondering if this might be a big hammer, though.

[1]: https://lore.kernel.org/all/e902a360e3759c7f87d98d71d79a0d5cbe935e3e.camel@linuxfoundation.org/
[2]: https://pubs.opengroup.org/onlinepubs/009604599/utilities/trap.html



Masahiro Yamada (3):
  kconfig: move declarations for prepossessing to internal.h
  kconfig: allow to choose the shell for $(shell ) functions
  kbuild: use bash as the default shell for Make and Kconfig

 .../kbuild/kconfig-macro-language.rst         |  4 ++
 Makefile                                      |  7 ++
 scripts/Kconfig.include                       |  3 +
 scripts/kconfig/confdata.c                    |  1 +
 scripts/kconfig/internal.h                    | 18 +++++
 scripts/kconfig/lexer.l                       |  1 +
 scripts/kconfig/lkc_proto.h                   | 13 ----
 scripts/kconfig/parser.y                      |  1 +
 scripts/kconfig/preprocess.c                  | 66 +++++++++++++++----
 9 files changed, 87 insertions(+), 27 deletions(-)

-- 
2.34.1


             reply	other threads:[~2022-08-19  6:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  6:56 Masahiro Yamada [this message]
2022-08-19  6:56 ` [RFC PATCH 1/3] kconfig: move declarations for prepossessing to internal.h Masahiro Yamada
2022-08-19  6:56 ` [RFC PATCH 2/3] kconfig: allow to choose the shell for $(shell ) functions Masahiro Yamada
2022-08-19  8:58   ` Bagas Sanjaya
2022-08-19 21:37     ` David Laight
2022-08-19  6:56 ` [RFC PATCH 3/3] kbuild: use bash as the default shell for Make and Kconfig Masahiro Yamada

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=20220819065604.295572-1-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=ndesaulniers@google.com \
    --cc=rdunlap@infradead.org \
    --cc=richard.purdie@linuxfoundation.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).