aboutsummaryrefslogtreecommitdiff
path: root/tools/objtool
diff options
context:
space:
mode:
authorJulien Thierry2020-09-04 16:30:20 +0100
committerJosh Poimboeuf2020-09-10 10:43:13 -0500
commitbb090fdb70ecc51c91e1d86345adae064caa06c8 (patch)
tree87c0d4789cbdf75aabfefe588413a58167305a65 /tools/objtool
parent3890b8d92710af75baedf291832cf40193b33454 (diff)
objtool: Make sync-check consider the target architecture
Do not take into account outdated headers unrelated to the build of the current architecture. [ jpoimboe: use $SRCARCH directly ] Reviewed-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Julien Thierry <jthierry@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'tools/objtool')
-rwxr-xr-xtools/objtool/sync-check.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/objtool/sync-check.sh b/tools/objtool/sync-check.sh
index b5f526638f0a..cea1c12607b9 100755
--- a/tools/objtool/sync-check.sh
+++ b/tools/objtool/sync-check.sh
@@ -1,6 +1,12 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
+if [ -z "$SRCARCH" ]; then
+ echo 'sync-check.sh: error: missing $SRCARCH environment variable' >&2
+ exit 1
+fi
+
+if [ "$SRCARCH" = "x86" ]; then
FILES="
arch/x86/include/asm/inat_types.h
arch/x86/include/asm/orc_types.h
@@ -13,6 +19,7 @@ arch/x86/include/asm/insn.h -I '^#include [\"<]\(asm/\)*inat.h[\">]'
arch/x86/lib/inat.c -I '^#include [\"<]\(../include/\)*asm/insn.h[\">]'
arch/x86/lib/insn.c -I '^#include [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]' -I '^#include [\"<]\(../include/\)*asm/emulate_prefix.h[\">]'
"
+fi
check_2 () {
file1=$1