newlib: fix support for x86

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
p-szafonimateusz
2024-02-22 13:08:24 +01:00
committed by Xiang Xiao
parent b14c3e1e2e
commit 5288e063ec
4 changed files with 64 additions and 2 deletions
+8
View File
@@ -39,6 +39,7 @@ newlib/newlib: $(NEWLIB_BASENAME)-$(NEWLIB_VERSION).tar.gz
$(Q) mv $(NEWLIB_BASENAME)-$(NEWLIB_VERSION) newlib/newlib
$(Q) patch -p0 < newlib/0001-newlib-libm-fix-__RCSID-build-error.patch
$(Q) patch -p0 < newlib/0002-newlib-libm-remove-include-reent.h.patch
$(Q) patch -p0 < newlib/0003-newlib-fix-compilation-for-x86.patch
$(Q) touch $@
endif
@@ -81,6 +82,13 @@ endif
CSRCS += $(wildcard newlib/newlib/newlib/libm/machine/$(ARCH)/*.c)
VPATH += :newlib/newlib/newlib/libm/machine/$(ARCH)
ifeq ($(CONFIG_ARCH_X86_64),y)
CSRCS += $(wildcard newlib/newlib/newlib/libm/fenv/*.c)
VPATH += :newlib/newlib/newlib/libm/fenv
CFLAGS += ${INCDIR_PREFIX}newlib/newlib/newlib/libc/machine/shared_x86/sys
endif
ifeq ($(CONFIG_LIBM_NEWLIB_HW_FP),y)
CSRCS += $(wildcard newlib/newlib/newlib/libm/mathfp/*.c)
VPATH += :newlib/newlib/newlib/libm/mathfp