[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v9 03/30] build: fix exported variable name CFLAGS_stack_boundary
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Fri, 28 Jan 2022 15:04:55 +0000
- Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 28 Jan 2022 15:06:35 +0000
- Ironport-data: A9a23:3Mb9RqzhwlGxOkplo1h6t+fhwSrEfRIJ4+MujC+fZmUNrF6WrkVRz WoZXW6PO6rYYzD3ctxwPoux8k1Tu5KHz9A2QAtr/iAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAhLeNYYH1500g7wrRp2tIAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt+J39 opp7Ia1cFoOYqLgwc8eEDBXAy4raMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVors0lMMnsOpJZonx6xCvVJf0nXYrCU+PB4towMDIY2JsVTKmFO 5pxhTxHMxPdWhQMF1UsMosEwf2Ti2fjQzMFpwfAzUYwyzeKl1EguFT3C/LFd9rPSchLk0Kwo mPd43+/EhwcLMaYyzeO7jSrnOCntTz/cJIfEvu/7PECqF+Zy3EXCRYWfUCmuvT/gUm7M++zM GRNpHBo9/JrshX2EJ+tBHVUvUJooDYuXeQPN7Qg7TjQ7fbb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EVt6nH3DU=
- Ironport-sdr: hecgMeuv5LiQNuTPVuhHWjE+2Gjo9UZC9/XKzf7JaZIbLrZmJB+3xQqOtn05CPV/WdERH3Ckzd PRdI0Gm5vZUiwt9gTLq9d24CbXkX/fxviW9Pp6GwgmN1EuSl9NQLStFB4Dr216bZ64F0B1A5l9 DENYNJEa7o660InMoFYtYW8TV4S4nX7qke7SFpJV+z0o9medn6UaCgDqq54GWErJBfQ47FN66r 1HL+pV58uwoUarua1KUlLnH+woPOkUja+J2irS/f47dxKtzKwZhd8epNve/96QiSXHmPsmS4yp 91MuqZsvtxP3uEd4bytVR+xB
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Jan 28, 2022 at 12:14:58PM +0100, Jan Beulich wrote:
> On 25.01.2022 12:00, Anthony PERARD wrote:
> > Exporting a variable with a dash doesn't work reliably, they may be
> > striped from the environment when calling a sub-make or sub-shell.
> >
> > CFLAGS-stack-boundary start to be removed from env in patch "build:
> > set ALL_OBJS in main Makefile; move prelink.o to main Makefile" when
> > running `make "ALL_OBJS=.."` due to the addition of the quote. At
> > least in my empirical tests.
> >
> > Fixes: 2740d96efd ("xen/build: have the root Makefile generates the CFLAGS")
> > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
>
> While I did commit this, I'm still somewhat confused. How would quoting
> of elements on a make command line make a difference to which variables
> get exported?
I don't know, maybe without quote, make run sub-make directly, but with
double-quote, a shell is used.
But after reading the manual, I didn't expect the variable to be passed
down sub-make at all:
5.7.2 Communicating Variables to a Sub-make
Except by explicit request, make exports a variable only if it is
either defined in the environment initially or set on the command
line, and if its name consists only of letters, numbers, and
underscores.
But somehow, sub-makes also export the non-shell-exportable variables,
unless the command line in a recipe invoking make has double-quotes.
I've tried again, and checked the process list:
- when running `$(MAKE) -C foo`; make just execute make
- when running `$(MAKE) -C 'foo'`; make just execute make
- when running `$(MAKE) -C "foo"`; make execute /bin/sh -c ...
- when running `$(MAKE) -C foo | tee`; make execute /bin/sh -c ...
So, CFLAGS-stack-boundary disappear when /bin/sh is involved.
> In any event I understand the description that prior to the subsequent
> change there's not actually any issue. Hence I'm not going to queue
> this for backporting despite the Fixes: tag. Unless of course I'm told
> otherwise (with justification).
Justification would be that it's not supposed to work, based on
information from make's manual.
Thanks,
--
Anthony PERARD
|