162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci# __restore_processor_state() restores %gs after S3 resume and so should not
462306a36Sopenharmony_ci# itself be stack-protected
562306a36Sopenharmony_ciCFLAGS_cpu.o	:= -fno-stack-protector
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci# Clang may incorrectly inline functions with stack protector enabled into
862306a36Sopenharmony_ci# __restore_processor_state(): https://bugs.llvm.org/show_bug.cgi?id=47479
962306a36Sopenharmony_ciCFLAGS_REMOVE_cpu.o := $(CC_FLAGS_LTO)
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciobj-$(CONFIG_PM_SLEEP)		+= cpu.o
1262306a36Sopenharmony_ciobj-$(CONFIG_HIBERNATION)	+= hibernate_$(BITS).o hibernate_asm_$(BITS).o hibernate.o
13