From: Nathan Chancellor <nathan@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Fangrui Song <maskray@google.com>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nathan Chancellor <natechancellor@gmail.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: [stable:linux-4.14.y 4459/9999] lib/mpi/mpih-div.c:142:20: error: invalid use of a cast in a inline asm context requiring an lvalue: remove the cast or build with -fheinous-gnu-extensions
Date: Fri, 4 Aug 2023 08:37:49 -0700 [thread overview]
Message-ID: <20230804153749.GA2148888@dev-arch.thelio-3990X> (raw)
In-Reply-To: <202308040553.nMR9oB8v-lkp@intel.com>
On Fri, Aug 04, 2023 at 05:32:55AM +0800, kernel test robot wrote:
> Hi Fangrui,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
> head: 60a6e3043cc8b918c989707a5eba5fd6830a08a4
> commit: 71749b1181eca12af96654a781cabcd058c37c8f [4459/9999] Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation
> config: mips-randconfig-r035-20230731 (https://download.01.org/0day-ci/archive/20230804/202308040553.nMR9oB8v-lkp@intel.com/config)
> compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
> reproduce: (https://download.01.org/0day-ci/archive/20230804/202308040553.nMR9oB8v-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202308040553.nMR9oB8v-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> >> lib/mpi/mpih-div.c:142:20: error: invalid use of a cast in a inline asm context requiring an lvalue: remove the cast or build with -fheinous-gnu-extensions
> 142 | umul_ppmm(n1, n0, d0, q);
> | ~~~~~~~~~~~~~~^~~~~~~~~~
> lib/mpi/longlong.h:652:20: note: expanded from macro 'umul_ppmm'
> 652 | : "=l" ((USItype)(w0)), \
> | ~~~~~~~~~~^~~
This is the same as [1] but the upstream solution (b0c091ae04f6) could
cause breakage in 4.14 for compilers older than GCC 4.4; 4.14 claims to
support GCC 3.2 as a minimum version. An alternative solution if we care
about fixing this issue in 4.14 without any regression possiblity would
be something like:
diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h
index 6c5229f98c9e..42076c124e23 100644
--- a/lib/mpi/longlong.h
+++ b/lib/mpi/longlong.h
@@ -639,7 +639,7 @@ do { \
************** MIPS *****************
***************************************/
#if defined(__mips__) && W_TYPE_SIZE == 32
-#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) || defined(__clang__)
#define umul_ppmm(w1, w0, u, v) \
do { \
UDItype __ll = (UDItype)(u) * (v); \
[1]: https://lore.kernel.org/20230801202602.GA2589710@dev-arch.thelio-3990X/
Cheers,
Nathan
next prev parent reply other threads:[~2023-08-04 15:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 21:32 [stable:linux-4.14.y 4459/9999] lib/mpi/mpih-div.c:142:20: error: invalid use of a cast in a inline asm context requiring an lvalue: remove the cast or build with -fheinous-gnu-extensions kernel test robot
2023-08-04 15:37 ` Nathan Chancellor [this message]
2023-08-04 15:41 ` Nick Desaulniers
2023-08-07 6:52 ` Liu, Yujie
2023-08-07 16:19 ` Nick Desaulniers
2023-08-08 8:55 ` Liu, Yujie
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=20230804153749.GA2148888@dev-arch.thelio-3990X \
--to=nathan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=maskray@google.com \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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