summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2010-06-12 11:30:14 +0300
committerModestas Vainius <modestas@vainius.eu>2010-06-12 11:48:08 +0300
commit080771bbeafed83166649ed8b63609a7e5eed04b (patch)
treefc80c635d7758a651bc6eb3c5ef103edb0c7a975
parent17601b46ee0de63ca4f14e8ab0c987d8543a6bf8 (diff)
downloadpkg-kde-tools-080771bbeafed83166649ed8b63609a7e5eed04b.tar.gz
Add support for DEB_KDE_LINK_WITH_NO_UNDEFINED to variables.mk.
It defaults to DEB_KDE_LINK_WITH_AS_NEEDED value. Needed for kdebindings.
-rw-r--r--debian/README.Debian6
-rw-r--r--debian/changelog2
-rw-r--r--makefiles/1/variables.mk29
3 files changed, 27 insertions, 10 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
index f34da0d..348ea13 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -12,8 +12,10 @@ pkg-kde-tools for Debian
note that /usr/share/pkg-kde-tools/makefiles/1/debhelper/kde.mk has been
dropped in pkg-kde-tools 0.7.0.
- Note: to enable linking with --as-needed (disabled by default), you should set
- DEB_KDE_LINK_WITH_AS_NEEDED to 'yes' before the include.
+ In order to link with --as-needed (disabled by default), you could set
+ DEB_KDE_LINK_WITH_AS_NEEDED to 'yes' before the include. However, please note
+ that enabling DEB_KDE_LINK_WITH_AS_NEEDED implicitly links with --no-undefined
+ as well unless DEB_KDE_LINK_WITH_NO_UNDEFINED is set to `no`.
Using with Debhelper Command Sequencer `dh`
------------------------------------------
diff --git a/debian/changelog b/debian/changelog
index 9f5686c..7f32dd0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ pkg-kde-tools (0.9.2) UNRELEASED; urgency=low
* Add libdpkg-perl (>= 1.15.6~) to Build-Depends. Needed for symbolshelper
syntax checks.
+ * Add support for DEB_KDE_LINK_WITH_NO_UNDEFINED (defaults to
+ DEB_KDE_LINK_WITH_AS_NEEDED value) to variables.mk.
-- Modestas Vainius <modax@debian.org> Fri, 11 Jun 2010 16:36:59 +0300
diff --git a/makefiles/1/variables.mk b/makefiles/1/variables.mk
index 6957062..58dc003 100644
--- a/makefiles/1/variables.mk
+++ b/makefiles/1/variables.mk
@@ -19,15 +19,28 @@ endif
# with --as-needed (off by default)
DEB_KDE_LINK_WITH_AS_NEEDED ?= no
ifneq (,$(findstring yes, $(DEB_KDE_LINK_WITH_AS_NEEDED)))
+ DEB_KDE_LINK_WITH_AS_NEEDED := no
ifeq (,$(findstring no-as-needed, $(DEB_BUILD_OPTIONS)))
DEB_KDE_LINK_WITH_AS_NEEDED := yes
- DEB_CMAKE_CUSTOM_FLAGS += \
- -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--no-undefined -Wl,--as-needed" \
- -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--no-undefined -Wl,--as-needed" \
- -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined -Wl,--as-needed"
- else
- DEB_KDE_LINK_WITH_AS_NEEDED := no
+ DEB_KDE_LINKER_FLAGS := -Wl,--as-needed
endif
-else
- DEB_KDE_LINK_WITH_AS_NEEDED := no
+endif
+
+# Set the DEB_KDE_LINK_WITH_NO_UNDEFINED to no to disable linking with
+# --no-undefined (default value is inherited from DEB_KDE_LINK_WITH_AS_NEEDED
+# (legacy behaviour))
+DEB_KDE_LINK_WITH_NO_UNDEFINED ?= $(DEB_KDE_LINK_WITH_AS_NEEDED)
+ifneq (,$(findstring yes, $(DEB_KDE_LINK_WITH_NO_UNDEFINED)))
+ DEB_KDE_LINK_WITH_NO_UNDEFINED := no
+ ifeq (,$(findstring no-no-undefined, $(DEB_BUILD_OPTIONS)))
+ DEB_KDE_LINK_WITH_NO_UNDEFINED := yes
+ DEB_KDE_LINKER_FLAGS += -Wl,--no-undefined
+ endif
+endif
+
+ifneq (,$(DEB_KDE_LINKER_FLAGS))
+ DEB_CMAKE_CUSTOM_FLAGS += \
+ -DCMAKE_SHARED_LINKER_FLAGS="$(DEB_KDE_LINKER_FLAGS)" \
+ -DCMAKE_MODULE_LINKER_FLAGS="$(DEB_KDE_LINKER_FLAGS)" \
+ -DCMAKE_EXE_LINKER_FLAGS="$(DEB_KDE_LINKER_FLAGS)"
endif