Skip to content

[review #337] + fix on build.flags.ldspec #339

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

Merged
merged 2 commits into from
Oct 2, 2018

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Sep 25, 2018

This PR fix usage of build.flags.ldspec to avoid -flto option used twice at link time.
This include the #337 Menu options to support floating point formatting functions for @ppescher with some fix:

  • Removed default *.menu.rtlib.nano.build.flags.ldspecs=--specs=nano.specs as it is the default in platform.txt
  • Rename *.menu.rtlib.full=Newlib Standard to *.menu.rtlib.full=Standard as this is the default libc not the nano one.

I will still have to investigate the remove of -Dprintf=iprintf

@ppescher
Copy link
Contributor

I had read somewhere that iprintf is just an alias to printf in newlib-nano, so it's not necessary anymore (I guess it's some left-over from the AVR core or old versions of ARM GCC).
Moreover, if you want to be able to use the full printf function, that macro definition have to be removed.

Some refs here: https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob_plain;f=newlib/README

  1. Integer-only versions of the formatted I/O functions (the iprintf/
    iscanf family) simply alias their regular counter-parts.
    The affected functions are:
    diprintf vdiprintf
    siprintf fiprintf iprintf sniprintf asiprintf asniprintf
    siscanf fiscanf iscanf ...

@fpistm
Copy link
Member Author

fpistm commented Sep 25, 2018

That's what I've seen.
Let me know if you are ok with this PR.

@ppescher
Copy link
Contributor

Sure, it's fine for me. Thanks

fpistm and others added 2 commits October 1, 2018 17:47
-flto options was use twice at link time.

Signed-off-by: Frederic.Pillon <[email protected]>
Mainly to support floating point format strings in printf/scanf functions and their variants.
Default settings uses Newlib Nano without floating point support (as before).
One can add floating point support for Printf only, Scanf only or both, or just use the standard one.

Signed-off-by: ppescher <[email protected]>
@fpistm fpistm force-pushed the Fix_build.flags.ldspec branch from b0607f8 to 1220b4a Compare October 1, 2018 15:48
@fpistm fpistm self-assigned this Oct 2, 2018
@fpistm fpistm added this to the 1.3.1 milestone Oct 2, 2018
@fpistm fpistm added the enhancement New feature or request label Oct 2, 2018
@fpistm fpistm merged commit f1a98f3 into stm32duino:master Oct 2, 2018
@fpistm fpistm deleted the Fix_build.flags.ldspec branch October 2, 2018 08:47
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this pull request Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants