Made g++ more generic