Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile.uk: Condition behavior on Kconfig #54

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
12 changes: 8 additions & 4 deletions Makefile.uk
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@
# Please refer to ./arch/Makefile.rules for more details.
# For this version of Musl the size of "struct pthread" is 200.
################################################################################
ifeq ($(CONFIG_LIBMUSL),y)
$(eval $(call ukarch_tls_tcb_reserve,200))
endif

################################################################################
# On aarch64, newer versions of musl no longer expect a 16-byte reserved block
# at the end of the TCB. See: https://www.openwall.com/lists/musl/2018/06/01/14
################################################################################
ifeq ($(CONFIG_LIBMUSL),y)
ifeq (arm64,$(CONFIG_UK_ARCH))
$(eval $(call aarch64_no_reserved_tcb_overlap))
endif
endif

################################################################################
# Library registration
Expand Down Expand Up @@ -94,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 @@ -155,8 +159,8 @@ LIBMUSL_ASFLAGS-y += -Wno-unused-command-line-argument
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