From: Nathan Chancellor <nathan@kernel.org>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: open list <linux-kernel@vger.kernel.org>,
clang-built-linux <llvm@lists.linux.dev>,
lkft-triage@lists.linaro.org,
Nick Desaulniers <ndesaulniers@google.com>,
Arnd Bergmann <arnd@arndb.de>,
Anders Roxell <anders.roxell@linaro.org>,
Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: powerpc: clang: arch/powerpc/kernel/exceptions-64s.S:2976: Error: junk at end of line: `0b01010'
Date: Tue, 6 Jun 2023 08:31:50 -0700 [thread overview]
Message-ID: <20230606153150.GA128872@dev-arch.thelio-3990X> (raw)
In-Reply-To: <CA+G9fYs=koW9WardsTtora+nMgLR3raHz-LSLr58tgX4T5Mxag@mail.gmail.com>
Hi Naresh,
On Tue, Jun 06, 2023 at 01:57:46PM +0530, Naresh Kamboju wrote:
> Linux next-20230606 powerpc build failed.
>
> Regressions found on powerpc:
>
> - build/clang-16-maple_defconfig
> - build/clang-nightly-maple_defconfig
> - build/clang-16-defconfig
> - build/clang-nightly-defconfig
> - build/clang-nightly-cell_defconfig
> - build/clang-16-cell_defconfig
>
> Boot:
> =====
> make --silent --keep-going --jobs=8
> O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=powerpc
> CROSS_COMPILE=powerpc64le-linux-gnu-
> HOSTCC=clang
> CC=clang
> LLVM=1
> LLVM_IAS=0
> LD=powerpc64le-linux-gnu-ld
>
> arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
> arch/powerpc/kernel/exceptions-64s.S:2976: Error: junk at end of line: `0b01010'
> arch/powerpc/kernel/exceptions-64s.S:2996: Error: junk at end of line: `0b01010'
> arch/powerpc/kernel/exceptions-64s.S:3011: Error: junk at end of line: `0b01010'
> arch/powerpc/kernel/exceptions-64s.S:3029: Error: junk at end of line: `0b01010'
> arch/powerpc/kernel/exceptions-64s.S:3049: Error: junk at end of line: `0b01010'
> arch/powerpc/kernel/exceptions-64s.S:3096: Error: junk at end of line: `0b01010'
> clang: error: assembler command failed with exit code 1 (use -v to see
> invocation)
> make[4]: *** [scripts/Makefile.build:374: arch/powerpc/kernel/head_64.o] Error 1
> arch/powerpc/kernel/entry_64.S: Assembler messages:
> arch/powerpc/kernel/entry_64.S:174: Error: junk at end of line: `0b01010'
> clang: error: assembler command failed with exit code 1 (use -v to see
> invocation)
> make[4]: *** [scripts/Makefile.build:374:
> arch/powerpc/kernel/entry_64.o] Error 1
> make[4]: Target 'arch/powerpc/kernel/' not remade because of errors.
> make[3]: *** [scripts/Makefile.build:494: arch/powerpc/kernel] Error 2
> arch/powerpc/lib/copyuser_power7.S: Assembler messages:
> arch/powerpc/lib/copyuser_power7.S:305: Error: junk at end of line: `0b01000'
> arch/powerpc/lib/copyuser_power7.S:306: Error: junk at end of line: `0b01010'
> arch/powerpc/lib/copyuser_power7.S:308: Error: junk at end of line: `0b01000'
> arch/powerpc/lib/copyuser_power7.S:309: Error: junk at end of line: `0b01010'
> arch/powerpc/lib/copyuser_power7.S:311: Error: junk at end of line: `0b01010'
> clang: error: assembler command failed with exit code 1 (use -v to see
> invocation)
> make[4]: *** [scripts/Makefile.build:374:
> arch/powerpc/lib/copyuser_power7.o] Error 1
> arch/powerpc/lib/copypage_power7.S: Assembler messages:
> arch/powerpc/lib/copypage_power7.S:34: Error: junk at end of line: `0b01000'
> arch/powerpc/lib/copypage_power7.S:35: Error: junk at end of line: `0b01010'
> arch/powerpc/lib/copypage_power7.S:37: Error: junk at end of line: `0b01000'
> arch/powerpc/lib/copypage_power7.S:38: Error: junk at end of line: `0b01010'
> arch/powerpc/lib/copypage_power7.S:40: Error: junk at end of line: `0b01010'
> clang: error: assembler command failed with exit code 1 (use -v to see
> invocation)
> make[4]: *** [scripts/Makefile.build:374:
> arch/powerpc/lib/copypage_power7.o] Error 1
> arch/powerpc/lib/memcpy_power7.S: Assembler messages:
> arch/powerpc/lib/memcpy_power7.S:250: Error: junk at end of line: `0b01000'
> arch/powerpc/lib/memcpy_power7.S:251: Error: junk at end of line: `0b01010'
> arch/powerpc/lib/memcpy_power7.S:252: Error: junk at end of line: `0b01000'
> arch/powerpc/lib/memcpy_power7.S:253: Error: junk at end of line: `0b01010'
> arch/powerpc/lib/memcpy_power7.S:255: Error: junk at end of line: `0b01010'
> clang: error: assembler command failed with exit code 1 (use -v to see
> invocation)
> make[4]: *** [scripts/Makefile.build:374:
> arch/powerpc/lib/memcpy_power7.o] Error 1
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Thank you for the report, this is caused by the move of CLANG_FLAGS from
KBUILD_{A,C}FLAGS to KBUILD_CPPFLAGS, as as-option does not contain
KBUILD_CPPFLAGS, so we fail to pass necessary flags to the assembler.
The following diff resolves this particular issue for me, can you test
it to make sure it works for you? I will write up a changelog and sent
along a formal patch later today.
Cheers,
Nathan
diff --git a/scripts/Makefile.compiler b/scripts/Makefile.compiler
index 437013f8def3..e31f18625fcf 100644
--- a/scripts/Makefile.compiler
+++ b/scripts/Makefile.compiler
@@ -32,7 +32,7 @@ try-run = $(shell set -e; \
# Usage: aflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
as-option = $(call try-run,\
- $(CC) -Werror $(KBUILD_AFLAGS) $(1) -c -x assembler-with-cpp /dev/null -o "$$TMP",$(1),$(2))
+ $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(1) -c -x assembler-with-cpp /dev/null -o "$$TMP",$(1),$(2))
# as-instr
# Usage: aflags-y += $(call as-instr,instr,option1,option2)
next prev parent reply other threads:[~2023-06-06 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 8:27 Naresh Kamboju
2023-06-06 15:31 ` Nathan Chancellor [this message]
2023-06-06 22:42 ` Nathan Chancellor
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=20230606153150.GA128872@dev-arch.thelio-3990X \
--to=nathan@kernel.org \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=llvm@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=naresh.kamboju@linaro.org \
--cc=ndesaulniers@google.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
all inboxes | Powered by JetHome®