[Mesa-dev] [PATCH v2 03/21] meson: add checks for version script and dynamic list
Dylan Baker
dylan at pnwbakers.com
Thu Oct 12 17:38:30 UTC 2017
These are used by gallium drivers.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
meson.build | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 48e9e1db08e..8d890e53e12 100644
--- a/meson.build
+++ b/meson.build
@@ -426,14 +426,28 @@ endif
# Check for some linker flags
ld_args_bsymbolic = []
-if cc.links('int main() { return 0; }', args : '-Wl,-Bsymbolic')
+if cc.links('int main() { return 0; }', args : '-Wl,-Bsymbolic', name : 'Bsymbolic')
ld_args_bsymbolic += '-Wl,-Bsymbolic'
endif
ld_args_gc_sections = []
if cc.links('static char unused() { return 5; } int main() { return 0; }',
- args : '-Wl,--gc-sections')
+ args : '-Wl,--gc-sections', name : 'gc-sections')
ld_args_gc_sections += '-Wl,--gc-sections'
endif
+with_ld_version_script = false
+if cc.links('int main() { return 0; }',
+ args : '-Wl,--version-script=@0@'.format(
+ join_paths(meson.source_root(), '.build/conftest.map')),
+ name : 'version-script')
+ with_ld_version_script = true
+endif
+with_ld_dynamic_list = false
+if cc.links('int main() { return 0; }',
+ args : '-Wl,--dynamic-list=@0@'.format(
+ join_paths(meson.source_root(), '.build/conftest.dyn')),
+ name : 'dynamic-list')
+ with_ld_dynamic_list = true
+endif
# check for dl support
if cc.has_function('dlopen')
--
2.14.2
More information about the mesa-dev
mailing list