summaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-02-24 13:11:03 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-04-28 09:21:43 +0000
commit76acde30382254f7ca51af67ea91433719080edd (patch)
tree71564ca688cff175381ecd3e51b1c8e2507db998 /backends
parentffb6a77fc4f0533126a3ff49ec5c03ef8e674520 (diff)
Check for -z,defs, -z,relro, -fPIC, -fPIE before using them
On windows those aren't needed because the link results are no ELF files and all code is position independent anyway. gcc then complains about them, which is in turn caught by -Werror. Change-Id: Ie3d600b7c430698fc3d867a986a4d48f7ad1bbec Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'backends')
-rw-r--r--backends/ChangeLog4
-rw-r--r--backends/Makefile.am4
2 files changed, 6 insertions, 2 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog
index 594aa98b..baeb7b92 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,7 @@
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Use dso_LDFLAGS.
+
2017-04-21 Ulf Hermann <ulf.hermann@qt.io>
* Makefile.am: Link backends against libgnu.a if requested.
diff --git a/backends/Makefile.am b/backends/Makefile.am
index 5dcb3e10..3e1992eb 100644
--- a/backends/Makefile.am
+++ b/backends/Makefile.am
@@ -138,10 +138,10 @@ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libgnu)
@rm -f $(@:.so=.map)
$(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
> $(@:.so=.map)
- $(AM_V_CCLD)$(LINK) -shared -o $(@:.map=.so) \
+ $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $(@:.map=.so) \
-Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
-Wl,--version-script,$(@:.so=.map) \
- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libgnu)
+ -Wl,--as-needed $(libelf) $(libdw) $(libgnu)
@$(textrel_check)
libebl_i386.so: $(cpu_i386)