All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Mauro Rossi <issor.oruam@gmail.com>,
	 Chih-Wei Huang <cwhuang@android-x86.org>,
	clang-built-linux <llvm@lists.linux.dev>,
	 Mark Brown <broonie@kernel.org>, Brian Gerst <brgerst@gmail.com>
Subject: Re: Android 11 clang toochain: kernel 5.18 build error with 32 bit target
Date: Tue, 26 Apr 2022 12:23:51 -0700	[thread overview]
Message-ID: <CAKwvOdkvg+jKVqetfrNPn5yNCxfZYHAhu2Cvc+dGLFG3+kOGUg@mail.gmail.com> (raw)
In-Reply-To: <Ymg43Ed/Sg8szdKq@dev-arch.thelio-3990X>

On Tue, Apr 26, 2022 at 11:24 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> On Tue, Apr 26, 2022 at 02:21:16PM +0200, Arnd Bergmann wrote:
> > On Mon, Apr 25, 2022 at 9:13 PM Mauro Rossi <issor.oruam@gmail.com> wrote:
> > > I have checked also with kernel-5.17 and the same build error is
> > > happening also there, so it is not due to commit 34737e2698 ("uaccess: add generic
> > > __{get,put}_kernel_nofault")
> >
> > Ok, that's good to know, thanks for checking! I suspect the problem is
> > using a slightly too-old prerelease build of clang, where the released
> > clang-11 build had the asm-goto-with-output feature enabled.
>
> Correct, the build failure can be reproduced with tip of tree LLVM if
> CONFIG_CC_HAS_ASM_GOTO_OUTPUT is manually disabled, such as:

That begs the question though; not all supported versions of GCC have
asm goto w/ outputs. Why is this not an issue for older gcc versions?
Perhaps it's because clang is validating inline asm constraints in
dead code again? I thought I had fixed that in
commit 158807de5822 ("x86/uaccess: Make __get_user_size() Clang
compliant on 32-bit")
in v5.9-rc1.

I don't know why `=a` can't be used, yet.
void foo(void *a) {
    asm("":"=a"(*((unsigned long*)a)));
}
Compiles w/ -m32 just fine.  Perhaps creduce is needed.
-- 
Thanks,
~Nick Desaulniers

  reply	other threads:[~2022-04-26 19:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEQFVGb2aXVu7eys5PM=xZ7gtzdap_QyRrzi3WzY83ka=heOwQ@mail.gmail.com>
     [not found] ` <CAK8P3a0Lwtm86wYH+0yFtr=Luc6g3OLu_+vzZaJqxDxNHFmQDQ@mail.gmail.com>
2022-04-25 18:04   ` Android 11 clang toochain: kernel 5.18 build error with 32 bit target Nick Desaulniers
2022-04-25 19:13     ` Mauro Rossi
2022-04-26 12:21       ` Arnd Bergmann
2022-04-26 18:24         ` Nathan Chancellor
2022-04-26 19:23           ` Nick Desaulniers [this message]
2022-04-26 19:31             ` Nick Desaulniers
2022-04-26 19:46               ` Nick Desaulniers
2022-04-26 20:16       ` Mauro Rossi
2022-04-26 22:23         ` Mauro Rossi
2022-04-28 22:28           ` Mauro Rossi
2022-05-01 18:40             ` Mauro Rossi
2022-05-12  0:36               ` Nick Desaulniers

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=CAKwvOdkvg+jKVqetfrNPn5yNCxfZYHAhu2Cvc+dGLFG3+kOGUg@mail.gmail.com \
    --to=ndesaulniers@google.com \
    --cc=arnd@arndb.de \
    --cc=brgerst@gmail.com \
    --cc=broonie@kernel.org \
    --cc=cwhuang@android-x86.org \
    --cc=issor.oruam@gmail.com \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.