ardupilot/Tools/ardupilotwaf
khancyr 360d9fafb6 waf: force linking of phtread with gbenchmark
There is an issue with gbenchmark and waf on Ubuntu (15.04 and 15.10, ). Waf doesn't link pthread to gbenchmark and linking failed : 

````
[1652/1652] Linking build/linux/libraries/AP_Math/benchmarks/benchmark_matrix.linux
/home/khancyr/Workspace/APM/ardupilot/build/linux/gbenchmark/lib/libbenchmark.a(benchmark.cc.o): dans la fonction « benchmark::RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*) »:
benchmark.cc:(.text+0x2e21): référence indéfinie vers « pthread_create »
/usr/bin/ld generated: référence indéfinie vers « pthread_create »
collect2: error: ld returned 1 exit status

Waf: Leaving directory `/home/khancyr/Workspace/APM/ardupilot/build/linux'
Build failed
 -> task in 'benchmark_matrix.linux' failed (exit status 1): 
    {task 139784788162576: cxxprogram benchmark_matrix.cpp.1.o -> benchmark_matrix.linux}
['/usr/lib/ccache/g++', '-Wl,--gc-sections', 'libraries/AP_Math/benchmarks/benchmark_matrix.cpp.1.o', '-o', '/home/khancyr/Workspace/APM/ardupilot/build/linux/libraries/AP_Math/benchmarks/benchmark_matrix.linux', '-Wl,-Bstatic', '-L.', '-lap', '-Wl,-Bdynamic', '-L/home/khancyr/Workspace/APM/ardupilot/build/linux/gbenchmark/lib', '-lm', '-lpthread', '-lrt', '-lbenchmark']
`````

Adding 'pthread' to env.LIB_GBENCHMARK solve the issue

see https://github.com/diydrones/ardupilot/pull/3460 and https://github.com/diydrones/ardupilot/issues/3461
2016-01-12 18:05:46 -02:00
..
__init__.py waf: add waf support 2015-12-03 07:54:30 +11:00
ardupilotwaf.py waf: enable fully static linking 2016-01-11 16:31:59 -02:00
boards.py waf: add most linux boards 2016-01-11 16:31:59 -02:00
gbenchmark.py waf: force linking of phtread with gbenchmark 2016-01-12 18:05:46 -02:00
static_linking.py waf: add static_linking tool 2016-01-11 16:31:59 -02:00
toolchain.py waf: add toolchain tool for cross-compiling 2016-01-11 16:31:59 -02:00