linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] objtool: minor fixes
@ 2020-01-20 18:14 Josh Poimboeuf
  2020-01-20 18:14 ` [PATCH 1/3] objtool: Silence build output Josh Poimboeuf
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Josh Poimboeuf @ 2020-01-20 18:14 UTC (permalink / raw)
  To: x86; +Cc: linux-kernel, Peter Zijlstra

Three minor fixes which help objtool integrate better with the kernel
build.

Josh Poimboeuf (1):
  objtool: Skip samples subdirectory

Olof Johansson (1):
  objtool: Silence build output

Shile Zhang (1):
  objtool: Fix ARCH=x86_64 build error

 samples/Makefile            | 1 +
 tools/objtool/Makefile      | 6 +-----
 tools/objtool/sync-check.sh | 2 --
 3 files changed, 2 insertions(+), 7 deletions(-)

-- 
2.21.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] objtool: Silence build output
  2020-01-20 18:14 [PATCH 0/3] objtool: minor fixes Josh Poimboeuf
@ 2020-01-20 18:14 ` Josh Poimboeuf
  2020-01-22  6:57   ` [tip: core/urgent] " tip-bot2 for Olof Johansson
  2020-01-20 18:14 ` [PATCH 2/3] objtool: Fix ARCH=x86_64 build error Josh Poimboeuf
  2020-01-20 18:14 ` [PATCH 3/3] objtool: Skip samples subdirectory Josh Poimboeuf
  2 siblings, 1 reply; 7+ messages in thread
From: Josh Poimboeuf @ 2020-01-20 18:14 UTC (permalink / raw)
  To: x86; +Cc: linux-kernel, Peter Zijlstra, Olof Johansson

From: Olof Johansson <olof@lixom.net>

The sync-check.sh script prints out the path due to a "cd -" at the end
of the script, even on silent builds. This isn't even needed, since the
script is executed in our build instead of sourced (so it won't change
the working directory of the surrounding build anyway).

Just remove the cd to make the build silent.

Fixes: 2ffd84ae973b ("objtool: Update sync-check.sh from perf's check-headers.sh")
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 tools/objtool/sync-check.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/objtool/sync-check.sh b/tools/objtool/sync-check.sh
index 9bd04bbed01e..2a1261bfbb62 100755
--- a/tools/objtool/sync-check.sh
+++ b/tools/objtool/sync-check.sh
@@ -48,5 +48,3 @@ check arch/x86/include/asm/inat.h     '-I "^#include [\"<]\(asm/\)*inat_types.h[
 check arch/x86/include/asm/insn.h     '-I "^#include [\"<]\(asm/\)*inat.h[\">]"'
 check arch/x86/lib/inat.c             '-I "^#include [\"<]\(../include/\)*asm/insn.h[\">]"'
 check arch/x86/lib/insn.c             '-I "^#include [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]" -I "^#include [\"<]\(../include/\)*asm/emulate_prefix.h[\">]"'
-
-cd -
-- 
2.21.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] objtool: Fix ARCH=x86_64 build error
  2020-01-20 18:14 [PATCH 0/3] objtool: minor fixes Josh Poimboeuf
  2020-01-20 18:14 ` [PATCH 1/3] objtool: Silence build output Josh Poimboeuf
