Skip to content

Commit f21b6b0

Browse files
committed
linker: remove false positive compilation error
libc shouldn't be linked in dynamic build, while it's needed when the validation step is executed. Validated against the previous patch, nigthly arduino-cli and ~/Arduino/libraries/Arduino_JSON/examples/JSONArray/ example
1 parent a93b329 commit f21b6b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ upload.extension=elf-zsk.bin
5656
build.ldscript.path={runtime.platform.path}/variants/_ldscripts
5757
build.link_command="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" "-L{build.variant.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {build.extra_flags} {build.extra_ldflags} {compiler.zephyr.common_ldflags} --specs=picolibc.specs --specs=nosys.specs {compiler.ldflags} {object_files} -Wl,--start-group "{build.path}/{archive_file}" {compiler.zephyr.extra_ldflags} {compiler.libraries.ldflags} -Wl,--end-group {build.link_args.{build.link_mode}}
5858

59-
build.check_command-dynamic={build.link_command} {build.link_args.check-dynamic} -o "{build.path}/{build.project_name}_check.tmp"
59+
build.check_command-dynamic={build.link_command} -lc -lm -lgcc {build.link_args.check-dynamic} -o "{build.path}/{build.project_name}_check.tmp"
6060
build.check_command-static=/bin/true
6161
build.check_command-static.windows=cmd /C cd .
6262
build.combine_command={build.link_command} {build.link_args.build-{build.link_mode}} {build.link_args.build-common}

0 commit comments

Comments
 (0)