Просмотр исходного кода

build: if unaligned access is not supported, need to pass -mstrict-align option

Signed-off-by: Huaqi Fang <578567190@qq.com>
Huaqi Fang 1 год назад
Родитель
Сommit
7a99c82e4e
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      Build/Makefile.conf

+ 5 - 0
Build/Makefile.conf

@@ -129,6 +129,11 @@ endif
 include $(NUCLEI_SDK_BUILD)/Makefile.toolchain
 
 COMMON_FLAGS += -g -fno-common
+
+# For Nuclei N200/NS200 series CPU, unaligned access feature is configurable, if this feature is not enabled
+# then unaligned access is not supported, so we must pass -mstrict-align, see https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html
+#COMMON_FLAGS += -mstrict-align
+
 # Recommend to disable strict aliasing to avoid unexpected optimization, linux enabled it https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg01647.html
 #COMMON_FLAGS += -fno-strict-aliasing