!300 修复不能开启硬浮点选项的问题

Merge pull request !300 from Zhaotianyu/0910fix_fpu_hard
This commit is contained in:
openharmony_ci 2021-09-10 23:07:44 +00:00 committed by Gitee
commit eebd5f16d3
7 changed files with 33 additions and 24 deletions

View File

@ -29,9 +29,17 @@
import("config.gni")
LITEOS_LOS_CONFIG_H = rebase_path("$LITEOSTOPDIR/kernel/include/los_config.h")
config("los_config") {
cflags = [ "-Werror" ]
asmflags = [
"-DCLZ=CLZ",
"-imacros",
"$LITEOS_LOS_CONFIG_H",
]
include_dirs = [
"//kernel/liteos_m/kernel/include",
"//kernel/liteos_m/kernel/arch/include",

View File

@ -31,7 +31,6 @@
#include "los_cppsupport.h"
typedef VOID (*InitFunc)(VOID);
INT32 LOS_CppSystemInit(UINTPTR initArrayStart, UINTPTR initArrayEnd)
@ -39,12 +38,10 @@ INT32 LOS_CppSystemInit(UINTPTR initArrayStart, UINTPTR initArrayEnd)
UINTPTR *start;
InitFunc initFunc = NULL;
for (start = (UINTPTR *)initArrayStart; start < (UINTPTR *)initArrayEnd; start++){
for (start = (UINTPTR *)initArrayStart; start < (UINTPTR *)initArrayEnd; start++) {
initFunc = (InitFunc)(*start);
initFunc();
}
return 0;
}

View File

@ -176,7 +176,7 @@ $(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
$(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
$(AS) -c $(CFLAGS) $< -o $@
$(AS) -c $(CFLAGS) $(ASFLAGS) $< -o $@
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile $(LDSCRIPT)
$(CC) $(OBJECTS) $(LDFLAGS) -o $@

View File

@ -36,9 +36,11 @@ C_INCLUDES += -I. \
-I$(LITEOSTOPDIR)/kernel/arch/include \
-I$(LITEOSTOPDIR)/kernel/arch/risc-v/nuclei/gcc
ASFLAGS += -imacros $(LITEOSTOPDIR)/kernel/include/los_config.h -DCLZ=CLZ
# list of ASM .S program objects
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASMS_SOURCES:.S=.o)))
vpath %.S $(sort $(dir $(ASMS_SOURCES)))
$(BUILD_DIR)/%.o: %.S Makefile | $(BUILD_DIR)
$(CC) -c $(CFLAGS) $< -o $@
$(CC) -c $(CFLAGS) $(ASFLAGS) $< -o $@

View File

@ -178,7 +178,7 @@ $(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
$(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
$(AS) -c $(CFLAGS) $< -o $@
$(AS) -c $(CFLAGS) $(ASFLAGS) $< -o $@
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile $(LDSCRIPT)
$(CC) $(OBJECTS) $(LDFLAGS) -o $@

View File

@ -36,9 +36,11 @@ C_INCLUDES += -I. \
-I$(LITEOSTOPDIR)/kernel/arch/include \
-I$(LITEOSTOPDIR)/kernel/arch/risc-v/nuclei/gcc
ASFLAGS += -imacros $(LITEOSTOPDIR)/kernel/include/los_config.h -DCLZ=CLZ
# list of ASM .S program objects
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASMS_SOURCES:.S=.o)))
vpath %.S $(sort $(dir $(ASMS_SOURCES)))
$(BUILD_DIR)/%.o: %.S Makefile | $(BUILD_DIR)
$(CC) -c $(CFLAGS) $< -o $@
$(CC) -c $(CFLAGS) $(ASFLAGS) $< -o $@

View File

@ -194,7 +194,7 @@ extern "C" {
* Allow inline sections
*/
#ifndef LITE_OS_SEC_ALW_INLINE
#define LITE_OS_SEC_ALW_INLINE //__attribute__((always_inline))
#define LITE_OS_SEC_ALW_INLINE // __attribute__((always_inline))
#endif
/**
@ -210,7 +210,7 @@ extern "C" {
* .Text section (Code section)
*/
#ifndef LITE_OS_SEC_TEXT
#define LITE_OS_SEC_TEXT //__attribute__((section(".sram.text")))
#define LITE_OS_SEC_TEXT // __attribute__((section(".sram.text")))
#endif
/**
@ -226,7 +226,7 @@ extern "C" {
* .Text.init section
*/
#ifndef LITE_OS_SEC_TEXT_INIT
#define LITE_OS_SEC_TEXT_INIT //__attribute__((section(".dyn.text")))
#define LITE_OS_SEC_TEXT_INIT // __attribute__((section(".dyn.text")))
#endif
/**
@ -234,7 +234,7 @@ extern "C" {
* .Data section
*/
#ifndef LITE_OS_SEC_DATA
#define LITE_OS_SEC_DATA //__attribute__((section(".dyn.data")))
#define LITE_OS_SEC_DATA // __attribute__((section(".dyn.data")))
#endif
/**
@ -242,7 +242,7 @@ extern "C" {
* .Data.init section
*/
#ifndef LITE_OS_SEC_DATA_INIT
#define LITE_OS_SEC_DATA_INIT //__attribute__((section(".dyn.data")))
#define LITE_OS_SEC_DATA_INIT // __attribute__((section(".dyn.data")))
#endif
/**
@ -250,7 +250,7 @@ extern "C" {
* Not initialized variable section
*/
#ifndef LITE_OS_SEC_BSS
#define LITE_OS_SEC_BSS //__attribute__((section(".sym.bss")))
#define LITE_OS_SEC_BSS // __attribute__((section(".sym.bss")))
#endif
/**
@ -270,34 +270,34 @@ extern "C" {
#endif
#ifndef LITE_OS_SEC_TEXT_DATA
#define LITE_OS_SEC_TEXT_DATA //__attribute__((section(".dyn.data")))
#define LITE_OS_SEC_TEXT_BSS //__attribute__((section(".dyn.bss")))
#define LITE_OS_SEC_TEXT_RODATA //__attribute__((section(".dyn.rodata")))
#define LITE_OS_SEC_TEXT_DATA // __attribute__((section(".dyn.data")))
#define LITE_OS_SEC_TEXT_BSS // __attribute__((section(".dyn.bss")))
#define LITE_OS_SEC_TEXT_RODATA // __attribute__((section(".dyn.rodata")))
#endif
#ifndef LITE_OS_SEC_SYMDATA
#define LITE_OS_SEC_SYMDATA //__attribute__((section(".sym.data")))
#define LITE_OS_SEC_SYMDATA // __attribute__((section(".sym.data")))
#endif
#ifndef LITE_OS_SEC_SYMBSS
#define LITE_OS_SEC_SYMBSS //__attribute__((section(".sym.bss")))
#define LITE_OS_SEC_SYMBSS // __attribute__((section(".sym.bss")))
#endif
#ifndef LITE_OS_SEC_KEEP_DATA_DDR
#define LITE_OS_SEC_KEEP_DATA_DDR //__attribute__((section(".keep.data.ddr")))
#define LITE_OS_SEC_KEEP_DATA_DDR // __attribute__((section(".keep.data.ddr")))
#endif
#ifndef LITE_OS_SEC_KEEP_TEXT_DDR
#define LITE_OS_SEC_KEEP_TEXT_DDR //__attribute__((section(".keep.text.ddr")))
#define LITE_OS_SEC_KEEP_TEXT_DDR // __attribute__((section(".keep.text.ddr")))
#endif
#ifndef LITE_OS_SEC_KEEP_DATA_SRAM
#define LITE_OS_SEC_KEEP_DATA_SRAM //__attribute__((section(".keep.data.sram")))
#define LITE_OS_SEC_KEEP_DATA_SRAM // __attribute__((section(".keep.data.sram")))
#endif
#ifndef LITE_OS_SEC_KEEP_TEXT_SRAM
#define LITE_OS_SEC_KEEP_TEXT_SRAM //__attribute__((section(".keep.text.sram")))
#define LITE_OS_SEC_KEEP_TEXT_SRAM // __attribute__((section(".keep.text.sram")))
#endif
#ifndef LITE_OS_SEC_BSS_MINOR
@ -378,7 +378,7 @@ typedef signed int INTPTR;
* @ingroup los_base
* Align the tail of the object with the base address addr, with size bytes being the smallest unit of alignment.
*/
#define TRUNCATE(addr, size) ((addr) & ~((size)-1))
#define TRUNCATE(addr, size) ((addr) & ~((size) - 1))
/**