stage1: un-generalize PPC specific options

pull/327/head
Marco Oliverio 2023-07-13 06:44:31 +00:00
parent 48bc97dab7
commit e562aaedd3
2 changed files with 9 additions and 7 deletions

View File

@ -44,7 +44,7 @@ size_t strlen(const char *s); /* forward declaration */
/* allow using built-in libc if WOLFBOOT_USE_STDLIBC is defined */
#ifndef WOLFBOOT_USE_STDLIBC
#if !defined(BUILD_LOADER_STAGE1) || \
#if !(defined(BUILD_LOADER_STAGE1) && defined(ARCH_PPC)) || \
(defined(PRINTF_ENABLED) && defined(DEBUG_UART))
int islower(int c)
@ -228,7 +228,7 @@ int memcmp(const void *_s1, const void *_s2, size_t n)
#endif /* !BUILD_LOADER_STAGE1 || (PRINTF_ENABLED && DEBUG_UART) */
#if !defined(__CCRX__) /* Renesas CCRX */
#if !defined(BUILD_LOADER_STAGE1) || defined(DEBUG_UART)
#if !(defined(BUILD_LOADER_STAGE1) && defined(ARCH_PPC)) || defined(DEBUG_UART)
size_t strlen(const char *s)
{
size_t i = 0;

View File

@ -21,14 +21,15 @@ V?=0
DEBUG?=0
DEBUG_UART?=0
ifeq ($(ARCH),PPC)
OBJS:= \
./hal/$(TARGET).o \
./src/string.o \
loader_stage1.o
endif
WOLFCRYPT_OBJS:=
PUBLIC_KEY_OBJS:=
# Forcefully disable TPM support in first stage loader
WOLFTPM=0
ELF=0
@ -72,10 +73,11 @@ CFLAGS+=\
-DWOLFBOOT_STAGE1_BASE_ADDR=$(WOLFBOOT_STAGE1_BASE_ADDR)
# For printf support (disable NO_PRINTF_UART) and increase WOLFBOOT_STAGE1_SIZE
CFLAGS+=-DNO_PRINTF_UART
# Use PIC (Position Independent Code) for first stage loader
CFLAGS+=-fPIC
ifeq ($(ARCH),PPC)
CFLAGS+=-DNO_PRINTF_UART
# Use PIC (Position Independent Code) for first stage loader
CFLAGS+=-fPIC
endif
BUILD_DIR=.