Skip to content

Commit

Permalink
build: fix CONFIG_LWIP usage
Browse files Browse the repository at this point in the history
As reported in #2 CONFIG_LWIP in stub.mk wasn't properly implemented.
This patch fixes CONFIG_LWIP flag and let us remove lwip from the
build. This will lead to smaller images sizes and less compilation
times.

Signed-off-by: Joao Martins <[email protected]>
  • Loading branch information
jpemartins committed Oct 1, 2014
1 parent 1fcf4db commit 924e55c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stub.mk
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ MINIOS_OBJS0-y := \
hypervisor.o \
kernel.o \
lock.o \
lwip-arch.o \
lwip-net.o \
main.o \
math.o \
mm.o \
Expand All @@ -159,6 +157,7 @@ MINIOS_OBJS0-y := \
sys.o \
xencons_ring.o \
xmalloc.o
MINIOS_OBJS0-$(CONFIG_LWIP) += lwip-arch.o lwip-net.o

This comment has been minimized.

Copy link
@fmanco

fmanco Feb 16, 2015

Contributor

Split one per line to keep consistency.

This comment has been minimized.

Copy link
@jpemartins

jpemartins May 6, 2015

Author Contributor

Ok. Will change that and update the PR

MINIOS_OBJS0-$(CONFIG_XENBUS) += xenbus.o
MINIOS_OBJS0-$(CONFIG_XENBUS) += xs.o
MINIOS_OBJS0-$(CONFIG_BLKFRONT) += blkfront.o
Expand All @@ -169,6 +168,7 @@ MINIOS_OBJS0-$(CONFIG_FBFRONT) += fbfront.o
MINIOS_OBJS0-$(CONFIG_PCIFRONT) += pcifront.o
MINIOS_OBJS0-$(CONFIG_CONSFRONT) += xencons_bus.o
MINIOS_OBJS0-$(CONFIG_NETFRONT) += netfront.o
MINIOS_OPT_FLAGS-$(CONFIG_LWIP) += -DCONFIG_LWIP
MINIOS_OPT_FLAGS-$(CONFIG_START_NETWORK) += -DCONFIG_START_NETWORK
MINIOS_OPT_FLAGS-$(CONFIG_SPARSE_BSS) += -DCONFIG_SPARSE_BSS
MINIOS_OPT_FLAGS-$(CONFIG_QEMU_XS_ARGS) += -DCONFIG_QEMU_XS_ARGS
Expand Down Expand Up @@ -387,6 +387,8 @@ distclean-lwip:

else

CINCLUDES += -isystem $(LWIP_ROOT)/include/lwip

This comment has been minimized.

Copy link
@fmanco

fmanco Feb 16, 2015

Contributor

Is this necessary? We shouldn't include lwip headers when compiling without lwip.

Actually this else should be removed, but that should be done in a later PR.

This comment has been minimized.

Copy link
@jpemartins

jpemartins May 6, 2015

Author Contributor

My first approach was to begin with not compilling lwip, for starters, and on a later PR remove it completely from the build. The reason I included the headers is that it defines a ton POSIX data structures like struct sockaddr and in_addr.

CINCLUDES += -isystem $(LWIP_ROOT)/include/lwip/ipv4
MINIOS_LWIP_LIB :=
MINIOS_LWIP_OBJS :=

Expand Down

0 comments on commit 924e55c

Please sign in to comment.