mirror of https://github.com/wolfSSL/wolfBoot.git
Fixed build errors with cross-clang compiler
parent
a910645309
commit
19d562dbde
2
Makefile
2
Makefile
|
|
@ -180,7 +180,7 @@ CFLAGS+=$(WOLFPSA_CFLAGS)
|
|||
|
||||
# Setup default optimizations (for GCC)
|
||||
ifeq ($(USE_GCC_HEADLESS),1)
|
||||
CFLAGS+=-Wall -Wextra -Wno-main -ffreestanding -nostartfiles
|
||||
CFLAGS+=-Wall -Wextra -Wno-main -ffreestanding
|
||||
CFLAGS+=-ffunction-sections -fdata-sections -fomit-frame-pointer
|
||||
# Allow unused parameters and functions
|
||||
CFLAGS+=-Wno-unused-parameter -Wno-unused-function
|
||||
|
|
|
|||
8
arch.mk
8
arch.mk
|
|
@ -134,8 +134,12 @@ endif
|
|||
ifeq ($(ARCH),ARM)
|
||||
CROSS_COMPILE?=arm-none-eabi-
|
||||
CFLAGS+=-DARCH_ARM
|
||||
CFLAGS+=-mthumb -mlittle-endian -mthumb-interwork
|
||||
LDFLAGS+=-mthumb -mlittle-endian -mthumb-interwork
|
||||
CFLAGS+=-mthumb -mlittle-endian
|
||||
LDFLAGS+=-mthumb -mlittle-endian
|
||||
ifeq ($(USE_GCC),1)
|
||||
CFLAGS+=-mthumb-interwork
|
||||
LDFLAGS+=-mthumb-interwork
|
||||
endif
|
||||
|
||||
## Target specific configuration
|
||||
ifeq ($(TARGET),samr21)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,11 @@ extern "C" {
|
|||
#ifndef RAMFUNCTION
|
||||
# if defined(__WOLFBOOT) && defined(RAM_CODE)
|
||||
# if defined(ARCH_ARM)
|
||||
# define RAMFUNCTION __attribute__((used,section(".ramcode"),long_call))
|
||||
# if defined(__clang__)
|
||||
# define RAMFUNCTION __attribute__((used,section(".ramcode")))
|
||||
# else
|
||||
# define RAMFUNCTION __attribute__((used,section(".ramcode"),long_call))
|
||||
# endif
|
||||
# elif defined(ARCH_PPC)
|
||||
# define RAMFUNCTION __attribute__((used,section(".ramcode"),longcall))
|
||||
# else
|
||||
|
|
|
|||
|
|
@ -1030,9 +1030,11 @@ CFLAGS+=$(CFLAGS_EXTRA)
|
|||
OBJS+=$(OBJS_EXTRA)
|
||||
|
||||
ifeq ($(USE_GCC_HEADLESS),1)
|
||||
ifneq ($(ARCH),RENESAS_RX)
|
||||
ifneq ($(ARCH),AURIX_TC3)
|
||||
CFLAGS+="-Wstack-usage=$(STACK_USAGE)"
|
||||
ifeq ($(USE_GCC),1)
|
||||
ifneq ($(ARCH),RENESAS_RX)
|
||||
ifneq ($(ARCH),AURIX_TC3)
|
||||
CFLAGS+="-Wstack-usage=$(STACK_USAGE)"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -754,7 +754,7 @@ out:
|
|||
|
||||
|
||||
#ifdef WOLFBOOT_ARMORED
|
||||
# ifdef __GNUC__
|
||||
# if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC push_options
|
||||
# pragma GCC optimize("O0")
|
||||
# elif defined(__IAR_SYSTEMS_ICC__)
|
||||
|
|
@ -1474,7 +1474,7 @@ void RAMFUNCTION wolfBoot_start(void)
|
|||
}
|
||||
|
||||
#ifdef WOLFBOOT_ARMORED
|
||||
# ifdef __GNUC__
|
||||
# if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC pop_options
|
||||
# elif defined(__IAR_SYSTEMS_ICC__)
|
||||
# pragma optimize=default
|
||||
|
|
|
|||
Loading…
Reference in New Issue