@ 2020-01-20 18:14 ` Josh Poimboeuf
  2020-01-22  6:57   ` [tip: core/urgent] " tip-bot2 for Shile Zhang
  2020-01-20 18:14 ` [PATCH 3/3] objtool: Skip samples subdirectory Josh Poimboeuf
  2 siblings, 1 reply; 7+ messages in thread
From: Josh Poimboeuf @ 2020-01-20 18:14 UTC (permalink / raw)
  To: x86; +Cc: linux-kernel, Peter Zijlstra, Shile Zhang, Kamalesh Babulal

From: Shile Zhang <shile.zhang@linux.alibaba.com>

Building objtool with ARCH=x86_64 fails with:

   $make ARCH=x86_64 -C tools/objtool
   ...
     CC       arch/x86/decode.o
   arch/x86/decode.c:10:22: fatal error: asm/insn.h: No such file or directory
    #include <asm/insn.h>
                         ^
   compilation terminated.
   mv: cannot stat ‘arch/x86/.decode.o.tmp’: No such file or directory
   make[2]: *** [arch/x86/decode.o] Error 1
   ...

The root cause is that the command-line variable 'ARCH' cannot be
overridden.  It can be replaced by 'SRCARCH', which is defined in
'tools/scripts/Makefile.arch'.

Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 tools/objtool/Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index d2a19b0bc05a..ee08aeff30a1 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -2,10 +2,6 @@
 include ../scripts/Makefile.include
 include ../scripts/Makefile.arch
 
-ifeq ($(ARCH),x86_64)
-ARCH := x86
-endif
-
 # always use the host compiler
 HOSTAR	?= ar
 HOSTCC	?= gcc
@@ -33,7 +29,7 @@ all: $(OBJTOOL)
 
 INCLUDES := -I$(srctree)/tools/include \
 	    -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
-	    -I$(srctree)/tools/arch/$(ARCH)/include
+	    -I$(srctree)/tools/arch/$(SRCARCH)/include
 WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
 CFLAGS   := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
 LDFLAGS  += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
-- 
2.21.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] objtool: Skip samples subdirectory
  2020-01-20 18:14 [PATCH 0/3] objtool: minor fixes Josh Poimboeuf
  2020-01-20 18:14 ` [PATCH 1/3] objtool: Silence build output Josh Poimboeuf
  2020-01-20 18:14 ` [PATCH 2/3] objtool: Fix ARCH=x86_64 build error Josh Poimboeuf
@ 2020-01-20 18:14 ` Josh Poimboeuf
  2020-01-22  6:57   ` [tip: core/urgent] " tip-bot2 for Josh Poimboeuf
  2 siblings, 1 reply; 7+ messages in thread
From: Josh Poimboeuf @ 2020-01-20 18:14 UTC (permalink / raw)
  To: x86; +Cc: linux-kernel, Peter Zijlstra, Randy Dunlap

The code in the 'samples' subdirectory isn't part of the kernel, so
there's no need to validate it.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 samples/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/samples/Makefile b/samples/Makefile
index a1848d674e9d..53867d9af971 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 # Makefile for Linux samples code
+OBJECT_FILES_NON_STANDARD := y
 
 obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS)	+= binderfs/
 obj-$(CONFIG_SAMPLE_CONFIGFS)		+= configfs/
-- 
2.21.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [tip: core/urgent] objtool: Skip samples subdirectory
  2020-01-20 18:14 ` [PATCH 3/3] objtool: Skip samples subdirectory Josh Poimboeuf
@ 2020-01-22  6:57   ` tip-bot2 for Josh Poimboeuf
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Josh Poimboeuf @ 2020-01-22  6:57 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Randy Dunlap, Josh Poimboeuf, Ingo Molnar, x86, LKML

The following commit has been merged into the core/urgent branch of tip:

Commit-ID:     8728497895794d1f207a836e02dae762ad175d56
Gitweb:        https://git.kernel.org/tip/8728497895794d1f207a836e02dae762ad175d56
Author:        Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate:    Mon, 20 Jan 2020 12:14:09 -06:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 22 Jan 2020 07:55:02 +01:00

objtool: Skip samples subdirectory

The code in the 'samples' subdirectory isn't part of the kernel, so
there's no need to validate it.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/c4cb4ef635ec606454ab834cb49fc3e9381fb1b1.1579543924.git.jpoimboe@redhat.com
---
 samples/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/samples/Makefile b/samples/Makefile
index 5ce50ef..f8f847b 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 # Makefile for Linux samples code
+OBJECT_FILES_NON_STANDARD := y
 
 obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS)	+= binderfs/
 obj-$(CONFIG_SAMPLE_CONFIGFS)		+= configfs/

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [tip: core/urgent] objtool: Fix ARCH=x86_64 build error
  2020-01-20 18:14 ` [PATCH 2/3] objtool: Fix ARCH=x86_64 build error Josh Poimboeuf
