Re: [PATCHv3 1/6] atomics: add common header generation files

From: Andrew Morton
Date: Thu Nov 15 2018 - 18:04:03 EST


On Tue, 4 Sep 2018 11:48:25 +0100 Mark Rutland <mark.rutland@xxxxxxx> wrote:

> To minimize repetition, to allow for future rework, and to ensure
> regularity of the various atomic APIs, we'd like to automatically
> generate (the bulk of) a number of headers related to atomics.
>
> This patch adds the infrastructure to do so, leaving actual conversion
> of headers to subsequent patches. This infrastructure consists of:

My build broke.

scripts/atomic/check-atomics.sh: line 16: scripts/atomic/gen-atomic-instrumented.sh: Permission denied
scripts/atomic/check-atomics.sh: line 16: scripts/atomic/gen-atomic-long.sh: Permission denied
scripts/atomic/check-atomics.sh: line 16: scripts/atomic/gen-atomic-fallback.sh: Permission denied



From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: scripts/atomic/check-atomics.sh: don't assume that scripts are executable

patch(1) doesn't set the x bit on files. So if someone downloads and
applies patch-4.21.xz, their kernel won't build. Fix that by executing
/bin/sh.

Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

scripts/atomic/check-atomics.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/scripts/atomic/check-atomics.sh~scripts-atomic-check-atomicssh-dont-assume-that-scripts-are-executable
+++ a/scripts/atomic/check-atomics.sh
@@ -13,7 +13,7 @@ gen-atomic-long.sh asm-gene
gen-atomic-fallback.sh linux/atomic-fallback.h
EOF
while read script header; do
- if ! (${ATOMICDIR}/${script} ${ATOMICTBL} | diff - ${LINUXDIR}/include/${header} > /dev/null); then
+ if ! (/bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} | diff - ${LINUXDIR}/include/${header} > /dev/null); then
printf "warning: include/${header} is out-of-date.\n"
fi
done
_