|
|
@ -3,7 +3,7 @@ |
|
|
|
CC ?= clang |
|
|
|
NM ?= $(patsubst %clang,%llvm-nm,$(filter-out ccache sccache,$(CC))) |
|
|
|
AR ?= $(patsubst %clang,%llvm-ar,$(filter-out ccache sccache,$(CC))) |
|
|
|
EXTRA_CFLAGS ?= -mbulk-memory -O2 -DNDEBUG |
|
|
|
EXTRA_CFLAGS ?= -O2 -DNDEBUG |
|
|
|
# The directory where we build the sysroot.
|
|
|
|
SYSROOT ?= $(CURDIR)/sysroot |
|
|
|
# A directory to install to for "make install".
|
|
|
@ -178,6 +178,10 @@ MUSL_PRINTSCAN_SOURCES = \ |
|
|
|
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdio/vfscanf.c \
|
|
|
|
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdlib/strtod.c \
|
|
|
|
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdlib/wcstod.c |
|
|
|
BULK_MEMORY_SOURCES = \
|
|
|
|
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/string/memcpy.c \
|
|
|
|
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/string/memmove.c \
|
|
|
|
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/string/memset.c |
|
|
|
LIBC_TOP_HALF_HEADERS_PRIVATE = $(LIBC_TOP_HALF_DIR)/headers/private |
|
|
|
LIBC_TOP_HALF_SOURCES = $(LIBC_TOP_HALF_DIR)/sources |
|
|
|
LIBC_TOP_HALF_ALL_SOURCES = \
|
|
|
@ -206,7 +210,7 @@ CFLAGS += -Wall -Wextra -Werror \ |
|
|
|
|
|
|
|
# Configure support for threads.
|
|
|
|
ifeq ($(THREAD_MODEL), single) |
|
|
|
CFLAGS += -mthread-model single -ftls-model=local-exec |
|
|
|
CFLAGS += -mthread-model single |
|
|
|
endif |
|
|
|
ifeq ($(THREAD_MODEL), posix) |
|
|
|
CFLAGS += -mthread-model posix -pthread |
|
|
@ -248,6 +252,7 @@ endif |
|
|
|
MUSL_PRINTSCAN_OBJS = $(call objs,$(MUSL_PRINTSCAN_SOURCES)) |
|
|
|
MUSL_PRINTSCAN_LONG_DOUBLE_OBJS = $(patsubst %.o,%.long-double.o,$(MUSL_PRINTSCAN_OBJS)) |
|
|
|
MUSL_PRINTSCAN_NO_FLOATING_POINT_OBJS = $(patsubst %.o,%.no-floating-point.o,$(MUSL_PRINTSCAN_OBJS)) |
|
|
|
BULK_MEMORY_OBJS = $(call objs,$(BULK_MEMORY_SOURCES)) |
|
|
|
LIBWASI_EMULATED_MMAN_OBJS = $(call objs,$(LIBWASI_EMULATED_MMAN_SOURCES)) |
|
|
|
LIBWASI_EMULATED_PROCESS_CLOCKS_OBJS = $(call objs,$(LIBWASI_EMULATED_PROCESS_CLOCKS_SOURCES)) |
|
|
|
LIBWASI_EMULATED_GETPID_OBJS = $(call objs,$(LIBWASI_EMULATED_GETPID_SOURCES)) |
|
|
@ -379,6 +384,9 @@ $(MUSL_PRINTSCAN_NO_FLOATING_POINT_OBJS): CFLAGS += \ |
|
|
|
-D__wasilibc_printscan_no_floating_point \
|
|
|
|
-D__wasilibc_printscan_floating_point_support_option="\"remove -lc-printscan-no-floating-point from the link command\"" |
|
|
|
|
|
|
|
$(BULK_MEMORY_OBJS): CFLAGS += \ |
|
|
|
-mbulk-memory |
|
|
|
|
|
|
|
$(LIBWASI_EMULATED_SIGNAL_MUSL_OBJS): CFLAGS += \ |
|
|
|
-D_WASI_EMULATED_SIGNAL |
|
|
|
|
|
|
|