Merge "Use static thread safety analysis when available, and fix the bugs GCC finds." into ics-mr1-plus-art