-fmemoize-lookups as gcc 3.4 doesn't understand it. [1] . Use CXX and CXXFLAGS for compiling C++ code, not CPP and CPPFLAGS. Also, respect the setting of CXX and CXXFLAGS. PR: 71516 [1] Submitted by: Damir Kiramov <damirycha@damirycha.net.ru> [1]