Skip to content

Commit

Permalink
[bug] fix error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef…
Browse files Browse the repository at this point in the history
…ore ‘__aligned’
  • Loading branch information
YuzukiTsuru committed Dec 8, 2023
1 parent 500d1a0 commit 439e44e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 7 additions & 0 deletions include/fdt_wrapper.h
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down

0 comments on commit 439e44e

Please sign in to comment.