22514c1dd9
Removes the need to know/guess the paths to these libraries. Once we are gcc 8 only, we can remove -nostdlib and no additional arguments are needed for system libraries. The catch is: any time IDF overrides a symbol in the toolchain sysroot, we need an undefined linker marker to make sure this symbol is seen by linker.
11 lines
494 B
CMake
11 lines
494 B
CMake
set(CMAKE_SYSTEM_NAME Generic)
|
|
|
|
set(CMAKE_C_COMPILER xtensa-esp32-elf-gcc)
|
|
set(CMAKE_CXX_COMPILER xtensa-esp32-elf-g++)
|
|
set(CMAKE_ASM_COMPILER xtensa-esp32-elf-gcc)
|
|
|
|
set(CMAKE_C_FLAGS "-mlongcalls -Wno-frame-address" CACHE STRING "C Compiler Base Flags")
|
|
set(CMAKE_CXX_FLAGS "-mlongcalls -Wno-frame-address" CACHE STRING "C++ Compiler Base Flags")
|
|
|
|
# Can be removed after gcc 5.2.0 support is removed (ref GCC_NOT_5_2_0)
|
|
set(CMAKE_EXE_LINKER_FLAGS "-nostdlib" CACHE STRING "Linker Base Flags")
|