From 439e44e262a7fca54b13d8c184e68ae5f4120278 Mon Sep 17 00:00:00 2001 From: YuzukiTsuru Date: Sat, 9 Dec 2023 00:21:38 +0800 Subject: [PATCH] =?UTF-8?q?[bug]=20fix=20error:=20expected=20=E2=80=98=3D?= =?UTF-8?q?=E2=80=99,=20=E2=80=98,=E2=80=99,=20=E2=80=98;=E2=80=99,=20?= =?UTF-8?q?=E2=80=98asm=E2=80=99=20or=20=E2=80=98=5F=5Fattribute=5F=5F?= =?UTF-8?q?=E2=80=99=20before=20=E2=80=98=5F=5Faligned=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 4 ++-- include/fdt_wrapper.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d8abeb0..8d84e7ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,9 +17,9 @@ set(CMAKE_C_COMPILER "${CROSS_COMPILE}gcc") set(CMAKE_CXX_COMPILER "${CROSS_COMPILE}g++") if(ENABLE_HARDFP) -set(CMAKE_COMMON_FLAGS "-nostdlib -mcpu=cortex-a7 -mthumb-interwork -mthumb -mno-unaligned-access -mfpu=neon-vfpv4 -mfloat-abi=hard") +set(CMAKE_COMMON_FLAGS "-nostdlib -g -ggdb -O3 -mcpu=cortex-a7 -mthumb-interwork -mthumb -mno-unaligned-access -mfpu=neon-vfpv4 -mfloat-abi=hard") else() -set(CMAKE_COMMON_FLAGS "-nostdlib -mcpu=cortex-a7 -mthumb-interwork -mthumb -mno-unaligned-access -mfpu=neon-vfpv4 -mfloat-abi=softfp") +set(CMAKE_COMMON_FLAGS "-nostdlib -g -ggdb -O3 -mcpu=cortex-a7 -mthumb-interwork -mthumb -mno-unaligned-access -mfpu=neon-vfpv4 -mfloat-abi=softfp") endif() set(CMAKE_DISABLE_WARN_FLAGS "-Wno-int-to-pointer-cast -Wno-implicit-function-declaration -Wno-discarded-qualifiers") diff --git a/include/fdt_wrapper.h b/include/fdt_wrapper.h index 0e9169df..41e213f1 100644 --- a/include/fdt_wrapper.h +++ b/include/fdt_wrapper.h @@ -1,6 +1,13 @@ #ifndef __FDT_WRAPPER_H__ #define __FDT_WRAPPER_H__ +#ifndef __packed +#define __packed __attribute__((__packed__)) +#endif + +#ifndef __aligned +#define __aligned(x) __attribute__((__aligned__(x))) +#endif #define MAX_LEVEL 32 /* how deeply nested we will go */ #define SCRATCHPAD 1024 /* bytes of scratchpad memory */