[RFC] Why do GLIBC tests use internal headers?

Wilco Dijkstra Wilco.Dijkstra@arm.com
Fri Dec 16 16:24:00 GMT 2016


GLIBC uses internal headers in include/... while building itself.  The same
internal headers are used when building tests.  This is odd as you'd expect
it to use an include path that is equivalent to the installed headers for testing.

This causes problems when including headers that are not C++ safe to be
used by C++ tests - for example include/string.h is used in debug/tst-chk4.cc,
thus declaring everything in it as C++ with name mangling which causes link
failures if they happen to be called by the test. I can fix this by adding
extern "C" {} around any C++ tests, but that doesn't solve the underlying issue.

Should we update the include path used in tests to just use the installed includes?

Wilco



More information about the Libc-alpha mailing list