xref: /xnu-11417.140.69/osfmk/conf/Makefile.x86_64 (revision 43a90889846e00bfb5cf1d255cdc0a701a1e05a4) !
1######################################################################
2#BEGIN	Machine dependent Makefile fragment for x86_64
3######################################################################
4
5CWARNFLAGS = $(CWARNFLAGS_STD) -Wno-atomic-implicit-seq-cst
6
7# Files that must go in the __HIB segment:
8UNCONFIGURED_HIB_FILES=					\
9           WKdmDecompress_new.o         \
10           WKdmData_new.o               \
11           hibernate_restore.o          \
12           bcopy.o			\
13           bzero.o
14
15HIB_FILES=$(filter $(UNCONFIGURED_HIB_FILES),$(OBJS))
16
17# Unconfigured __HIB files must be Mach-O for "setsegname"
18WKdmDecompress_new.o_CFLAGS_ADD += -fno-stack-protector -fno-stack-check $(CFLAGS_NOLTO_FLAG)
19WKdmData_new.o_CFLAGS_ADD += -fno-stack-protector -fno-stack-check $(CFLAGS_NOLTO_FLAG)
20hibernate_restore.o_CFLAGS_ADD += -fno-stack-protector -fno-stack-check $(CFLAGS_NOLTO_FLAG)
21bcopy.o_CFLAGS_ADD += -fno-stack-protector -fno-stack-check $(CFLAGS_NOLTO_FLAG)
22bzero.o_CFLAGS_ADD += -fno-stack-protector -fno-stack-check $(CFLAGS_NOLTO_FLAG)
23fp_simd.o_SFLAGS_ADD += -mavx512f
24
25# Profiling information and code coverage must be disabled for __HIB files (see rdar://104951137)
26WKdmDecompress_new.o_CFLAGS_ADD += -fno-profile-instr-generate -fno-coverage-mapping
27WKdmData_new.o_CFLAGS_ADD += -fno-profile-instr-generate -fno-coverage-mapping
28hibernate_restore.o_CFLAGS_ADD += -fno-profile-instr-generate -fno-coverage-mapping
29bcopy.o_CFLAGS_ADD += -fno-profile-instr-generate -fno-coverage-mapping
30bzero.o_CFLAGS_ADD += -fno-profile-instr-generate -fno-coverage-mapping
31
32# To appear at the beginning of the __HIB segment, emit
33# as Mach-O so that the linker can enforce symbol order
34boot_pt.o_CFLAGS_ADD += $(CFLAGS_NOLTO_FLAG)
35
36# fast path lock C leaf functions must be built without stack frames
37locks_i386_opt.o_CFLAGS_ADD += -momit-leaf-frame-pointer -O2
38ifeq ($(KASAN),1)
39# rdar://92180818: the fakestack implementation uses ticket locks
40# so we need to disable stack use-after-return checks, to avoid deadlocks.
41lock_ticket.o_CFLAGS_ADD += -fsanitize-address-use-after-return=never
42endif
43
44######################################################################
45#END	Machine dependent Makefile fragment for x86_64
46######################################################################
47