mirror of https://github.com/thesofproject/sof.git
lmdk: Enable linking with standard libraries
Changed linker options to enable linking with libgcc and libc. This change is required to allow use compiler builtins functions (like __divdi3) and dynamic memory allocation functions. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
This commit is contained in:
parent
ad2123dd42
commit
581cfdf3cc
|
@ -15,6 +15,9 @@ foreach(MODULE ${MODULES_LIST})
|
|||
|
||||
### set_target_properties(${MODULE} PROPERTIES OUTPUT_NAME ${MODULE}.mod)
|
||||
|
||||
# uncomment line below to compile module with debug information
|
||||
#target_compile_options(${MODULE} PUBLIC "-g3")
|
||||
|
||||
target_include_directories(${MODULE} PRIVATE
|
||||
"${LMDK_BASE}/include"
|
||||
"${RIMAGE_INCLUDE_DIR}"
|
||||
|
@ -35,9 +38,9 @@ foreach(MODULE ${MODULES_LIST})
|
|||
)
|
||||
|
||||
target_link_options(${MODULE} PRIVATE
|
||||
"-nostdlib" "-nodefaultlibs"
|
||||
"-nostartfiles"
|
||||
"-Wl,--no-undefined" "-Wl,--unresolved-symbols=report-all" "-Wl,--error-unresolved-symbols"
|
||||
#"-Wl,--gc-sections" # may remove .bss and that will result in rimage error, do not use for now
|
||||
"-Wl,--gc-sections"
|
||||
"-Wl,-Map,$<TARGET_FILE:${MODULE}>.map" # optional: just for debug
|
||||
"-T" "${MODULE}_ldscripts/elf32xtensa.x"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue