[patch,avr]: Fix various problems with specs and specs file generation.

Denis Chertykov chertykov@gmail.com
Tue Mar 3 07:46:00 GMT 2015


2015-03-02 22:40 GMT+03:00 Georg-Johann Lay <avr@gjlay.de>:
> The new specs file generation introduces several problems.  This patch
>
> - Fix build warnings
>
> - Clean up unused code and the old, now dead specs definitions.
>
> - Removes unused files and adjust build scripts / rules.
>
> - Issues with avr-libc awareness:
>
> -- Makes specs-generation aware of avr-libc (include tm.h in build script
> and depend on WITH_AVRLIBC).
>
> -- avr-libc implements functions in libm.a which usually live in libgcc,
> hence add -lm to libgcc_spec, cf. PR54461.
>
> -- The new libdev.a is a feature of avr-libc and not available with, e.g.,
> newlib.  Hence remove it from lib_spec if the compiler is not configured for
> avr-libc (--with-avrlibc=no).
>
> - Many minor issues with option propagation.
>
> - -march had been added to multilib generation some time ago, but
> driver_self_spec was not aware of that option.
>
>
> Ok for trunk?

Approved.

>
>
> BTW, anyone knows what -march= is good for?  It allows all kinds of silly
> option combinations like "-march=avrtiny -mmcu=atmega8" without any
> complaints.
>
> What's wrong with -mmcu=avr* ? All architecture names start with "avr", and
> /no/ device name starts /with/ "avr", hence -mmcu= should be fine and work
> as smooth as in the last 10 years.
>
> Why that -march= option?  If there is not a good reason for -march=, I'd
> propose to clean it up and use -mmcu=avr* instead.


I do not remember.
I guess that it's like -march / -mcpu in ARM target.


Denis.



More information about the Gcc-patches mailing list