From: Ian Kent <raven@themaw.net>
To: autofs mailing list <autofs@vger.kernel.org>
Cc: Gordon Lack <gordon.m.lack@gsk.com>,
"Lan Yixun (dlan)" <dennis.yxun@gmail.com>,
Leonardo Chiquitto <leonardo.lists@gmail.com>,
Dustin Polke <DuPol@gmx.de>
Subject: [PATCH 13/25] autofs-5.0.7 - use LIBS for link libraries
Date: Mon, 19 Aug 2013 09:13:21 +0800 [thread overview]
Message-ID: <20130819011320.6472.97250.stgit@perseus.fritz.box> (raw)
In-Reply-To: <20130819010909.6472.32512.stgit@perseus.fritz.box>
From: Lan Yixun (dlan) <dennis.yxun@gmail.com>
quote:
"Don't use this variable to pass library names (-l) to the linker; use LIBS instead."
see the section "Variable: LDFLAGS" in:
http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/PreseOutput-Variables.html#Preset-Output-Variables
Edited by: Ian Kent <raven@themaw.net>
The variable usage changes for LDFLAGS and LIBS appear to be dependent
on each other so merge them to try and avoid breakage if not all are
used by someone. I also had changed the patch titles slightly when I
imported them but they should be easily recognisable.
- merge patches
- pthread-link-library-should-be-put-into-LIBS-not-LDFLAGS
- library-should-be-passed-via-variable-LIBS-not-LDFLAGS
- accumulate-LIBS-variable-changes-otherwise-we-may-lose-early-settings
- allow-user-to-pass-LDFLAGS-via-configure
- add LIBS to build rules, might fix DMALLOC build problem
Signed-off-by: Lan Yixun (dlan) <dennis.yxun@gmail.com>
---
CHANGELOG | 1 +
Makefile.rules | 10 ++++++----
daemon/Makefile | 2 +-
modules/Makefile | 12 ++++++------
4 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index ec9d7f0..3af7ece 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -65,6 +65,7 @@
- add missing libtirpc lib to mount_nfs.so when TIRPC enabled.
- use compiler determined by configure instead of hard-coded ones.
- remove hard-coded STRIP variable.
+- use LIBS for link libraries.
25/07/2012 autofs-5.0.7
=======================
diff --git a/Makefile.rules b/Makefile.rules
index d00ba3c..fa53459 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -45,17 +45,19 @@ LD ?= ld
SOLDFLAGS = -shared
CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64
-LDFLAGS += -lpthread
+LIBS += -lpthread
ifdef TIRPCLIB
CFLAGS += -I/usr/include/tirpc
-LDFLAGS += $(TIRPCLIB)
+LIBS += $(TIRPCLIB)
endif
ifdef DMALLOCLIB
-LDFLAGS += $(DMALLOCLIB)
+LIBS += $(DMALLOCLIB)
endif
+LIBS += $(LIBNSL)
+
# Standard rules
.SUFFIXES: .c .o .s .so
@@ -67,5 +69,5 @@ endif
$(CC) $(CFLAGS) -S $<
.c.so:
- $(CC) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(AUTOFS_LIB) $(DMALLOCLIB) $(LIBNSL)
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(AUTOFS_LIB) $(LIBS)
$(STRIP) $*.so
diff --git a/daemon/Makefile b/daemon/Makefile
index 9e9d635..6604c9a 100644
--- a/daemon/Makefile
+++ b/daemon/Makefile
@@ -20,7 +20,7 @@ CFLAGS += -DAUTOFS_FIFO_DIR=\"$(autofsfifodir)\"
CFLAGS += -DAUTOFS_FLAG_DIR=\"$(autofsflagdir)\"
CFLAGS += -DVERSION_STRING=\"$(version)\"
LDFLAGS += -rdynamic
-LIBS = -ldl
+LIBS += -ldl
ifeq ($(LDAP), 1)
CFLAGS += $(XML_FLAGS)
diff --git a/modules/Makefile b/modules/Makefile
index e61e338..de01ebd 100644
--- a/modules/Makefile
+++ b/modules/Makefile
@@ -98,8 +98,8 @@ endif
# Ad hoc compilation rules for modules which need auxilliary libraries
#
lookup_hesiod.so: lookup_hesiod.c
- $(CC) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
- lookup_hesiod.c $(AUTOFS_LIB) $(LIBHESIOD) $(LIBRESOLV)
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
+ lookup_hesiod.c $(AUTOFS_LIB) $(LIBHESIOD) $(LIBRESOLV) $(LIBS)
$(STRIP) lookup_hesiod.so
cyrus-sasl.o: cyrus-sasl.c
@@ -109,13 +109,13 @@ cyrus-sasl-extern.o: cyrus-sasl-extern.c
$(CC) $(CFLAGS) $(LDAP_FLAGS) -c $<
lookup_ldap.so: lookup_ldap.c dclist.o base64.o $(SASL_OBJ)
- $(CC) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
lookup_ldap.c dclist.o base64.o $(SASL_OBJ) \
- $(AUTOFS_LIB) $(LIBLDAP) $(LIBRESOLV)
+ $(AUTOFS_LIB) $(LIBLDAP) $(LIBRESOLV) $(LIBS)
$(STRIP) lookup_ldap.so
mount_nfs.so: mount_nfs.c replicated.o
- $(CC) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
- mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL) $(TIRPCLIB)
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
+ mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBS)
$(STRIP) mount_nfs.so
next prev parent reply other threads:[~2013-08-19 1:13 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 1:11 [PATCH 00/25] Current autofs patch queue Ian Kent
2013-08-19 1:11 ` [PATCH 01/25] autofs-5.0.7 - don't override LDFLAGS in make rules Ian Kent
2013-08-19 1:12 ` [PATCH 02/25] autofs-5.0.7 - fix a couple of compiler warnings Ian Kent
2013-08-19 1:12 ` [PATCH 03/25] autofs-5.0.7 - add after sssd dependency to unit file Ian Kent
2013-08-19 1:12 ` [PATCH 04/25] autofs-5.0.7 - dont start readmap unless ready Ian Kent
2013-08-19 1:12 ` [PATCH 05/25] autofs-5.0.7 - fix crash due to thread unsafe use of libldap Ian Kent
2013-08-19 1:12 ` [PATCH 06/25] autofs-5.0.7 - fix compile error with heimdal support enabled Ian Kent
2013-08-20 3:36 ` Dennis Lan (dlan)
2013-08-20 7:34 ` Ian Kent
2013-08-19 1:12 ` [PATCH 07/25] autofs-5.0.7 - fix typo forced-shutdown should be force-shutdown Ian Kent
2013-08-19 1:12 ` [PATCH 08/25] autofs-5.0.7 - fix hesiod check error and use correct $(LIBS) setting Ian Kent
2013-08-19 1:12 ` [PATCH 09/25] autofs-5.0.7 - fix dead LDAP symbolic link when LDAP support is disabled Ian Kent
2013-08-19 1:13 ` [PATCH 10/25] autofs-5.0.7 - add missing libtirpc lib to mount_nfs.so when TIRPC enabled Ian Kent
2013-08-19 1:13 ` [PATCH 11/25] autofs-5.0.7 - use compiler determined by configure instead of hard-coded ones Ian Kent
2013-08-19 1:13 ` [PATCH 12/25] autofs-5.0.7 - remove hard-coded STRIP variable Ian Kent
2013-08-19 1:13 ` Ian Kent [this message]
2013-08-19 1:13 ` [PATCH 14/25] autofs-5.0.7 - unbundle NOTSTRIP from DEBUG so they dont depend on each other Ian Kent
2013-08-19 1:13 ` [PATCH 15/25] autofs-5.0.7 - fix occasional build error when enable parallel compiling Ian Kent
2013-08-19 1:13 ` [PATCH 16/25] autofs-5.0.7 - fix compilation of lookup_ldap.c without sasl Ian Kent
2013-08-19 1:13 ` [PATCH 17/25] autofs-5.0.7 - fix dumpmaps multi output Ian Kent
2013-08-19 1:13 ` [PATCH 18/25] autofs-5.0.7 - try and cleanup after dumpmaps Ian Kent
2013-08-19 1:14 ` [PATCH 19/25] autofs-5.0.7 - teach dumpmaps to output simple key value pairs Ian Kent
2013-08-19 1:14 ` [PATCH 20/25] autofs-5.0.7 - fix syncronize handle_mounts() shutdown Ian Kent
2013-08-19 1:14 ` [PATCH 21/25] autofs-5.0.7 - fix fix wildcard multi map regression Ian Kent
2013-08-19 1:14 ` [PATCH 22/25] autofs-5.0.7 - improve timeout option description Ian Kent
2013-08-19 1:14 ` [PATCH 23/25] autofs-5.0.7 - only probe specific nfs version when requested Ian Kent
2013-08-19 1:14 ` [PATCH 24/25] autofs-5.0.7 - fix bad mkdir permission on create Ian Kent
2013-08-19 2:13 ` Ian Kent
2013-08-19 1:14 ` [PATCH 25/25] autofs-5.0.7 - setup program map env from macro table Ian Kent
2013-08-19 5:30 ` [PATCH 00/25] Current autofs patch queue Dennis Lan (dlan)
2013-08-20 2:55 ` Ian Kent
2013-08-20 4:52 ` Dennis Lan (dlan)
2013-09-02 10:34 ` Martin Wilck
2013-09-02 10:41 ` Gordon Lack
2013-09-02 11:04 ` Martin Wilck
2013-09-02 11:13 ` Gordon Lack
2013-09-02 12:17 ` Martin Wilck
2013-09-02 12:55 ` Gordon Lack
2013-09-02 13:15 ` Martin Wilck
2013-09-02 13:41 ` Gordon Lack
2013-09-02 14:11 ` Martin Wilck
2013-09-02 14:20 ` Gordon Lack
2013-09-02 14:49 ` Martin Wilck
2013-09-02 15:08 ` Gordon Lack
2013-09-02 15:23 ` Martin Wilck
2013-09-02 15:36 ` Gordon Lack
2013-09-06 8:11 ` Ian Kent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130819011320.6472.97250.stgit@perseus.fritz.box \
--to=raven@themaw.net \
--cc=DuPol@gmx.de \
--cc=autofs@vger.kernel.org \
--cc=dennis.yxun@gmail.com \
--cc=gordon.m.lack@gsk.com \
--cc=leonardo.lists@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox