]> git.saurik.com Git - apple/xnu.git/blob - osfmk/conf/Makefile.arm64
fab485b6071c8420b7abe7456b5e64ef8fff7890
[apple/xnu.git] / osfmk / conf / Makefile.arm64
1 ######################################################################
2 #BEGIN Machine dependent Makefile fragment for arm64
3 ######################################################################
4
5 CWARNFLAGS = $(CWARNFLAGS_STD) -Wshorten-64-to-32
6
7 # Files that must go in the __HIB segment:
8 UNCONFIGURED_HIB_FILES= \
9 hibernate_restore.o \
10 bcopy.o \
11 bzero.o \
12 cc_clear.o \
13 ccdigest_init.o \
14 ccdigest_update.o \
15 ccdigest_final_64be.o \
16 cchmac.o \
17 cchmac_init.o \
18 cchmac_update.o \
19 cchmac_final.o \
20 ccsha256_K.o \
21 ccsha256_initial_state.o \
22 sha256_compress_arm64.o \
23 memset_s.o
24
25
26 HIB_FILES=$(filter $(UNCONFIGURED_HIB_FILES),$(OBJS))
27
28 define ADD_HIB_CFLAGS
29 # Unconfigured __HIB files must be Mach-O for "setsegname"
30 $(1)_CFLAGS_ADD += $(CFLAGS_NOLTO_FLAG)
31 # KASAN must be disabled for unconfigured __HIB files
32 # because the kasan runtime isn't available during hibernation resume
33 $(1)_CFLAGS_ADD += -fno-sanitize=address -UKASAN
34 # Stack protector and stack check must be disabled because the stack protector runtime isn't available
35 $(1)_CFLAGS_ADD += -fno-stack-protector -fno-stack-check
36 endef
37
38 $(foreach FILE,$(UNCONFIGURED_HIB_FILES),$(eval $(call ADD_HIB_CFLAGS,$(FILE))))
39
40 # hibernate_restore.o uses function pointers but the signing keys aren't set up yet,
41 # so compile this file with no ptrauth
42 hibernate_restore.o_CFLAGS_ADD += -fno-ptrauth-calls
43
44 lz4.o_CFLAGS_ADD += -fbuiltin -O3
45 vfp_state_test.o_CFLAGS_ADD += -mno-implicit-float
46
47
48 ######################################################################
49 #END Machine dependent Makefile fragment for arm64
50 ######################################################################