EmBitz

Full Version: The .weak bug in gcc
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi embitz,

Do you have any plans to update the gcc compiler that came with EmBitz?
The .weak bug is very annoying: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83967
I can't use the "generic" compiler because it's reserved for other purposes (ESP8266). Is it possible to add support for more "generic" compilers in the future?
EmBitz after 2.30 is using 9.3.1 and your "bug" reference is about 7.2.1

If I use LTO I always make this workable by changing the build priority of the particular files so that they will be linked before the .weak functions are pulled in.

Tip: This workaround can also be found on the internet where users are discussing these problems.
I was confused by "Lower weight means higher priority (order of compiling)". After I set the startup .s file to 0 (where a weak handler is defined) and the .c file to 100, the code is built correctly.