You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2018. It is now read-only.
Weakly defined symbols like so (taken from Arduino):
// this next line disables the entire HardwareSerial.cpp, // this is so I can support Attiny series and any other chip without a uart
#if defined(HAVE_HWSERIAL0) || defined(HAVE_HWSERIAL1) || defined(HAVE_HWSERIAL2) || defined(HAVE_HWSERIAL3)
// SerialEvent functions are weak, so when the user doesn't define them,// the linker just sets their address to 0 (which is checked below).// The Serialx_available is just a wrapper around Serialx.available(),// but we can refer to it weakly so we don't pull in the entire// HardwareSerial instance if the user doesn't also refer to it.
#if defined(HAVE_HWSERIAL0)
voidserialEvent() __attribute__((weak));
boolSerial0_available() __attribute__((weak));
#endif
#if defined(HAVE_HWSERIAL1)
voidserialEvent1() __attribute__((weak));
boolSerial1_available() __attribute__((weak));
#endif
#if defined(HAVE_HWSERIAL2)
voidserialEvent2() __attribute__((weak));
boolSerial2_available() __attribute__((weak));
#endif
#if defined(HAVE_HWSERIAL3)
voidserialEvent3() __attribute__((weak));
boolSerial3_available() __attribute__((weak));
#endif
Are failing during the link stage due to undefined references to the weak symbols (by GNU's avr-ld). Weak symbols have the property that if they are not defined, they are set to null instead. It makes no sense for a weak undefined symbol, thus this error must lay with clang or llvm not placing the weak attribute in the ELF object file.
Note: Migrated from here.
Weakly defined symbols like so (taken from Arduino):
Are failing during the link stage due to undefined references to the weak symbols (by GNU's
avr-ld). Weak symbols have the property that if they are not defined, they are set to null instead. It makes no sense for a weak undefined symbol, thus this error must lay withclangorllvmnot placing theweakattribute in the ELF object file.