Modify rpath option to support both armv7l and aarch64
authorJoonbum Ko <joonbum.ko@samsung.com>
Thu, 19 Aug 2021 10:15:26 +0000 (19:15 +0900)
committerXuelian Bai <xuelian.bai@samsung.com>
Thu, 18 Jan 2024 01:31:56 +0000 (09:31 +0800)
Change-Id: Ib250916f0d8ca096107eb988626fa20e221bda3a
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
meson.build

index 31a91df..204b30a 100644 (file)
@@ -1086,7 +1086,9 @@ else
   # relevant for Vulkan drivers).
   if cc.links('static char unused() { return 5; } int main() { return 0; }',
               args : '-Wl,--gc-sections', name : 'gc-sections')
-    ld_args_gc_sections += '-Wl,--gc-sections,-rpath,/hal/lib'
+    ld_args_gc_sections += '-Wl,--gc-sections'
+    ld_args_gc_sections += '-Wl,-rpath,@0@'.format(
+                join_paths(get_option('prefix'), get_option('libdir')))
     _trial_c += ['-ffunction-sections', '-fdata-sections']
     _trial_cpp += ['-ffunction-sections', '-fdata-sections']
   endif