From: Ben Hutchings <ben@decadent.org.uk>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
debian-kernel <debian-kernel@lists.debian.org>
Subject: Re: [PATCH] kbuild: Do not use hyphen in exported variable name
Date: Sat, 19 Aug 2017 02:13:51 +0100 [thread overview]
Message-ID: <1503105231.3688.33.camel@decadent.org.uk> (raw)
In-Reply-To: <1493563778.2564.11.camel@decadent.org.uk>
[-- Attachment #1: Type: text/plain, Size: 3528 bytes --]
On Sun, 2017-04-30 at 15:49 +0100, Ben Hutchings wrote:
> On Sun, 2017-04-30 at 23:14 +0900, Masahiro Yamada wrote:
> > Hi Ben,
> >
> >
> > > 2017-04-23 16:23 GMT+09:00 Ben Hutchings <ben@decadent.org.uk>:
> > > On Sun, 2017-04-23 at 15:47 +0900, Masahiro Yamada wrote:
> > > [...]
> > > > I tested dtbs_install once again by myself, but
> > > > dtbinst-root is exported to the sub make
> > > > and the vendor directories are created correctly.
> > > >
> > > >
> > > > I checked the debian's forum you gave
> > > > > References: https://bugs.debian.org/833561
> > > >
> > > > In there, you mentioned:
> > > > "This looks like a bug in make, but we can at least work around it by
> > > > using a non-hyphenated variable name."
> > > >
> > > >
> > > > Does this issue happen on a specific Make version?
> > > >
> > > > I tested GNU make 3.81, 3.82, 4.0, 4.1, 4.2,
> > > > but I was not hit by the problem.
> > >
> > > I don't think this is make version dependent. I can't reproduce the
> > > issue today with make 4.1. But I would have been using the same
> > > version in August when I wrote that.
> > >
> > > What more can I say? Clearly the hyphenated variable gets passed to
> > > the sub-make in most cases. But it's not totally reliable because last
> > > year it wasn't working for us.
> > >
> > > > In the last post in the thread, you concluded:
> > > > "We believe that the bug you reported is fixed in the latest version of
> > > > linux, which is due to be installed in the Debian FTP archive."
> > >
> > > I didn't write that, it's a standard message generated for bugs marked
> > > as closed in a package changelog. :-)
> > >
> > > > If so, why is this patch here?
> > > > How is the dtbs_install procedure different in the Debian package?
> > >
> > > This is the patch I applied to the package.
> > >
> >
> > Do you still need this patch for Debian?
> [...]
>
> I don't think so. I just don't know for sure.
I've now seen a similar problem with the suffix-y variable exported
from arch/sh/boot/Makefile to arch/sh/boot/compressed/Makefile:
https://buildd.debian.org/status/fetch.php?pkg=linux&arch=sh4&ver=4.13%7Erc5-1%7Eexp1&stamp=1502943967&raw=0
Those Makefiles haven't changed recently, so there must be some
difference in the build environment. Here's a Makefile that
demonstrates the difference in behaviour between bash and dash:
--- BEGIN ---
ifdef WANTED_SHELL
SHELL := $(WANTED_SHELL)
endif
test:
@WANTED_SHELL=/bin/bash $(MAKE) test2
@WANTED_SHELL=/bin/dash $(MAKE) test2
@WANTED_SHELL= $(MAKE) test2
test2: export foo_bar := foo_bar
test2: export foo-bar := foo-bar
test2:
@echo SHELL=$(SHELL)
@$(MAKE) test3
test3:
@echo foo_bar=$(foo_bar)
@echo foo-bar=$(foo-bar)
.PHONY: test test2 test3
--- END ---
For me, this produces:
$ make -s
SHELL=/bin/bash
foo_bar=foo_bar
foo-bar=foo-bar
SHELL=/bin/dash
foo_bar=foo_bar
foo-bar=
SHELL=/bin/sh
foo_bar=foo_bar
foo-bar=foo-bar
Note that the last two cases are different even though /bin/sh is dash
here. It turns out that make avoids using the shell for simple
commands, unless it has been changed from the default:
https://sources.debian.net/src/make-dfsg/4.1-9.1/job.c/#L2575
Ben.
--
Ben Hutchings
The generation of random numbers is too important to be left to chance.
- Robert Coveyou
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-08-19 1:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 1:00 [PATCH] kbuild: Do not use hyphen in exported variable name Ben Hutchings
2017-04-18 4:44 ` Sam Ravnborg
2017-04-23 6:47 ` Masahiro Yamada
2017-04-23 7:23 ` Ben Hutchings
2017-04-30 14:14 ` Masahiro Yamada
2017-04-30 14:49 ` Ben Hutchings
2017-05-03 4:47 ` Masahiro Yamada
2017-08-19 1:13 ` Ben Hutchings [this message]
2017-08-19 17:37 ` Masahiro Yamada
2017-08-19 20:14 ` Ben Hutchings
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=1503105231.3688.33.camel@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=debian-kernel@lists.debian.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=yamada.masahiro@socionext.com \
/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