Skip to content

Commit 7fc43b6

Browse files
Correctly link with precompiled libraries (#8392)
Otherwise, this will cause an error when trying to link with one. ref. https://arduino.github.io/arduino-cli/0.20/platform-specification/#recipes-for-linking (empty by default, for when this value is not set by the builder)
1 parent 0f231b1 commit 7fc43b6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

platform.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ compiler.sdk.path={runtime.platform.path}/tools/sdk
5858
compiler.libc.path={runtime.platform.path}/tools/sdk/libc/xtensa-lx106-elf
5959
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/{build.lwip_include}" "-I{compiler.libc.path}/include" "-I{build.path}/core"
6060

61+
# support precompiled libraries in IDE v1.8.6+
62+
compiler.libraries.ldflags=
63+
6164
compiler.c.cmd=xtensa-lx106-elf-gcc
6265
compiler.c.flags=-c {compiler.warning_flags} -std=gnu17 {build.stacksmash_flags} -Os -g -free -fipa-pta -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -ffunction-sections -fdata-sections {build.exception_flags} {build.sslflags} {build.mmuflags} {build.non32xferflags}
6366

@@ -119,7 +122,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.fla
119122
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
120123

121124
## Combine gc-sections, archives, and objects
122-
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {build.exception_flags} -Wl,-Map "-Wl,{build.path}/{build.project_name}.map" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group "-L{build.path}"
125+
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {build.exception_flags} -Wl,-Map "-Wl,{build.path}/{build.project_name}.map" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} {compiler.libraries.ldflags} -Wl,--end-group "-L{build.path}"
123126

124127
## Create eeprom
125128
recipe.objcopy.eep.pattern=

0 commit comments

Comments
 (0)