libepoxy/0004-Use-some-linker-flags-only-on-Linux.patch
Igor Gnatenko 727af8dbef Switch to meson; Add license file
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-03-09 23:03:31 +01:00

30 lines
814 B
Diff

From bfd99a94218275361fc3b207e397e93042a0b1b1 Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@gnome.org>
Date: Tue, 7 Mar 2017 15:32:43 +0000
Subject: [PATCH 4/6] Use some linker flags only on Linux
Using GCC is not a guarantee of also having access to the Linux linker;
just like we use specific linker flags on macOS, the symbolic and relro
linker flags are pretty much Linux specific.
---
src/meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/meson.build b/src/meson.build
index 4dbb3eb..a3d76db 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -52,7 +52,8 @@ foreach h: headers
endforeach
common_ldflags = []
-if cc.get_id() == 'gcc'
+
+if host_system == 'linux'
common_ldflags = [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
endif
--
2.12.0