Discussion:
[avr-libc-dev] [Docs] on compiler / linker flags
f***@gmx.at
2018-07-20 19:57:12 UTC
Permalink
Hello,

TLDR: I forgot to set this flag for the linker also. (No note at the first paragraph, and no note under "selected linker options")
IMHO there *should* be a mention in the first paragraph, that this flag is OFC needed for the linker also. At least it should be the first flag for "selected linker options"
Background, to make a mock of myself:
Recently I've adapted mv CMakeLists.txt from ARM to AVR targets. As blind as I was, I did read the docs on "C compiler flags", and encountered `-mmcu=`.
Mentioned for the compiler, not the linker. Added the flag, did not turn some grey cells on to ask "what does the linker do, and what does it need for that you idiot?"

Very weired issues popped up. Only Emil on the #avrs IRC channel shed light onto my blindness, and I got that linker doing what it was supposed to.
To save others that hassle, I'd like to make the docs more foolproof.
Best regards,
Florian
Joerg Wunsch
2018-07-21 06:43:43 UTC
Permalink
Post by f***@gmx.at
IMHO there *should* be a mention in the first paragraph, that this
flag is OFC needed for the linker also. At least it should be the
first flag for "selected linker options"
So, you're obviously referring to the -mmcu= option.

Please file a formal bug report for it, so this won't be forgotten.
--
cheers, Joerg .-.-. --... ...-- -.. . DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)
Loading...