summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-02-04 11:41:17 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2020-02-04 14:43:04 +0100
commit25888fb5b06d0986c35010d545cf71ca93daed7e (patch)
tree16558aa4bf5f021df7c6eb3721d03dad018fdf94
parent9cb73aea1bc46da65579482d4550a7e2e3ad3f13 (diff)
downloadefl-25888fb5b06d0986c35010d545cf71ca93daed7e.tar.gz
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. build elementary_test also as a shared object From Marcel make sure we do not give the linker flag for PIE
-rw-r--r--src/bin/elementary/meson.build12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index 7eddf03b48..dcf8662605 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -185,6 +185,18 @@ elementary_test = executable('elementary_test',
link_args: link_args
)
+library('elementary_test',
+ elementary_test_src,
+ dependencies: [elementary] + elementary_deps + elementary_pub_deps,
+ install: false,
+ c_args : package_c_args + [
+ '-Delementary_test_BIN_DIR="'+dir_bin+'"',
+ '-Delementary_test_LIB_DIR="'+dir_lib+'"',
+ '-Delementary_test_DATA_DIR="'+join_paths(dir_data,'elementary')+'"'
+ ],
+ link_args: ['-rdynamic', '-fPIC']
+)
+
elementary_config_src = [
'config.c'
]