(merge from head) Add detection of gcc compiler flavor so that we can correctly tag generated libraries to not conflict with each other.