diff mbox series

[v2] um: Makefile: use bash from the environment

Message ID 20240323174450.18376-1-shamrocklee@posteo.net
State New
Headers show
Series [v2] um: Makefile: use bash from the environment | expand

Commit Message

Yueh-Shun Li March 23, 2024, 5:44 p.m. UTC
Set Makefile SHELL to bash instead of /bin/bash for better portability.

Some systems do not install binaries to /bin, and therefore do not
provide /bin/bash. This includes Linux distros which intentionally avoid
implementing the Filesystem Hierarchy Standard (FHS), such as NixOS and
Guix System.

The recipies inside arch/um/Makefile don't require top-level Bash to
build, and setting "SHELL" to "bash" makes Make pick the Bash executable
from the environment, hence this patch.

Changes since last roll:
- Rebase onto a more recent commit on the master branch.
- Remove a dangling in-text citation from the change log.
- Reword the change log.

Signed-off-by: Yueh-Shun Li <shamrocklee@posteo.net>
---
 arch/um/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johannes Berg March 28, 2024, 9:13 a.m. UTC | #1
On Sat, 2024-03-23 at 17:44 +0000, Yueh-Shun Li wrote:
> Set Makefile SHELL to bash instead of /bin/bash for better portability.
> 
> Some systems do not install binaries to /bin, and therefore do not
> provide /bin/bash. This includes Linux distros which intentionally avoid
> implementing the Filesystem Hierarchy Standard (FHS), such as NixOS and
> Guix System.
> 
> The recipies inside arch/um/Makefile don't require top-level Bash to
> build, and setting "SHELL" to "bash" makes Make pick the Bash executable
> from the environment, hence this patch.
> 
> Changes since last roll:
> - Rebase onto a more recent commit on the master branch.
> - Remove a dangling in-text citation from the change log.
> - Reword the change log.

Not sure I'd have added the change log here (in this case at least), but
anyway:

Reviewed-by: Johannes Berg <johannes@sipsolutions.net

johannes
diff mbox series

Patch

diff --git a/arch/um/Makefile b/arch/um/Makefile
index 34957dcb88b9..00b63bac5eff 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -20,7 +20,7 @@  endif
 ARCH_DIR := arch/um
 # We require bash because the vmlinux link and loader script cpp use bash
 # features.
-SHELL := /bin/bash
+SHELL := bash
 
 MODE_INCLUDE	+= -I$(srctree)/$(ARCH_DIR)/include/shared/skas