public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	llvm@lists.linux.dev,
	Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
Subject: Re: [PATCH] MIPS: Loongson2ef: Remove unnecessary {as,cc}-option calls
Date: Thu, 9 Dec 2021 10:30:50 +0100	[thread overview]
Message-ID: <20211209093050.GB7077@alpha.franken.de> (raw)
In-Reply-To: <20211207175951.135400-1-nathan@kernel.org>

On Tue, Dec 07, 2021 at 10:59:51AM -0700, Nathan Chancellor wrote:
> When building with LLVM's integrated assembler, the build errors because
> it does not implement -mfix-loongson2f-{jump,nop}:
> 
> arch/mips/loongson2ef/Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop.  Stop.
> 
> The error is a little misleading because binutils are not being used in
> this case.
> 
> To clear this up, remove the as-option calls because binutils 2.23 is
> the minimum supported version for building the kernel. At the same time,
> remove the cc-option calls for the '-march=' flags, as GCC 5.1.0 is the
> minimum supported version.
> 
> This change will not fix the LLVM build for CONFIG_CPU_LOONGSON2{E,F},
> as it does not implement the loongson2{e,f} march arguments (nor r4600,
> so it will error prior to this change) nor the assembler flags mentioned
> above but it will make the errors more obvious.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/1529
> Reported-by: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> 
> This dependency on certain toolchain flags should probably be moved into
> Kconfig at some point so that users cannot select configurations that
> they do not have support for so that their builds do not error. However,
> from a brief survey, there is not a clean way to codify these
> dependencies at the moment because the CPU configs are selected by the
> individual machines that implement them, meaning that the dependencies
> would need to be added to all the machine configs (as 'select ...'
> overrides 'depends on ...'), which is outside the scope of this patch.
> Furthermore, one could argue that it is better for the user to get a big
> error when they are missing support for something, rather than the
> configs getting disabled silently, especially if they are critical to
> the machine.
> 
>  arch/mips/loongson2ef/Platform | 19 ++++---------------
>  1 file changed, 4 insertions(+), 15 deletions(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

      reply	other threads:[~2021-12-09  9:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 17:59 [PATCH] MIPS: Loongson2ef: Remove unnecessary {as,cc}-option calls Nathan Chancellor
2021-12-09  9:30 ` Thomas Bogendoerfer [this message]

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=20211209093050.GB7077@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=ryutaroh@ict.e.titech.ac.jp \
    /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