public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] net: Handle disabling of compilation for SPL builds
@ 2020-01-27 12:40 Nathan Rossi
  2020-01-27 16:51 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Rossi @ 2020-01-27 12:40 UTC (permalink / raw)
  To: u-boot

Whilst the net/ directory is excluded from libs-y when
CONFIG_SPL_NET_SUPPORT is disabled, this does not prevent SPL builds
trying to compile net/ objects. During SPL builds overwrite the value of
CONFIG_NET with CONFIG_SPL_NET_SUPPORT to exclude compilation during SPL
builds.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 net/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/Makefile b/net/Makefile
index fef71b940a..0f57244015 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -5,6 +5,10 @@
 
 #ccflags-y += -DDEBUG
 
+ifdef CONFIG_SPL_BUILD
+CONFIG_NET = $(CONFIG_SPL_NET_SUPPORT)
+endif
+
 obj-$(CONFIG_NET)      += arp.o
 obj-$(CONFIG_CMD_BOOTP) += bootp.o
 obj-$(CONFIG_CMD_CDP)  += cdp.o
---
2.24.1

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

* [PATCH] net: Handle disabling of compilation for SPL builds
  2020-01-27 12:40 [PATCH] net: Handle disabling of compilation for SPL builds Nathan Rossi
@ 2020-01-27 16:51 ` Tom Rini
  2020-01-28  7:51   ` Nathan Rossi
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2020-01-27 16:51 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 27, 2020 at 12:40:17PM +0000, Nathan Rossi wrote:

> Whilst the net/ directory is excluded from libs-y when
> CONFIG_SPL_NET_SUPPORT is disabled, this does not prevent SPL builds
> trying to compile net/ objects. During SPL builds overwrite the value of
> CONFIG_NET with CONFIG_SPL_NET_SUPPORT to exclude compilation during SPL
> builds.
> 
> Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
> ---
>  net/Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/net/Makefile b/net/Makefile
> index fef71b940a..0f57244015 100644
> --- a/net/Makefile
> +++ b/net/Makefile
> @@ -5,6 +5,10 @@
>  
>  #ccflags-y += -DDEBUG
>  
> +ifdef CONFIG_SPL_BUILD
> +CONFIG_NET = $(CONFIG_SPL_NET_SUPPORT)
> +endif
> +
>  obj-$(CONFIG_NET)      += arp.o
>  obj-$(CONFIG_CMD_BOOTP) += bootp.o
>  obj-$(CONFIG_CMD_CDP)  += cdp.o

This needs to be fixed the same way we have in other cases and that is
for CONFIG_SPL_NET_SUPPORT to become CONFIG_SPL_NET and then Makefiles
use 'obj-$(CONFIG_$(SPL_)NET) += ...' and so forth.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200127/fbd55d6a/attachment.sig>

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

* [PATCH] net: Handle disabling of compilation for SPL builds
  2020-01-27 16:51 ` Tom Rini
@ 2020-01-28  7:51   ` Nathan Rossi
  0 siblings, 0 replies; 3+ messages in thread
From: Nathan Rossi @ 2020-01-28  7:51 UTC (permalink / raw)
  To: u-boot

On Tue, 28 Jan 2020 at 02:51, Tom Rini <trini@konsulko.com> wrote:
>
> On Mon, Jan 27, 2020 at 12:40:17PM +0000, Nathan Rossi wrote:
>
> > Whilst the net/ directory is excluded from libs-y when
> > CONFIG_SPL_NET_SUPPORT is disabled, this does not prevent SPL builds
> > trying to compile net/ objects. During SPL builds overwrite the value of
> > CONFIG_NET with CONFIG_SPL_NET_SUPPORT to exclude compilation during SPL
> > builds.
> >
> > Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
> > ---
> >  net/Makefile | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/net/Makefile b/net/Makefile
> > index fef71b940a..0f57244015 100644
> > --- a/net/Makefile
> > +++ b/net/Makefile
> > @@ -5,6 +5,10 @@
> >
> >  #ccflags-y += -DDEBUG
> >
> > +ifdef CONFIG_SPL_BUILD
> > +CONFIG_NET = $(CONFIG_SPL_NET_SUPPORT)
> > +endif
> > +
> >  obj-$(CONFIG_NET)      += arp.o
> >  obj-$(CONFIG_CMD_BOOTP) += bootp.o
> >  obj-$(CONFIG_CMD_CDP)  += cdp.o
>
> This needs to be fixed the same way we have in other cases and that is
> for CONFIG_SPL_NET_SUPPORT to become CONFIG_SPL_NET and then Makefiles
> use 'obj-$(CONFIG_$(SPL_)NET) += ...' and so forth.  Thanks!

Will do, new series incoming.

Thanks,
Nathan

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

end of thread, other threads:[~2020-01-28  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-27 12:40 [PATCH] net: Handle disabling of compilation for SPL builds Nathan Rossi
2020-01-27 16:51 ` Tom Rini
2020-01-28  7:51   ` Nathan Rossi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox