diff mbox series

net: Handle disabling of compilation for SPL builds

Message ID 20200127124017.417345-1-nathan@nathanrossi.com
State New
Headers show
Series net: Handle disabling of compilation for SPL builds | expand

Commit Message

Nathan Rossi Jan. 27, 2020, 12:40 p.m. UTC
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 at nathanrossi.com>
---
 net/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

---
2.24.1

Comments

Tom Rini Jan. 27, 2020, 4:51 p.m. UTC | #1
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 at 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!
Nathan Rossi Jan. 28, 2020, 7:51 a.m. UTC | #2
On Tue, 28 Jan 2020 at 02:51, Tom Rini <trini at 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 at 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
diff mbox series

Patch

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