@ 2020-01-22  6:57   ` tip-bot2 for Shile Zhang
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Shile Zhang @ 2020-01-22  6:57 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Shile Zhang, Josh Poimboeuf, Ingo Molnar, Kamalesh Babulal, x86, LKML

The following commit has been merged into the core/urgent branch of tip:

Commit-ID:     8580bed7e751e6d4f17881e059daf3cb37ba4717
Gitweb:        https://git.kernel.org/tip/8580bed7e751e6d4f17881e059daf3cb37ba4717
Author:        Shile Zhang <shile.zhang@linux.alibaba.com>
AuthorDate:    Mon, 20 Jan 2020 12:14:08 -06:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 22 Jan 2020 07:54:57 +01:00

objtool: Fix ARCH=x86_64 build error

Building objtool with ARCH=x86_64 fails with:

   $make ARCH=x86_64 -C tools/objtool
   ...
     CC       arch/x86/decode.o
   arch/x86/decode.c:10:22: fatal error: asm/insn.h: No such file or directory
    #include <asm/insn.h>
                         ^
   compilation terminated.
   mv: cannot stat ‘arch/x86/.decode.o.tmp’: No such file or directory
   make[2]: *** [arch/x86/decode.o] Error 1
   ...

The root cause is that the command-line variable 'ARCH' cannot be
overridden.  It can be replaced by 'SRCARCH', which is defined in
'tools/scripts/Makefile.arch'.

Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/d5d11370ae116df6c653493acd300ec3d7f5e925.1579543924.git.jpoimboe@redhat.com
---
 tools/objtool/Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index d2a19b0..ee08aef 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -2,10 +2,6 @@
 include ../scripts/Makefile.include
 include ../scripts/Makefile.arch
 
-ifeq ($(ARCH),x86_64)
-ARCH := x86
-endif
-
 # always use the host compiler
 HOSTAR	?= ar
 HOSTCC	?= gcc
@@ -33,7 +29,7 @@ all: $(OBJTOOL)
 
 INCLUDES := -I$(srctree)/tools/include \
 	    -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
-	    -I$(srctree)/tools/arch/$(ARCH)/include
+	    -I$(srctree)/tools/arch/$(SRCARCH)/include
 WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
 CFLAGS   := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
 LDFLAGS  += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [tip: core/urgent] objtool: Silence build output
  2020-01-20 18:14 ` [PATCH 1/3] objtool: Silence build output Josh Poimboeuf
@ 2020-01-22  6:57   ` tip-bot2 for Olof Johansson
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Olof Johansson @ 2020-01-22  6:57 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Olof Johansson, Josh Poimboeuf, Ingo Molnar, x86, LKML

The following commit has been merged into the core/urgent branch of tip:

Commit-ID:     6ec14aa7a58a1c2fb303692f8cb1ff82d9abd10a
Gitweb:        https://git.kernel.org/tip/6ec14aa7a58a1c2fb303692f8cb1ff82d9abd10a
Author:        Olof Johansson <olof@lixom.net>
AuthorDate:    Mon, 20 Jan 2020 12:14:07 -06:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 22 Jan 2020 07:54:34 +01:00

objtool: Silence build output

The sync-check.sh script prints out the path due to a "cd -" at the end
of the script, even on silent builds. This isn't even needed, since the
script is executed in our build instead of sourced (so it won't change
the working directory of the surrounding build anyway).

Just remove the cd to make the build silent.

Fixes: 2ffd84ae973b ("objtool: Update sync-check.sh from perf's check-headers.sh")
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/cb002857fafa8186cfb9c3e43fb62e4108a1bab9.1579543924.git.jpoimboe@redhat.com
---
 tools/objtool/sync-check.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/objtool/sync-check.sh b/tools/objtool/sync-check.sh
index 9bd04bb..2a1261b 100755
--- a/tools/objtool/sync-check.sh
+++ b/tools/objtool/sync-check.sh
@@ -48,5 +48,3 @@ check arch/x86/include/asm/inat.h     '-I "^#include [\"<]\(asm/\)*inat_types.h[
 check arch/x86/include/asm/insn.h     '-I "^#include [\"<]\(asm/\)*inat.h[\">]"'
 check arch/x86/lib/inat.c             '-I "^#include [\"<]\(../include/\)*asm/insn.h[\">]"'
 check arch/x86/lib/insn.c             '-I "^#include [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]" -I "^#include [\"<]\(../include/\)*asm/emulate_prefix.h[\">]"'
-
-cd -

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-01-22  6:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 18:14 [PATCH 0/3] objtool: minor fixes Josh Poimboeuf
2020-01-20 18:14 ` [PATCH 1/3] objtool: Silence build output Josh Poimboeuf
2020-01-22  6:57   ` [tip: core/urgent] " tip-bot2 for Olof Johansson
2020-01-20 18:14 ` [PATCH 2/3] objtool: Fix ARCH=x86_64 build error Josh Poimboeuf
2020-01-22  6:57   ` [tip: core/urgent] " tip-bot2 for Shile Zhang
2020-01-20 18:14 ` [PATCH 3/3] objtool: Skip samples subdirectory Josh Poimboeuf
2020-01-22  6:57   ` [tip: core/urgent] " tip-bot2 for Josh Poimboeuf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).