Skip to content

Commit

Permalink
Makefile.uk: Condition header inclusion on Kconfig
Browse files Browse the repository at this point in the history
Previously musl would add its headers to the include path
unconditionally when its Makefile would be included.
This change conditions this inclusion on whether musl is enabled via
Kconfig.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
  • Loading branch information
andreittr committed Jul 19, 2023
1 parent 23bddf1 commit 376966a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ LIBMUSL_CINCLUDES-y += $$(LIBMUSL_$(call uc,$(1))_INCLUDES-y)
LIBMUSL_CXXINCLUDES-y += $$(LIBMUSL_$(call uc,$(1))_INCLUDES-y)

# includes for using libmusl
CINCLUDES-y += -I$(LIBMUSL_BUILD)/include/$(1)/include
CXXINCLUDES-y += -I$(LIBMUSL_BUILD)/include/$(1)/include
CINCLUDES-$(CONFIG_LIBMUSL) += -I$(LIBMUSL_BUILD)/include/$(1)/include
CXXINCLUDES-$(CONFIG_LIBMUSL) += -I$(LIBMUSL_BUILD)/include/$(1)/include

# Append the sub library directory to the include path
$(LIBMUSL_BUILD)/.prepared: $(subst $(LIBMUSL),$(LIBMUSL_BUILD)/include/$(1),$(2))
Expand Down
8 changes: 4 additions & 4 deletions Makefile.uk
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ LIBMUSL_COMPFLAGS-y += -I$(LIBMUSL)/arch/$(MUSL_ARCH)
LIBMUSL_COMPFLAGS-y += -I$(LIBMUSL)/src/include
LIBMUSL_COMPFLAGS-y += -I$(LIBMUSL)/src/internal

CINCLUDES-y += $(LIBMUSL_GLOBAL_INCLUDES-y)
CXXINCLUDES-y += $(LIBMUSL_GLOBAL_INCLUDES-y)
CINCLUDES-$(CONFIG_LIBMUSL) += $(LIBMUSL_GLOBAL_INCLUDES-y)
CXXINCLUDES-$(CONFIG_LIBMUSL) += $(LIBMUSL_GLOBAL_INCLUDES-y)

################################################################################
# Musl-specific Targets
Expand Down Expand Up @@ -154,8 +154,8 @@ LIBMUSL_CFLAGS-y += $(LIBMUSL_HDRS_FLAGS-y)
LIBMUSL_CFLAGS-y += -ffreestanding

# We globally switch off warnings that are caused by musl's public headers
CFLAGS += $(LIBMUSL_HDRS_FLAGS-y)
CXXFLAGS += $(LIBMUSL_HDRS_FLAGS-y)
CFLAGS-$(CONFIG_LIBMUSL) += $(LIBMUSL_HDRS_FLAGS-y)
CXXFLAGS-$(CONFIG_LIBMUSL) += $(LIBMUSL_HDRS_FLAGS-y)

################################################################################
# OS dependencies code - Glue between Unicore and musl
Expand Down

0 comments on commit 376966a

Please sign in to comment.