From 9e65ed1af1dbbfd6dc942bd660884ab32d8589ee Mon Sep 17 00:00:00 2001 From: Mauricio de Oliveira Date: Wed, 30 Sep 2020 04:42:04 -0700 Subject: [PATCH] Process compiler.libraries.ldflags (#3783) Add support for the v1.8.6 compiler.libraries.ldflags: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification This fixes the issue reported here: https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BSEC-1-4-7-4-compilation-error-on-ESP32-1-0-3-rc1/td-p/9120 --- platform.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform.txt b/platform.txt index 6583ee77..5be1a50d 100644 --- a/platform.txt +++ b/platform.txt @@ -60,6 +60,7 @@ compiler.cpp.extra_flags= compiler.ar.extra_flags= compiler.objcopy.eep.extra_flags= compiler.elf2hex.extra_flags= +compiler.libraries.ldflags= # Build Dir: {build.path} # Sketch Dir: {build.source.path} @@ -81,7 +82,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.fla recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" ## Combine gc-sections, archives, and objects -recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf" +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} {compiler.libraries.ldflags} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf" ## Create eeprom recipe.objcopy.eep.pattern={tools.gen_esp32part.cmd} -q "{build.path}/partitions.csv" "{build.path}/{build.project_name}.partitions.bin"