From: Nicolas Pitre <nicolas.pitre@linaro.org>
To: Matthias Kaehlcke <mka@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Andi Kleen <ak@linux.intel.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/7] ARM: LTO: avoid THUMB2_KERNEL+LTO
Date: Wed, 7 Mar 2018 13:52:03 -0500 (EST) [thread overview]
Message-ID: <nycvar.YSQ.7.76.1803071344540.7678@knanqh.ubzr> (raw)
In-Reply-To: <20180307183059.GA57047@google.com>
On Wed, 7 Mar 2018, Matthias Kaehlcke wrote:
> El Tue, Feb 20, 2018 at 10:59:49PM +0100 Arnd Bergmann ha dit:
>
> > Trying to build an LTO-Enabled kernel with Thumb2 instructions failed
> > horribly for me, with an endless output of things like
> >
> > ccVnNycO.s:2665: Error: thumb conditional instruction should be in IT block -- `bxne lr'
> > ccVnNycO.s:7128: Error: thumb conditional instruction should be in IT block -- `strexeq r5,r2,[r3]'
> > ccVnNycO.s:7258: Error: thumb conditional instruction should be in IT block -- `strexeq lr,r0,[r3]'
> > ccVnNycO.s:17380: Error: thumb conditional instruction should be in IT block -- `strexeq r1,r2,[r6]'
> > ccVnNycO.s:19163: Error: thumb conditional instruction should be in IT block -- `strexeq r8,r6,[r3]'
> > ccVnNycO.s:22722: Error: thumb conditional instruction should be in IT block -- `strexeq r7,r1,[r0]'
> > ccVnNycO.s:24105: conditional infixes are deprecated in unified syntax
> > ccVnNycO.s:24105: Error: thumb conditional instruction should be in IT block -- `sbcccs r1,r1,r3'
> > ccVnNycO.s:24105: Error: thumb conditional instruction should be in IT block -- `movcc r3,#0'
> > ccVnNycO.s:24210: conditional infixes are deprecated in unified syntax
> > ccVnNycO.s:24210: Error: thumb conditional instruction should be in IT block -- `sbcccs r2,r2,r3'
> > ccVnNycO.s:24210: Error: thumb conditional instruction should be in IT block -- `movcc r3,#0'
>
> For the record:
>
> The errors about sbcccs and movcc probably stem from here:
>
> /* We use 33-bit arithmetic here... */
> #define __range_ok(addr, size) ({ \
> unsigned long flag, roksum; \
> __chk_user_ptr(addr); \
> __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \
> : "=&r" (flag), "=&r" (roksum) \
> : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \
> : "cc"); \
> flag; })
>
> arch/arm/include/asm/uaccess.h
>
> I stumbled across this when trying to build a 32-bit ARM kernel with
> clang.
You have to tell clang to pass -mno-warn-deprecated to gas. That's what
the gcc build currently does.
In this particular case with LTO, the same trick as done for
-mimplicit-it=always would do it to work around
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78353.
Nicolas
next prev parent reply other threads:[~2018-03-07 18:52 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 21:59 [PATCH 0/7] ARM: hacks for link-time optimization Arnd Bergmann
2018-02-20 21:59 ` [PATCH 1/7] ARM: disallow combining XIP and LTO Arnd Bergmann
2018-02-21 3:01 ` Nicolas Pitre
2018-02-21 11:50 ` Arnd Bergmann
2018-02-21 15:13 ` Nicolas Pitre
2018-03-12 2:40 ` Nicolas Pitre
2018-03-12 13:52 ` Arnd Bergmann
2018-03-12 16:46 ` Arnd Bergmann
2018-03-12 17:00 ` Nicolas Pitre
2018-03-12 17:05 ` Nicolas Pitre
2018-03-12 17:07 ` Arnd Bergmann
2018-02-20 21:59 ` [PATCH 2/7] ARM: LTO: avoid THUMB2_KERNEL+LTO Arnd Bergmann
2018-02-21 3:12 ` Nicolas Pitre
2018-02-21 11:48 ` Arnd Bergmann
2018-03-07 18:30 ` Matthias Kaehlcke
2018-03-07 18:52 ` Nicolas Pitre [this message]
2018-02-20 21:59 ` [PATCH 3/7] [HACK] pass endianess flag to LTO linker Arnd Bergmann
2018-02-21 3:15 ` Nicolas Pitre
2018-02-21 9:44 ` Arnd Bergmann
2018-02-21 8:37 ` Ard Biesheuvel
2018-02-21 9:48 ` Arnd Bergmann
2018-02-21 10:09 ` Ard Biesheuvel
2018-02-21 13:00 ` Arnd Bergmann
2018-02-20 21:59 ` [PATCH 4/7] ARM: io-acorn: fix LTO linking without CONFIG_PRINTK Arnd Bergmann
2018-02-20 21:59 ` [PATCH 5/7] ARM: fix __inflate_kernel_data stack warning for LTO Arnd Bergmann
2018-02-21 3:26 ` Nicolas Pitre
2018-02-20 21:59 ` [PATCH 6/7] ARM: mark assembler-referenced symbols as __visible Arnd Bergmann
2018-02-20 21:59 ` [PATCH 7/7] efi: disable LTO for EFI stub Arnd Bergmann
2018-12-17 22:50 ` [PATCH 0/7] ARM: hacks for link-time optimization Peter Zijlstra
2018-12-18 0:08 ` Andi Kleen
2018-12-18 9:18 ` Peter Zijlstra
2018-12-18 10:00 ` Peter Zijlstra
2018-12-21 14:23 ` Paul E. McKenney
2018-12-21 17:20 ` Andi Kleen
2018-12-21 18:00 ` Paul E. McKenney
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=nycvar.YSQ.7.76.1803071344540.7678@knanqh.ubzr \
--to=nicolas.pitre@linaro.org \
--cc=ak@linux.intel.com \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.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 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).