-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20074 from maribu/sys/flash_utils/avr
sys/flash_utils: Minor bug fixes
- Loading branch information
Showing
4 changed files
with
83 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include <avr/pgmspace.h> | ||
#include <stdio.h> | ||
|
||
/* The outdated linker from Ubuntu's toolchain contains a bug in which it will | ||
* garbage collect symbols referenced only by --defsym= command line options, | ||
* and subsequently complain that the symbols are not defined. Adding other | ||
* references to those symbols from an unused function makes that buggy linker | ||
* happy. Since this function is never used, it will be garbage collected and | ||
* not impact the ROM size. */ | ||
void work_around_for_shitty_ubuntu_toolchain_and_not_expected_to_be_called(void) | ||
{ | ||
printf_P(NULL); | ||
fprintf_P(stdout, NULL); | ||
snprintf_P(NULL, 0, NULL); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters