This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building tests from multiple object files

Florian Weimer <> 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
> `use_errno':
> /home/fweimer/src/gnu/glibc/git/elf/tst-tlsalign-vars.c:36: undefined
> reference to `__libc_errno'
> collect2: error: ld returned 1 exit status
> ../Rules:154: recipe for target
> '/home/fweimer/src/gnu/glibc/build/elf/tst-tlsalign-extern' failed
> 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).


Andreas Schwab, SUSE Labs,
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]