This is the mail archive of the
mailing list for the glibc project.
Re: Building tests from multiple object files
- From: Florian Weimer <fweimer at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 13 Apr 2016 15:06:06 +0200
- Subject: Re: Building tests from multiple object files
- Authentication-results: sourceware.org; auth=none
- References: <570CDEE6 dot 3030808 at redhat dot com> <mvm4mb7uiny dot fsf at hawking dot suse dot de>
On 04/12/2016 02:16 PM, Andreas Schwab wrote:
Florian Weimer <email@example.com> writes:
The glibc makefiles do not provide a simple way to assemble a test binary
from multiple object files. One way to see this is to apply the attached
harmless patch and then run
make subdirs=elf check
(or whatever you do to run the test suite). Linking the test fails with:
/home/fweimer/src/gnu/glibc/build/elf/tst-tlsalign-vars.o: In function
reference to `__libc_errno'
collect2: error: ld returned 1 exit status
../Rules:154: recipe for target
The apparent cause is that the second object file for the test was built
against internal glibc headers.
No, the problem is that it is built with MODULE_NAME=libc. It should be
nonlib, so it needs to be put on test-extras (and on extra-test-objs to
get dependency right).
Thanks, this fixed the build issue for me, also for my actual test.