Set newlib as the default library

This commit is contained in:
kkitayam 2021-03-27 22:20:15 +09:00
parent 86dab3f7e9
commit 4c832a9195
1 changed files with 5 additions and 4 deletions

View File

@ -10,22 +10,23 @@ CFLAGS += \
# Cross Compiler for RX # Cross Compiler for RX
CROSS_COMPILE = rx-elf- CROSS_COMPILE = rx-elf-
RX_NEWLIB ?= 1
ifeq ($(CMDEXE),1) ifeq ($(CMDEXE),1)
OPTLIBINC="$(shell for /F "usebackq delims=" %%i in (`where rx-elf-gcc`) do echo %%~dpi..\rx-elf\optlibinc)" OPTLIBINC="$(shell for /F "usebackq delims=" %%i in (`where rx-elf-gcc`) do echo %%~dpi..\rx-elf\optlibinc)"
else else
OPTLIBINC=$(shell dirname `which rx-elf-gcc`)../rx-elf/optlibinc OPTLIBINC=$(shell dirname `which rx-elf-gcc`)../rx-elf/optlibinc
endif endif
ifeq ($(RX_NEWLIB),0) ifeq ($(RX_NEWLIB),1)
CFLAGS += -DSSIZE_MAX=__INT_MAX__
else
# setup for optlib # setup for optlib
CFLAGS += -nostdinc \ CFLAGS += -nostdinc \
-isystem $(OPTLIBINC) \ -isystem $(OPTLIBINC) \
-DLWIP_NO_INTTYPES_H -DLWIP_NO_INTTYPES_H
LIBS += -loptc -loptm LIBS += -loptc -loptm
else
# setup for newlib
LIBS += -lm
endif endif
MCU_DIR = hw/mcu/renesas/rx63n MCU_DIR = hw/mcu/renesas/rx63n