From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
clang-built-linux@googlegroups.com,
Nick Desaulniers <ndesaulniers@google.com>,
Nathan Chancellor <natechancellor@gmail.com>,
linux-s390@vger.kernel.org,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Philipp Rudo <prudo@linux.vnet.ibm.com>,
Tony Krowiak <akrowiak@linux.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] s390: only build for new CPUs with clang
Date: Thu, 11 Apr 2019 08:23:49 +0200 [thread overview]
Message-ID: <20190411062349.GB4126@osiris> (raw)
In-Reply-To: <20190410201300.3528984-1-arnd@arndb.de>
On Wed, Apr 10, 2019 at 10:12:40PM +0200, Arnd Bergmann wrote:
> llvm does does not understand -march=z9-109 and older target
> specifiers, so disable the respective Kconfig settings and
> the logic to make the boot code work on old systems when
> building with clang.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/s390/Kconfig | 6 ++++++
> arch/s390/boot/Makefile | 2 ++
> 2 files changed, 8 insertions(+)
...
> diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile
> index c844eaf24ed7..953a74d04990 100644
> --- a/arch/s390/boot/Makefile
> +++ b/arch/s390/boot/Makefile
> @@ -11,6 +11,7 @@ KASAN_SANITIZE := n
> KBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR)
> KBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR)
>
> +ifndef CONFIG_CC_IS_CLANG
> #
> # Use -march=z900 for als.c to be able to print an error
> # message if the kernel is started on a machine which is too old
> @@ -25,6 +26,7 @@ CFLAGS_als.o += -march=z900
> CFLAGS_REMOVE_sclp_early_core.o += $(CC_FLAGS_MARCH)
> CFLAGS_sclp_early_core.o += -march=z900
> endif
> +endif
This contradicts the whole purpose of als.c - printing an error
message to the console if the kernel is compiled for a newer
architecture than it is running on (and therefore uses instructions
unknown to the current system).
If this can't be fixed/changed in clang, then it should be at least
changed to the lowest possible architecture.
next prev parent reply other threads:[~2019-04-11 6:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 20:12 [PATCH 1/2] s390: only build for new CPUs with clang Arnd Bergmann
2019-04-10 20:12 ` [PATCH 2/2] s390: boot, purgatory: pass $(CLANG_FLAGS) where needed Arnd Bergmann
2019-04-10 22:14 ` Nick Desaulniers
2019-04-11 8:52 ` Arnd Bergmann
2019-04-11 18:08 ` Nick Desaulniers
2019-04-15 6:32 ` Martin Schwidefsky
2019-04-10 22:20 ` [PATCH 1/2] s390: only build for new CPUs with clang Nick Desaulniers
2019-04-11 10:18 ` Arnd Bergmann
2019-04-11 17:46 ` Nick Desaulniers
2019-04-11 6:23 ` Heiko Carstens [this message]
2019-04-11 10:19 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190411062349.GB4126@osiris \
--to=heiko.carstens@de.ibm.com \
--cc=akrowiak@linux.ibm.com \
--cc=arnd@arndb.de \
--cc=clang-built-linux@googlegroups.com \
--cc=gor@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=prudo@linux.vnet.ibm.com \
--cc=schwidefsky@de.ibm.com \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox