* [PATCH] x86: Allow generating user-space headers without a compiler
@ 2018-08-29 19:43 Ben Hutchings
2018-08-30 12:31 ` [tip:x86/urgent] " tip-bot for Ben Hutchings
2018-08-31 15:13 ` tip-bot for Ben Hutchings
0 siblings, 2 replies; 3+ messages in thread
From: Ben Hutchings @ 2018-08-29 19:43 UTC (permalink / raw)
To: x86; +Cc: Helmut Grohne, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]
When bootstrapping an architecture, it's usual to generate the
kernel's user-space headers (make headers_install) before building a
compiler. Move the compiler check (for asm goto support) to the
archprepare target so that it is only done when building code for the
target.
Fixes: e501ce957a78 ("x86: Force asm-goto")
Reported-by: Helmut Grohne <helmutg@debian.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/x86/Makefile | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 94859241bc3e..7df47ff45f68 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -175,10 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
endif
endif
-ifndef CC_HAVE_ASM_GOTO
- $(error Compiler lacks asm-goto support.)
-endif
-
#
# Jump labels need '-maccumulate-outgoing-args' for gcc < 4.5.2 to prevent a
# GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46226). There's no way
@@ -312,6 +308,13 @@ PHONY += vdso_install
vdso_install:
$(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@
+archprepare: checkbin
+checkbin:
+ifndef CC_HAVE_ASM_GOTO
+ @echo Compiler lacks asm-goto support.
+ @exit 1
+endif
+
archclean:
$(Q)rm -rf $(objtree)/arch/i386
$(Q)rm -rf $(objtree)/arch/x86_64
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:x86/urgent] x86: Allow generating user-space headers without a compiler
2018-08-29 19:43 [PATCH] x86: Allow generating user-space headers without a compiler Ben Hutchings
@ 2018-08-30 12:31 ` tip-bot for Ben Hutchings
2018-08-31 15:13 ` tip-bot for Ben Hutchings
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Ben Hutchings @ 2018-08-30 12:31 UTC (permalink / raw)
To: linux-tip-commits; +Cc: tglx, ben, hpa, linux-kernel, helmutg, mingo
Commit-ID: 3c76014d27e97bd641202007744fb37c18743adf
Gitweb: https://git.kernel.org/tip/3c76014d27e97bd641202007744fb37c18743adf
Author: Ben Hutchings <ben@decadent.org.uk>
AuthorDate: Wed, 29 Aug 2018 20:43:17 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 30 Aug 2018 14:28:19 +0200
x86: Allow generating user-space headers without a compiler
When bootstrapping an architecture, it's usual to generate the kernel's
user-space headers (make headers_install) before building a compiler. Move
the compiler check (for asm goto support) to the archprepare target so that
it is only done when building code for the target.
Fixes: e501ce957a78 ("x86: Force asm-goto")
Reported-by: Helmut Grohne <helmutg@debian.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180829194317.GA4765@decadent.org.uk
---
arch/x86/Makefile | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 8fc8f94ef5f5..8f6e7eb8ae9f 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -175,10 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
endif
endif
-ifndef CC_HAVE_ASM_GOTO
- $(error Compiler lacks asm-goto support.)
-endif
-
ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
# This compiler flag is not supported by Clang:
KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
@@ -300,6 +296,13 @@ PHONY += vdso_install
vdso_install:
$(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@
+archprepare: checkbin
+checkbin:
+ifndef CC_HAVE_ASM_GOTO
+ @echo Compiler lacks asm-goto support.
+ @exit 1
+endif
+
archclean:
$(Q)rm -rf $(objtree)/arch/i386
$(Q)rm -rf $(objtree)/arch/x86_64
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:x86/urgent] x86: Allow generating user-space headers without a compiler
2018-08-29 19:43 [PATCH] x86: Allow generating user-space headers without a compiler Ben Hutchings
2018-08-30 12:31 ` [tip:x86/urgent] " tip-bot for Ben Hutchings
@ 2018-08-31 15:13 ` tip-bot for Ben Hutchings
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Ben Hutchings @ 2018-08-31 15:13 UTC (permalink / raw)
To: linux-tip-commits; +Cc: mingo, helmutg, hpa, tglx, linux-kernel, ben
Commit-ID: 829fe4aa9ac16417a904ad1de1307de906854bcf
Gitweb: https://git.kernel.org/tip/829fe4aa9ac16417a904ad1de1307de906854bcf
Author: Ben Hutchings <ben@decadent.org.uk>
AuthorDate: Wed, 29 Aug 2018 20:43:17 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 31 Aug 2018 17:08:22 +0200
x86: Allow generating user-space headers without a compiler
When bootstrapping an architecture, it's usual to generate the kernel's
user-space headers (make headers_install) before building a compiler. Move
the compiler check (for asm goto support) to the archprepare target so that
it is only done when building code for the target.
Fixes: e501ce957a78 ("x86: Force asm-goto")
Reported-by: Helmut Grohne <helmutg@debian.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180829194317.GA4765@decadent.org.uk
---
arch/x86/Makefile | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 8fc8f94ef5f5..8f6e7eb8ae9f 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -175,10 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
endif
endif
-ifndef CC_HAVE_ASM_GOTO
- $(error Compiler lacks asm-goto support.)
-endif
-
ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
# This compiler flag is not supported by Clang:
KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
@@ -300,6 +296,13 @@ PHONY += vdso_install
vdso_install:
$(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@
+archprepare: checkbin
+checkbin:
+ifndef CC_HAVE_ASM_GOTO
+ @echo Compiler lacks asm-goto support.
+ @exit 1
+endif
+
archclean:
$(Q)rm -rf $(objtree)/arch/i386
$(Q)rm -rf $(objtree)/arch/x86_64
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-31 15:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 19:43 [PATCH] x86: Allow generating user-space headers without a compiler Ben Hutchings
2018-08-30 12:31 ` [tip:x86/urgent] " tip-bot for Ben Hutchings
2018-08-31 15:13 ` tip-bot for Ben Hutchings
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).