Skip to content

Commit

Permalink
Undefine the macro _HAVE_INIT_FINI which is defined in newlib. (#624)
Browse files Browse the repository at this point in the history
Newlib overlay package has calls to init and fini. When building newlib,
referencing of _init and _fini has been suppressed by undefining the
corresponding macro HAVE_INIT_FINI and relys on the more modern
.init_array and .fini_array. But the name of this macro in newlib has
changed from HAVE_INIT_FINI to _HAVE_INIT_FINI, so undefine this macro
in the cmake file..
  • Loading branch information
simpal01 authored Jan 9, 2025
1 parent 7db6e10 commit dc7dd64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arm-runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ if(C_LIBRARY STREQUAL newlib)
"RANLIB_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-ranlib"
"READELF_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-readelf"
"STRIP_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-strip"
"CFLAGS_FOR_TARGET=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -UHAVE_INIT_FINI__ -U_HAVE_INIT_FINI__ -UHAVE_INIT_FINI --sysroot ${TEMP_LIB_DIR}"
"CCASFLAGS=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -UHAVE_INIT_FINI__ -U_HAVE_INIT_FINI__ -UHAVE_INIT_FINI --sysroot ${TEMP_LIB_DIR}"
"CFLAGS_FOR_TARGET=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -U_HAVE_INIT_FINI --sysroot ${TEMP_LIB_DIR}"
"CCASFLAGS=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -U_HAVE_INIT_FINI --sysroot ${TEMP_LIB_DIR}"
)

include(ProcessorCount)
Expand Down

0 comments on commit dc7dd64

Please sign in to comment.