"make test" != "mysql-test-run && mysql-test-run --ps-protocol". "make test" is what should be used;
had it been, the failure would have been noticed earlier. Putting back cxx flags I had by accident removed.
Disclaimer: 5.1-new is in a sorry state: log_tables and some ndb* fail, mysqlslap test crashes randomly in a row-based replication assertion (sql_class.cc:2207).