linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] kbuild: avoid unrecognized option error for external DTC
       [not found] <1488174052-2530-1-git-send-email-yamada.masahiro@socionext.com>
@ 2017-02-27 14:06 ` Ben Hutchings
  2017-02-28 10:21   ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2017-02-27 14:06 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: Alessio Igor Bogani, Arnd Bergmann, Rob Herring, linux-c6x-dev,
	Michal Simek, Nicolas Pitre, Marcin Nowakowski, devicetree,
	Stefan Kristiansson, Michal Marek, Scott Wood,
	Benjamin Herrenschmidt, linuxppc-dev, Paul Mackerras, openrisc,
	Mark Salter, Stafford Horne, Aurelien Jacquiot, Jonas Bonn,
	Michael Ellerman, linux-kernel, Oliver O'Halloran,
	Mark Rutland, Emese Revfy

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] kbuild: avoid unrecognized option error for external DTC
  2017-02-27 14:06 ` [PATCH] kbuild: avoid unrecognized option error for external DTC Ben Hutchings
@ 2017-02-28 10:21   ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-02-28 10:21 UTC (permalink / raw)
  To: Ben Hutchings, Masahiro Yamada, linux-kbuild
  Cc: Alessio Igor Bogani, Arnd Bergmann, Rob Herring, linux-c6x-dev,
	Michal Simek, Nicolas Pitre, Marcin Nowakowski, devicetree,
	Stefan Kristiansson, Michal Marek, Scott Wood,
	Benjamin Herrenschmidt, linuxppc-dev, Paul Mackerras, openrisc,
	Mark Salter, Stafford Horne, Aurelien Jacquiot, Jonas Bonn,
	linux-kernel, Oliver O'Halloran, Mark Rutland, Emese Revfy

Ben Hutchings <ben@decadent.org.uk> writes:

> [ Unknown signature status ]
> 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.=C2=A0=C2=A0In th=
is
>> case, we do not know which options are supported on it.
>>=20
>> 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.
>>=20
>> 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?

+1

That's a lot of added complexity, when the answer could just be "use the
kernel dtc".

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-28 10:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1488174052-2530-1-git-send-email-yamada.masahiro@socionext.com>
2017-02-27 14:06 ` [PATCH] kbuild: avoid unrecognized option error for external DTC Ben Hutchings
2017-02-28 10:21   ` Michael Ellerman

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).