Also print the name of the static library that has PIC-related issues, print more details in exceptions, and test for all this.pull/885/head
parent
e2b3752f87
commit
2d0eb2cec5
4 changed files with 23 additions and 10 deletions
@ -1,7 +1,11 @@ |
||||
project('statchain', 'c') |
||||
|
||||
subdir('subdir') |
||||
statlib = static_library('stat', 'stat.c', link_with : shlib, pic : true) |
||||
# Test that -fPIC in c_args is also accepted |
||||
statlib2 = static_library('stat2', 'stat2.c', c_args : '-fPIC', pic : false) |
||||
# Test that pic is needed for both direct and indirect static library |
||||
# dependencies of shared libraries (on Linux and BSD) |
||||
statlib = static_library('stat', 'stat.c', link_with : [shlib, statlib2], pic : true) |
||||
shlib2 = shared_library('shr2', 'shlib2.c', link_with : statlib) |
||||
exe = executable('prog', 'prog.c', link_with : shlib2) |
||||
test('runtest', exe) |
||||
|
@ -1,7 +1,8 @@ |
||||
#include "subdir/exports.h" |
||||
|
||||
int statlibfunc(void); |
||||
int statlibfunc2(void); |
||||
|
||||
int DLL_PUBLIC shlibfunc2(void) { |
||||
return statlibfunc() - 18; |
||||
return statlibfunc() - statlibfunc2(); |
||||
} |
||||
|
@ -0,0 +1,3 @@ |
||||
int statlibfunc2() { |
||||
return 18; |
||||
} |
Loading…
Reference in new issue