diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2020-02-04 11:41:17 +0100 |
---|---|---|
committer | Stefan Schmidt <s.schmidt@samsung.com> | 2020-02-05 10:09:06 +0100 |
commit | 0d2e378942a5a1d3dec27fea27b3a17b5a3389b5 (patch) | |
tree | 8a68806d6b21183a437717df3e8b0ca825656116 | |
parent | 723382bf5c4fb0dd08ebcf4dcda15d69cd24bdc8 (diff) |
elementary: build elementary_test additionally as shared object
For our exactness testing we are dlopen() the elementary_test
executable. Until glibc 2.30 this was posible with -pie, but it changed
in the glibc version. They no longer allow these executables to be
dlopen()'ed.
As a workaround for now we are building elementary_test also as a shared
object file which we load and use in the exactness testing process.
The code came from Marcel Hollerbach and I only tested it and fixed up a
small detail.
Differential Revision: https://phab.enlightenment.org/D11284
-rw-r--r-- | src/bin/elementary/meson.build | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build index 7eddf03b48..0f8d79322d 100644 --- a/src/bin/elementary/meson.build +++ b/src/bin/elementary/meson.build | |||
@@ -169,9 +169,11 @@ elementary_test_src = [ | |||
169 | 169 | ||
170 | if sys_windows == false | 170 | if sys_windows == false |
171 | link_args = ['-rdynamic', '-fPIC', '-pie'] | 171 | link_args = ['-rdynamic', '-fPIC', '-pie'] |
172 | link_args_lib = ['-rdynamic', '-fPIC'] | ||
172 | package_c_args = package_c_args + ['-fPIC'] | 173 | package_c_args = package_c_args + ['-fPIC'] |
173 | else | 174 | else |
174 | link_args = [] | 175 | link_args = [] |
176 | link_args_lib = [] | ||
175 | endif | 177 | endif |
176 | elementary_test = executable('elementary_test', | 178 | elementary_test = executable('elementary_test', |
177 | elementary_test_src, | 179 | elementary_test_src, |
@@ -185,6 +187,18 @@ elementary_test = executable('elementary_test', | |||
185 | link_args: link_args | 187 | link_args: link_args |
186 | ) | 188 | ) |
187 | 189 | ||
190 | library('elementary_test', | ||
191 | elementary_test_src, | ||
192 | dependencies: [elementary] + elementary_deps + elementary_pub_deps, | ||
193 | install: false, | ||
194 | c_args : package_c_args + [ | ||
195 | '-Delementary_test_BIN_DIR="'+dir_bin+'"', | ||
196 | '-Delementary_test_LIB_DIR="'+dir_lib+'"', | ||
197 | '-Delementary_test_DATA_DIR="'+join_paths(dir_data,'elementary')+'"' | ||
198 | ], | ||
199 | link_args: link_args_lib | ||
200 | ) | ||
201 | |||
188 | elementary_config_src = [ | 202 | elementary_config_src = [ |
189 | 'config.c' | 203 | 'config.c' |
190 | ] | 204 | ] |