diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-05-09 18:58:03 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-05-10 12:50:24 +0100 |
commit | 9125942834db3a6c37d62b5fb1e49a1a9de0280a (patch) | |
tree | ae36f42b277f1bb3e9f26dac5f724cf05ea46545 | |
parent | 22e8917948e15000373542b30808f6a5873012d2 (diff) |
Link with ld --no-copy-dt-needed-entries if available
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49725
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Mikhail Zabaluev <mikhail.zabaluev@nokia.com>
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | extensions/Makefile.am | 1 | ||||
-rw-r--r-- | rakia/Makefile.am | 1 | ||||
-rw-r--r-- | src/Makefile.am | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index aa461e3..0795eed 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,12 @@ TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$enable_fatal_warnings" = xyes], unused-parameter]) AC_SUBST([ERROR_CFLAGS]) +# these aren't really error flags but they serve a similar purpose for us - +# making the toolchain stricter +if test "x$enable_fatal_warnings" = xyes; then + TP_ADD_LINKER_FLAG([ERROR_LDFLAGS], [-Wl,--no-copy-dt-needed-entries]) +fi + AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug],[omit debug code]), enable_debug=$enableval, enable_debug=yes ) diff --git a/extensions/Makefile.am b/extensions/Makefile.am index ae4abf8..d1e147d 100644 --- a/extensions/Makefile.am +++ b/extensions/Makefile.am @@ -5,6 +5,7 @@ AM_CFLAGS = \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ $(TELEPATHY_GLIB_CFLAGS) +AM_LDFLAGS = $(ERROR_LDFLAGS) EXTRA_DIST = \ all.xml \ diff --git a/rakia/Makefile.am b/rakia/Makefile.am index 48e5786..ea8dd7d 100644 --- a/rakia/Makefile.am +++ b/rakia/Makefile.am @@ -12,6 +12,7 @@ AM_CPPFLAGS = @GLIB_CFLAGS@ @TELEPATHY_GLIB_CFLAGS@ @SOFIA_SIP_UA_CFLAGS@ \ -I$(top_builddir) -I$(top_srcdir) AM_CFLAGS = $(ERROR_CFLAGS) $(COVERAGE_CFLAGS) +AM_LDFLAGS = $(ERROR_LDFLAGS) rakia_includedir = $(includedir)/telepathy-rakia-0.7/rakia diff --git a/src/Makefile.am b/src/Makefile.am index cf22c22..b1db877 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,6 +19,7 @@ AM_CPPFLAGS = $(DBUS_CFLAGS) $(GLIB_CFLAGS) $(SOFIA_SIP_UA_CFLAGS) \ -I$(top_builddir) -I$(top_srcdir) \ -DG_LOG_DOMAIN=\"rakia\" AM_CFLAGS = $(ERROR_CFLAGS) $(COVERAGE_CFLAGS) +AM_LDFLAGS = $(ERROR_LDFLAGS) ALL_LIBS = $(DBUS_LIBS) $(GLIB_LIBS) $(SOFIA_SIP_UA_LIBS) \ $(TELEPATHY_GLIB_LIBS) $(IPHB_LIBS) |