1# Copyright (C) 2023 Huawei Technologies Co., Ltd. 2# Licensed under the Mulan PSL v2. 3# You can use this software according to the terms and conditions of the Mulan 4# PSL v2. 5# You may obtain a copy of Mulan PSL v2 at: 6# http://license.coscl.org.cn/MulanPSL2 7# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY 8# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO 9# NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 10# See the Mulan PSL v2 for more details. 11 12# config for security features . 13 14ifeq ($(ENABLE_BTI), y) 15 CFLAGS += -mbranch-protection=bti 16 LDFLAGS += -z force-bti 17endif 18ifeq ($(ENABLE_PAC), y) 19 CFLAGS += -mbranch-protection=pac-ret+leaf+b-key 20endif