Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@infradead.org (Christoph Hellwig)
To: linux-riscv@lists.infradead.org
Subject: [PATCH] RISC-V: Use KBUILD_CFLAGS instead of KCFLAGS when building the vDSO
Date: Thu, 5 Jul 2018 08:44:17 -0700	[thread overview]
Message-ID: <20180705154417.GB31766@infradead.org> (raw)
In-Reply-To: <20180704211056.1885-1-palmer@sifive.com>

On Wed, Jul 04, 2018 at 02:10:56PM -0700, Palmer Dabbelt wrote:
> If you use a 64-bit compiler to build a 32-bit kernel then you'll get an
> error when building the vDSO due to a library mismatch.  The happens
> because the relevant "-march" argument isn't supplied to the GCC run
> that generates one of the vDSO intermediate files.
> 
> I'm not actually sure what the right thing to do here is as I'm not
> particularly familiar with the kernel build system.  I poked the
> documentation and it appears that KCFLAGS is the correct thing to do
> (it's suggested that should be used when building modules), but we set
> KBUILD_CFLAGS in arch/riscv/Makefile.
> 
> This does at least fix the build error.

Looks good to me for now.  In the future we might want to use different
ABIs in the kernel and in userspace, at which point we'd need yet
another cflags variable.

Reviewed-by: Christoph Hellwig <hch@lst.de>

      reply	other threads:[~2018-07-05 15:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 21:10 [PATCH] RISC-V: Use KBUILD_CFLAGS instead of KCFLAGS when building the vDSO Palmer Dabbelt
2018-07-05 15:44 ` Christoph Hellwig [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=20180705154417.GB31766@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-riscv@lists.infradead.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