Skip to contentSkip to conversation

linux-user, configure: improve syscall_nr.h dependencies checking

PATCH In review Laurent Vivier 3 participants 3 messages Mar 23, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user, configure: improve syscall_nr.h dependencies checking

This is mostly a fix for in-tree build.

It removes errors on .d directories:

grep: ./.gitlab-ci.d: Is a directory
grep: ./scripts/qemu-guest-agent/fsfreeze-hook.d: Is a directory

and improves performance by only checking <ARCH>-linux-user directories.

---
 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
configure +3 -3
index 4f12cd01777e..da09c3589572 100755
@@ -1910,9 +1910,9 @@ for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \
     # remove the file if it has been generated in the source directory
     rm -f "${source_path}/linux-user/${arch}/syscall_nr.h"
     # remove the dependency files
-    find . -name "*.d" \
-           -exec grep -q "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \
-           -exec rm {} \;
+    test -d ${arch}-linux-user && find ${arch}-linux-user -type f -name "*.d" \
+         -exec grep -q "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \
+         -exec rm {} \;
 done
 
 if test -z "$python"
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 24 lines · Laurent Vivier

This is mostly a fix for in-tree build.

It removes errors on .d directories:

grep: ./.gitlab-ci.d: Is a directory
grep: ./scripts/qemu-guest-agent/fsfreeze-hook.d: Is a directory

and improves performance by only checking <ARCH>-linux-user directories.

---
  configure | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
configure +0 -0
index 4f12cd01777e..da09c3589572 100755
@@ -1910,9 +1910,9 @@ for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \
      # remove the file if it has been generated in the source directory
      rm -f "${source_path}/linux-user/${arch}/syscall_nr.h"

configure for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \ · line 1918

Quoted 10 lines
configure +3 -3
      # remove the dependency files
-    find . -name "*.d" \
-           -exec grep -q "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \
-           -exec rm {} \;
+    test -d ${arch}-linux-user && find ${arch}-linux-user -type f -name "*.d" \
+         -exec grep -q "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \
+         -exec rm {} \;
  done
 
  if test -z "$python"
#2 lore raw
In reply to Laurent Vivier
Quoted 8 lines · Laurent Vivier

This is mostly a fix for in-tree build.

It removes errors on .d directories:

grep: ./.gitlab-ci.d: Is a directory
grep: ./scripts/qemu-guest-agent/fsfreeze-hook.d: Is a directory

Quoted 6 lines

and improves performance by only checking <ARCH>-linux-user directories.

---

Applied to master to fix the build errors for in-tree builds.

thanks
-- PMM