diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-07-31 19:22:24 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-07-31 19:22:24 +0300 |
commit | 17bfbb99e5897ac759aca42d3ee375ebb33bd087 (patch) | |
tree | 8df2a3f7cbfcca9c30df15404f0227dfe0107705 /test cases/failing/32 exe static shared | |
parent | 2bc0f56b21a6dd327a6907c5fe27885b05db49d5 (diff) | |
download | meson-17bfbb99e5897ac759aca42d3ee375ebb33bd087.zip meson-17bfbb99e5897ac759aca42d3ee375ebb33bd087.tar.gz meson-17bfbb99e5897ac759aca42d3ee375ebb33bd087.tar.bz2 |
Condense test dirs.
Diffstat (limited to 'test cases/failing/32 exe static shared')
-rw-r--r-- | test cases/failing/32 exe static shared/meson.build | 11 | ||||
-rw-r--r-- | test cases/failing/32 exe static shared/prog.c | 10 | ||||
-rw-r--r-- | test cases/failing/32 exe static shared/shlib2.c | 16 | ||||
-rw-r--r-- | test cases/failing/32 exe static shared/stat.c | 3 |
4 files changed, 40 insertions, 0 deletions
diff --git a/test cases/failing/32 exe static shared/meson.build b/test cases/failing/32 exe static shared/meson.build new file mode 100644 index 0000000..b102764 --- /dev/null +++ b/test cases/failing/32 exe static shared/meson.build @@ -0,0 +1,11 @@ +project('statchain', 'c') + +host_system = host_machine.system() +if host_system == 'windows' or host_system == 'darwin' + error('Test only fails on Linux and BSD') +endif + +statlib = static_library('stat', 'stat.c', pic : false) +shlib2 = shared_library('shr2', 'shlib2.c', link_with : statlib) +exe = executable('prog', 'prog.c', link_with : shlib2) +test('runtest', exe) diff --git a/test cases/failing/32 exe static shared/prog.c b/test cases/failing/32 exe static shared/prog.c new file mode 100644 index 0000000..26603b6 --- /dev/null +++ b/test cases/failing/32 exe static shared/prog.c @@ -0,0 +1,10 @@ +int shlibfunc2(); +int statlibfunc(); + +int main(int argc, char **argv) { + if (statlibfunc() != 42) + return 1; + if (shlibfunc2() != 24) + return 1; + return 0; +} diff --git a/test cases/failing/32 exe static shared/shlib2.c b/test cases/failing/32 exe static shared/shlib2.c new file mode 100644 index 0000000..5b68843 --- /dev/null +++ b/test cases/failing/32 exe static shared/shlib2.c @@ -0,0 +1,16 @@ +#if defined _WIN32 || defined __CYGWIN__ + #define DLL_PUBLIC __declspec(dllexport) +#else + #if defined __GNUC__ + #define DLL_PUBLIC __attribute__ ((visibility("default"))) + #else + #pragma message ("Compiler does not support symbol visibility.") + #define DLL_PUBLIC + #endif +#endif + +int statlibfunc(void); + +int DLL_PUBLIC shlibfunc2(void) { + return 24; +} diff --git a/test cases/failing/32 exe static shared/stat.c b/test cases/failing/32 exe static shared/stat.c new file mode 100644 index 0000000..56ec66c --- /dev/null +++ b/test cases/failing/32 exe static shared/stat.c @@ -0,0 +1,3 @@ +int statlibfunc() { + return 42; +} |