Skip to content

Commit

Permalink
Enable "cyclic reference" for GCC linker only for the embedded dev-pl…
Browse files Browse the repository at this point in the history
…atforms // Resolve #3570
  • Loading branch information
ivankravets committed Aug 16, 2020
1 parent 808852f commit 74e27a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ PlatformIO Core 4
* Dump data intended for IDE extensions/plugins using a new `platformio project idedata <https://docs.platformio.org/page/core/userguide/project/cmd_idedata.html>`__ command
* Do not generate ".travis.yml" for a new project, let the user have a choice
* Automatically enable LDF dependency `chain+ mode (evaluates C/C++ Preprocessor conditional syntax) <https://docs.platformio.org/page/librarymanager/ldf.html#dependency-finder-mode>`__ for Arduino library when "library.property" has "depends" field (`issue #3607 <https://github.com/platformio/platformio-core/issues/3607>`_)
* Enable "cyclic reference" for GCC linker only for the embedded dev-platforms (`issue #3570 <https://github.com/platformio/platformio-core/issues/3570>`_)
* Updated PIO Unit Testing support for Mbed framework. Added compatibility with Mbed OS 6
* Do not escape compiler arguments in VSCode template on Windows
* Fixed an issue with PIO Unit Testing when running multiple environments (`issue #3523 <https://github.com/platformio/platformio-core/issues/3523>`_)
Expand Down
6 changes: 5 additions & 1 deletion platformio/builder/tools/platformio.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ def BuildProgram(env):
env.Prepend(LINKFLAGS=["-T", env.subst("$LDSCRIPT_PATH")])

# enable "cyclic reference" for linker
if env.get("LIBS") and env.GetCompilerType() == "gcc":
if (
env.get("LIBS")
and env.GetCompilerType() == "gcc"
and env.PioPlatform().is_embedded()
):
env.Prepend(_LIBFLAGS="-Wl,--start-group ")
env.Append(_LIBFLAGS=" -Wl,--end-group")

Expand Down

0 comments on commit 74e27a2

Please sign in to comment.