This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[RFC] Why do GLIBC tests use internal headers?
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Fri, 16 Dec 2016 16:24:21 +0000
- Subject: [RFC] Why do GLIBC tests use internal headers?
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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