public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-kbuild@vger.kernel.org
Cc: Alessio Igor Bogani <alessio.bogani@elettra.eu>,
	Arnd Bergmann <arnd@arndb.de>, Rob Herring <robh+dt@kernel.org>,
	linux-c6x-dev@linux-c6x.org, Michal Simek <monstr@monstr.eu>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Marcin Nowakowski <marcin.nowakowski@imgtec.com>,
	devicetree@vger.kernel.org,
	Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
	Michal Marek <mmarek@suse.com>, Scott Wood <oss@buserror.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linuxppc-dev@lists.ozlabs.org, Paul Mackerras <paulus@samba.org>,
	openrisc@lists.librecores.org, Mark Salter <msalter@redhat.com>,
	Stafford Horne <shorne@gmail.com>,
	Aurelien Jacquiot <a-jacquiot@ti.com>,
	Jonas Bonn <jonas@southpole.se>,
	Michael Ellerman <mpe@ellerman.id.au>,
	linux-kernel@vger.kernel.org,
	Oliver O'Halloran <oohall@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Emese Revfy <re.emese@gmail.com>
Subject: Re: [PATCH] kbuild: avoid unrecognized option error for external DTC
Date: Mon, 27 Feb 2017 14:06:56 +0000	[thread overview]
Message-ID: <1488204416.2819.9.camel@decadent.org.uk> (raw)
In-Reply-To: <1488174052-2530-1-git-send-email-yamada.masahiro@socionext.com>

[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]

On Mon, 2017-02-27 at 14:40 +0900, Masahiro Yamada wrote:
> Since commit 6b22b3d1614a ("kbuild: Allow using host dtc instead of
> kernel's copy"), it is possible to use an external dtc.  In this
> case, we do not know which options are supported on it.
> 
> Commit bc553986a2f7 ("dtc: turn off dtc unit address warnings by
> default") gives -Wno-unit_address_vs_reg, but this options is only
> recognized by v1.4.2 or later.
> 
> If an older version is specified, the build fails:

But the option to use an external dtc was intended to allow testing of
newer versions.  If there's no reason to use this option to run an
older version, why bother trying to support that?

[...]
> --- a/scripts/Kbuild.include
> +++ b/scripts/Kbuild.include
> @@ -171,6 +171,20 @@ ld-version = $(shell $(LD) --version | $(srctree)/scripts/ld-version.sh)
>  # Usage:  $(call ld-ifversion, -ge, 22252, y)
>  ld-ifversion = $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4))
>  
> +# dtc-option
> +# Usage:  DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg)
> +#
> +# When we use the external dtc, check if the desired options are supported.
> +# When we use the kernel's copy (scripts/dtc/dtc), just use the fixed option.
> +# Until Kbuild descends into the scripts/dtc/ directory, scripts/dtc/dtc may
> +# not exist, i.e. $(call try-run,...) may not work.
> +ifeq ("$(origin DTC)", "command line")
[...]

It could also be specified as an environment variable (assignment with
"?=" doesn't override them, but "=" does).

Ben.

-- 
Ben Hutchings
This sentence contradicts itself - no actually it doesn't.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-02-27 14:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27  5:40 [PATCH] kbuild: avoid unrecognized option error for external DTC Masahiro Yamada
2017-02-27 14:06 ` Ben Hutchings [this message]
2017-02-28 10:21   ` Michael Ellerman

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=1488204416.2819.9.camel@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=a-jacquiot@ti.com \
    --cc=alessio.bogani@elettra.eu \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonas@southpole.se \
    --cc=linux-c6x-dev@linux-c6x.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=marcin.nowakowski@imgtec.com \
    --cc=mark.rutland@arm.com \
    --cc=mmarek@suse.com \
    --cc=monstr@monstr.eu \
    --cc=mpe@ellerman.id.au \
    --cc=msalter@redhat.com \
    --cc=nicolas.pitre@linaro.org \
    --cc=oohall@gmail.com \
    --cc=openrisc@lists.librecores.org \
    --cc=oss@buserror.net \
    --cc=paulus@samba.org \
    --cc=re.emese@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=shorne@gmail.com \
    --cc=stefan.kristiansson@saunalahti.fi \
    --cc=yamada.masahiro@socionext.com \
    /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