From 65518a36b540d3c3ed61273dded0dc56f096eb72 Mon Sep 17 00:00:00 2001 From: Kent Williams Date: Tue, 22 Oct 2019 10:00:26 -0700 Subject: [PATCH] add new official library.properties field for static linking flags --- platform.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform.txt b/platform.txt index 389b304bc5..e2b44c282a 100644 --- a/platform.txt +++ b/platform.txt @@ -26,6 +26,7 @@ compiler.ar.cmd=arm-none-eabi-gcc-ar compiler.c.elf.cmd=arm-none-eabi-gcc compiler.objcopy.cmd=arm-none-eabi-objcopy compiler.elf2hex.cmd=arm-none-eabi-objcopy +compiler.libraries.ldflags= compiler.extra_flags=-mcpu={build.mcu} {build.flags.fp} -mthumb "@{build.opt.path}" @@ -125,7 +126,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.i 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} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} {compiler.ldflags} {compiler.arm.cmsis.ldflags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--start-group {object_files} "{archive_file_path}" -lc -Wl,--end-group -lm -lgcc -lstdc++ +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} {compiler.ldflags} {compiler.arm.cmsis.ldflags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--start-group {object_files} {compiler.libraries.ldflags} "{archive_file_path}" -lc -Wl,--end-group -lm -lgcc -lstdc++ ## Create output (.bin file) recipe.objcopy.bin.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"