BitBoxSwiss / bitbox02-firmware

Firmware code of the BitBox02 hardware wallet
https://bitbox.swiss/bitbox02
Apache License 2.0
256 stars 91 forks source link

i2c_ecc,random: remove duplicate definitions #977

Closed benma closed 1 year ago

benma commented 1 year ago

These symbols are already defined in driver_init.c.

The current GCC version doesn't complain, I discovered this when trying to build with an updated GCC (arm-gnu-toolchain-11.3.rel1-x86_64) and getting errors about these redefinitions.

The reason that the current GCC version (GCC 8) didn't complain and the updated one (GCC 11) did complain is that the default for the -fcommon flag changed from on to off in GCC 10.

See:

benma commented 1 year ago

@NickeZ any idea why the old compiler would not complain about this but the new would? duplicate definition should not work on the old compiler (the one currently in use) :thinking:

benma commented 1 year ago

@NickeZ any idea why the old compiler would not complain about this but the new would? duplicate definition should not work on the old compiler (the one currently in use) thinking

Found the reason and documented it in the commit msg.