[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/10] roms: build edk2 firmware binaries and va
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 07/10] roms: build edk2 firmware binaries and variable store templates |
Date: |
Tue, 12 Mar 2019 11:07:00 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
On 3/12/19 10:15 AM, Laszlo Ersek wrote:
> I'm acutely aware of portable vs. non-portable shell scripts. While
> working on the code, I specifically checked that "local" was not
> specified in SUSv4. The point is, I didn't care, because I didn't target
> a POSIX system, but a GNU system.
>
> We already require GNU Make, to my knowledge. Perhaps not by decree, but
> through the feature set that we use.
Indeed, qemu fails to build under BSD make.
> I really want to keep "local", as it keeps the shell variable namespace
> clean. Regarding the functions that I did put in the "global namespace",
> I was careful to prefix them suitably.
Yes, using local makes bash functions easier to write. (And I've been
trying to argue that POSIX should adopt local, but there is a
fundamental difference between ksh local (static scoping) and bash local
(dynamic scoping) that neither shell is willing to switch their existing
practice to meet at common ground - which is why POSIX hasn't
standardized anything yet)
>
> IMO, it's perfectly fine to require the shell to be bash here, given
> that this feature is meant for a subset of maintainers (and not for
> end-users), and that building edk2 already requires a quite sizeable set
> of packages installed (such as nasm, iasl, ...) So this feature is not
> meant for any random POSIX system.
>
> What I did miss in fact was that "GNU Make" didn't imply "/bin/bash":
Yep, I can see how that was not obvious, and I also agree that:
> Thus, the real fix here is to be explicit about the bash requirement. I
> should add
>
> SHELL=/bin/bash
>
> near the top of "Makefile.edk2".
this should indeed force the use of bash for all shell snippets and
$(shell) invocations in that makefile (and let you get away with
'source' instead of '.', as well as the use of 'local' within the
sourced functions).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 06/10] roms/Makefile: replace the $(EFIROM) target with "edk2-basetools", (continued)
[Qemu-devel] [PATCH 07/10] roms: build edk2 firmware binaries and variable store templates, Laszlo Ersek, 2019/03/08
Re: [Qemu-devel] [PATCH 07/10] roms: build edk2 firmware binaries and variable store templates, Philippe Mathieu-Daudé, 2019/03/10
[Qemu-devel] [PATCH 08/10] pc-bios: add edk2 firmware binaries and variable store templates, Laszlo Ersek, 2019/03/08
[Qemu-devel] [PATCH 09/10] pc-bios: document the edk2 firmware images; add firmware descriptors, Laszlo Ersek, 2019/03/08
[Qemu-devel] [PATCH 10/10] Makefile: install the edk2 firmware images and their descriptors, Laszlo Ersek, 2019/03/08
Re: [Qemu-devel] [PATCH 00/10] bundle edk2 platform firmware with QEMU, Philippe Mathieu-Daudé, 2019/03/08