-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiler.libraries.ldflags= was missing, generating an error when trying to link precompiled libraries #8392
Conversation
…ing to link precompiled libraries. This line is required to be compatible with the Arduino library specification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also be added to the combine pattern here? I have noticed esp32 platform.txt using this property
https://github.com/espressif/arduino-esp32/blob/399f4ecbb3a4cef21e2bffa37adb6190356dfb76/platform.txt#L151
Line 122 in d5444c4
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}" |
Also, some references Turns out this was reported to the Arduino repo last year |
I compiled with and without the requested change and couldn't spot a difference. I am not so familar with arduino to understand what this line should do. |
Please do. We should also fix the comment to reference the reason why we need this? tldr; this function of the arduino-cli builder uses the combine pattern: grabbing https://github.com/BoschSensortec/BSEC-Arduino-library to reproduce this, it does not build without adding {compiler.libraries.ldflags} to the pattern group |
Okay, I've added this to the pattern group |
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)
This line is required to be compatible with the Arduino library specification