| Makefile (40d02efad9801c1277b092c83f6471a31e77c59b) | Makefile (1631ba1259d6d7f49b6028f2a1a0fa02be1c522a) |
|---|---|
| 1# This file is included by the global makefile so that you can add your own 2# architecture-specific flags and dependencies. 3# 4# This file is subject to the terms and conditions of the GNU General Public 5# License. See the file "COPYING" in the main directory of this archive 6# for more details. 7# 8 --- 42 unchanged lines hidden (view full) --- 51riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd 52riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c 53 54# Newer binutils versions default to ISA spec version 20191213 which moves some 55# instructions from the I extension to the Zicsr and Zifencei extensions. 56toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(riscv-march-y)_zicsr_zifencei) 57riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei 58 | 1# This file is included by the global makefile so that you can add your own 2# architecture-specific flags and dependencies. 3# 4# This file is subject to the terms and conditions of the GNU General Public 5# License. See the file "COPYING" in the main directory of this archive 6# for more details. 7# 8 --- 42 unchanged lines hidden (view full) --- 51riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd 52riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c 53 54# Newer binutils versions default to ISA spec version 20191213 which moves some 55# instructions from the I extension to the Zicsr and Zifencei extensions. 56toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(riscv-march-y)_zicsr_zifencei) 57riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei 58 |
| 59# Check if the toolchain supports Zicbom extension 60toolchain-supports-zicbom := $(call cc-option-yn, -march=$(riscv-march-y)_zicbom) 61riscv-march-$(toolchain-supports-zicbom) := $(riscv-march-y)_zicbom 62 |
|
| 59KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y)) 60KBUILD_AFLAGS += -march=$(riscv-march-y) 61 62KBUILD_CFLAGS += -mno-save-restore 63KBUILD_CFLAGS += -DCONFIG_PAGE_OFFSET=$(CONFIG_PAGE_OFFSET) 64 65ifeq ($(CONFIG_CMODEL_MEDLOW),y) 66 KBUILD_CFLAGS += -mcmodel=medlow 67endif 68ifeq ($(CONFIG_CMODEL_MEDANY),y) 69 KBUILD_CFLAGS += -mcmodel=medany 70endif 71ifeq ($(CONFIG_PERF_EVENTS),y) 72 KBUILD_CFLAGS += -fno-omit-frame-pointer 73endif 74 75KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax) | 63KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y)) 64KBUILD_AFLAGS += -march=$(riscv-march-y) 65 66KBUILD_CFLAGS += -mno-save-restore 67KBUILD_CFLAGS += -DCONFIG_PAGE_OFFSET=$(CONFIG_PAGE_OFFSET) 68 69ifeq ($(CONFIG_CMODEL_MEDLOW),y) 70 KBUILD_CFLAGS += -mcmodel=medlow 71endif 72ifeq ($(CONFIG_CMODEL_MEDANY),y) 73 KBUILD_CFLAGS += -mcmodel=medany 74endif 75ifeq ($(CONFIG_PERF_EVENTS),y) 76 KBUILD_CFLAGS += -fno-omit-frame-pointer 77endif 78 79KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax) |
| 76KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax) | |
| 77 78# GCC versions that support the "-mstrict-align" option default to allowing 79# unaligned accesses. While unaligned accesses are explicitly allowed in the 80# RISC-V ISA, they're emulated by machine mode traps on all extant 81# architectures. It's faster to have GCC emit only aligned accesses. 82KBUILD_CFLAGS += $(call cc-option,-mstrict-align) 83 84ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y) --- 78 unchanged lines hidden --- | 80 81# GCC versions that support the "-mstrict-align" option default to allowing 82# unaligned accesses. While unaligned accesses are explicitly allowed in the 83# RISC-V ISA, they're emulated by machine mode traps on all extant 84# architectures. It's faster to have GCC emit only aligned accesses. 85KBUILD_CFLAGS += $(call cc-option,-mstrict-align) 86 87ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y) --- 78 unchanged lines hidden --- |