From 69441cbaceae6fa1b5f2df150609fe59b2a67cea Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 26 Mar 2018 11:48:30 +0100 Subject: [PATCH] Do not test for linker flags Meson warns when doing that, as it's not really portable. Since we're using platform-specific linker flags on Darwin, we can also do the same on Linux; the syntax is GCC-specific, so we're going to need Clang users to test it. --- meson.build | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 26d522fa3b..5831dfcbfe 100644 --- a/meson.build +++ b/meson.build @@ -279,12 +279,8 @@ endif common_ldflags = [] -if host_machine.system() == 'linux' - foreach ldflag: [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ] - if cc.has_argument(ldflag) - common_ldflags += [ ldflag ] - endif - endforeach +if host_machine.system() == 'linux' and cc.get_id() == 'gcc' + common_ldflags += [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ] endif # Maintain compatibility with autotools