stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=78ad088dd73a18fb4cfcfedcc18a6bf03e28080b

commit 78ad088dd73a18fb4cfcfedcc18a6bf03e28080b
Author: Stefan Schmidt <[email protected]>
Date:   Tue Feb 4 11:41:17 2020 +0100

    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.
    
    Reviewed-by: Marcel Hollerbach <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D11284
---
 src/bin/elementary/meson.build | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

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 = [
 
 if sys_windows == false
   link_args = ['-rdynamic', '-fPIC', '-pie']
+  link_args_lib = ['-rdynamic', '-fPIC']
   package_c_args =  package_c_args + ['-fPIC']
 else
   link_args = []
+  link_args_lib = []
 endif
 elementary_test = executable('elementary_test',
         elementary_test_src,
@@ -185,6 +187,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: link_args_lib
+)
+
 elementary_config_src = [
    'config.c'
 ]

-- 


Reply via email to