summaryrefslogtreecommitdiff
path: root/qt-kde-team/2
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2011-03-09 14:27:38 +0200
committerModestas Vainius <modestas@vainius.eu>2011-03-09 14:27:38 +0200
commit7d2e771653e5ef5998e4a131344abdb75f1e4788 (patch)
treebbd80721531f0a8c0b55adacc2fd389bdef5fd77 /qt-kde-team/2
parentc67aa9c3561cc93df8cba671f53620d148b18f28 (diff)
downloadpkg-kde-tools-7d2e771653e5ef5998e4a131344abdb75f1e4788.tar.gz
Implement link_with_as_needed and link_with_no_undefined in dqk v2.
Formerly DEB_KDE_LINK_WITH_AS_NEEDED and DEB_KDE_LINK_WITH_NO_UNDEFINED.
Diffstat (limited to 'qt-kde-team/2')
-rw-r--r--qt-kde-team/2/TODO1
-rw-r--r--qt-kde-team/2/debian-qt-kde.mk22
2 files changed, 20 insertions, 3 deletions
diff --git a/qt-kde-team/2/TODO b/qt-kde-team/2/TODO
index 158c8e1..62b72a6 100644
--- a/qt-kde-team/2/TODO
+++ b/qt-kde-team/2/TODO
@@ -1,3 +1,2 @@
-* DEB_KDE_LINK_WITH_AS_NEEDED
* policy
* --remaining-packages on the second and subsequent reruns (without clean)
diff --git a/qt-kde-team/2/debian-qt-kde.mk b/qt-kde-team/2/debian-qt-kde.mk
index 6a62625..8bb3d49 100644
--- a/qt-kde-team/2/debian-qt-kde.mk
+++ b/qt-kde-team/2/debian-qt-kde.mk
@@ -19,9 +19,27 @@ $(call set_command_options,dh_auto_%, += --parallel)
# DEB_KDE_DISABLE_POLICY_CHECK ?=
# include $(DEB_PKG_KDE_QT_KDE_TEAM)/policy.mk
-# TODO:
# Link with --as-needed by default
-# DEB_KDE_LINK_WITH_AS_NEEDED ?= yes
+# (subject to be moved to kde dh addon/debhelper buildsystem)
+link_with_as_needed ?= yes
+ifneq (,$(findstring yes, $(link_with_as_needed)))
+ link_with_as_needed := no
+ ifeq (,$(findstring no-as-needed, $(DEB_BUILD_OPTIONS)))
+ link_with_as_needed := yes
+ export LDFLAGS += -Wl,--as-needed
+ endif
+endif
+
+# Set the link_with_no_undefined=no in order to disable linking with
+# --no-undefined (default value is inherited from $(link_with_as_needed))
+link_with_no_undefined ?= $(link_with_as_needed)
+ifneq (,$(findstring yes, $(link_with_no_undefined)))
+ link_with_no_undefined := no
+ ifeq (,$(findstring no-no-undefined, $(DEB_BUILD_OPTIONS)))
+ link_with_no_undefined := yes
+ export LDFLAGS += -Wl,--no-undefined
+ endif
+endif
# Since cmake 2.6.2 or higher is required from now on, enable relative paths to
# get more ccache hits.