linux-sg2042/tools/testing/radix-tree
Michael Ellerman 284d96a494 radix tree test suite: Fix build with --as-needed
Currently the radix tree test suite doesn't build with toolchains that
use --as-needed by default, for example Ubuntu's:

  cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -lpthread -lurcu main.o ... -o main
  /usr/bin/ld: regression1.o: undefined reference to symbol 'pthread_join@@GLIBC_2.17'
  /lib/powerpc64le-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
  collect2: error: ld returned 1 exit status

This is caused by the custom makefile rules placing LDFLAGS before the
.o files that need the libraries.

We could fix it by using --no-as-needed, or rewriting the custom rules.
But we can also just drop the custom rules and move the libraries to
LDLIBS, and then the default rules work correctly - with the one caveat
that we need to add -fsanitize=address to LDFLAGS because that must be
passed to the linker as well as the compiler.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
2017-03-07 13:18:22 -05:00
..
generated radix tree test suite: Remove obsolete CONFIG 2017-02-13 16:09:43 -05:00
linux radix tree test suite: Add config option for map shift 2017-02-13 21:44:10 -05:00
.gitignore radix tree test suite: Add config option for map shift 2017-02-13 21:44:10 -05:00
Makefile radix tree test suite: Fix build with --as-needed 2017-03-07 13:18:22 -05:00
benchmark.c radix tree test suite: Add performance test for radix_tree_join() 2017-03-07 13:18:21 -05:00
idr-test.c radix tree test suite: Add tests for ida_simple_get() and ida_simple_remove() 2017-03-07 13:18:19 -05:00
iteration_check.c radix tree test suite: Dial down verbosity with -v 2017-02-13 21:44:04 -05:00
linux.c radix-tree: Chain preallocated nodes through ->parent 2017-02-13 21:44:04 -05:00
main.c radix tree test suite: Run iteration tests for longer 2017-02-13 21:44:08 -05:00
multiorder.c radix tree test suite: Fix split/join memory leaks 2017-02-13 21:44:08 -05:00
regression.h radix-tree tests: add regression3 test 2016-03-17 15:09:34 -07:00
regression1.c radix tree test suite: Dial down verbosity with -v 2017-02-13 21:44:04 -05:00
regression2.c radix tree test suite: Fix leaks in regression2.c 2017-02-13 21:44:07 -05:00
regression3.c radix tree test suite: Dial down verbosity with -v 2017-02-13 21:44:04 -05:00
tag_check.c radix tree test suite: Add test for radix_tree_clear_tags() 2017-03-07 13:18:19 -05:00
test.c radix tree test suite: Fix leaky tests 2017-02-13 21:44:06 -05:00
test.h Reimplement IDR and IDA using the radix tree 2017-02-13 21:44:01 -05:00