meson: elm: add pie and fPIC cflags and ldflags to elm binaries 13/197413/1
authorStefan Schmidt <s.schmidt@samsung.com>
Thu, 10 Jan 2019 16:03:35 +0000 (17:03 +0100)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 11 Jan 2019 05:18:42 +0000 (14:18 +0900)
My use case here is having elementary_test being loaded by exactness.
That has been working fine with our autotools based build system but no
longer with meson.

Bringing fPIC and pie back as options allows exactness to dlopen the
binary and work again.

Differential Revision: https://phab.enlightenment.org/D7587

Change-Id: I1d97107f4c049bc89b80f46a4a5ac069387c956f
Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
src/bin/elementary/meson.build

index f8ca71e..008eab7 100644 (file)
@@ -157,7 +157,8 @@ elementary_test_src = [
 ]
 
 if sys_windows == false
-  link_args = '-rdynamic'
+  link_args = ['-rdynamic', '-fPIC', '-pie']
+  package_c_args =  package_c_args + ['-fPIC']
 else
   link_args = []
 endif