Fixed C++ compiler flags to work on bare metal