hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
PLATFORM_FLAVOR ?= rk3368
PLATFORM_FLAVOR_$(PLATFORM_FLAVOR) := y
 
# 32-bit flags
arm32-platform-cpuarch    := cortex-a15
arm32-platform-cflags    += -mcpu=$(arm32-platform-cpuarch) -mthumb
arm32-platform-cflags    += -pipe -mthumb-interwork -mlong-calls
arm32-platform-cflags    += -fno-short-enums -mno-apcs-float -fno-common
arm32-platform-cflags    += -mfloat-abi=soft
arm32-platform-cflags    += -mno-unaligned-access
arm32-platform-aflags    += -mcpu=$(arm32-platform-cpuarch)
arm32-platform-aflags    += -mfpu=neon
 
# 64-bit flags
arm64-platform-cflags    += -mgeneral-regs-only
arm64-platform-cflags    += -mstrict-align
 
platform-cflags += -ffunction-sections -fdata-sections
 
DEBUG        ?= 1
ifeq ($(DEBUG),1)
platform-cflags += -O0
else
platform-cflags += -Os
endif
 
platform-cflags += -g3
platform-aflags += -g3
 
ifeq ($(PLATFORM_FLAVOR),rk3368)
platform-flavor-armv8 := 1
endif
 
CFG_ARM32_user_ta := y
user_ta-platform-cflags += $(arm32-platform-cflags)
user_ta-platform-cflags += -fpie
user_ta-platform-cppflags += $(arm32-platform-cppflags)
user_ta-platform-aflags += $(arm32-platform-aflags)