From: Jacek Konieczny <jajcus@jajcus.net>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 1/3] Fix linking order
Date: Fri, 2 Nov 2012 16:39:48 +0100 [thread overview]
Message-ID: <1351870790-22294-2-git-send-email-jajcus@jajcus.net> (raw)
In-Reply-To: <1351870790-22294-1-git-send-email-jajcus@jajcus.net>
Objects should generally be listed before the libraries they require.
DLM building fails for me without these changes.
Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
---
dlm_controld/Makefile | 4 ++--
dlm_tool/Makefile | 2 +-
fence/Makefile | 2 +-
libdlm/Makefile | 8 ++++----
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile
index d279b0d..f42a913 100644
--- a/dlm_controld/Makefile
+++ b/dlm_controld/Makefile
@@ -62,10 +62,10 @@ LIB_LDFLAGS += -Wl,-z,relro -pie
all: $(LIB_TARGET) $(BIN_TARGET)
$(BIN_TARGET): $(BIN_SOURCE)
- $(CC) $(BIN_CFLAGS) $(BIN_LDFLAGS) $(BIN_SOURCE) -o $@ -L.
+ $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -L.
$(LIB_TARGET): $(LIB_SOURCE)
- $(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR) $^
+ $(CC) $^ $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_SMAJOR)
ln -sf $(LIB_TARGET) $(LIB_SO)
ln -sf $(LIB_TARGET) $(LIB_SMAJOR)
diff --git a/dlm_tool/Makefile b/dlm_tool/Makefile
index fe43677..c16d8f5 100644
--- a/dlm_tool/Makefile
+++ b/dlm_tool/Makefile
@@ -39,7 +39,7 @@ BIN_LDFLAGS += -lpthread -ldlm -ldlmcontrol
all: $(BIN_TARGET)
$(BIN_TARGET): $(BIN_SOURCE)
- $(CC) $(BIN_CFLAGS) $(BIN_LDFLAGS) $(BIN_SOURCE) -o $@
+ $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@
clean:
rm -f *.o *.so *.so.* $(BIN_TARGET)
diff --git a/fence/Makefile b/fence/Makefile
index 0f1a29c..b4c59dd 100644
--- a/fence/Makefile
+++ b/fence/Makefile
@@ -40,7 +40,7 @@ BIN_LDFLAGS += -ldl
all: $(BIN_TARGET)
$(BIN_TARGET): $(BIN_SOURCE)
- $(CC) $(BIN_CFLAGS) $(BIN_LDFLAGS) $(BIN_SOURCE) -o $@ -L.
+ $(CC) $(BIN_SOURCE) $(BIN_CFLAGS) $(BIN_LDFLAGS) -o $@ -L.
clean:
rm -f *.o *.so *.so.* $(BIN_TARGET)
diff --git a/libdlm/Makefile b/libdlm/Makefile
index 565a600..76d3504 100644
--- a/libdlm/Makefile
+++ b/libdlm/Makefile
@@ -86,18 +86,18 @@ LLT_LDFLAGS += $(LDFLAGS)
all: $(LIB_TARGET) $(LLT_TARGET) $(LIB_PC) $(LLT_PC)
$(LIB_O): $(SOURCE)
- $(CC) $(LIB_CFLAGS) -c -o $@ $<
+ $(CC) $< $(LIB_CFLAGS) -c -o $@
$(LLT_O): $(SOURCE)
- $(CC) $(LLT_CFLAGS) -c -o $@ $<
+ $(CC) $< $(LLT_CFLAGS) -c -o $@
$(LIB_TARGET): $(LIB_O)
- $(CC) $(LIB_LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR) $^
+ $(CC) $^ $(LIB_LDFLAGS) -shared -o $@ -Wl,-soname=$(LIB_SMAJOR)
ln -sf $(LIB_TARGET) $(LIB_SO)
ln -sf $(LIB_TARGET) $(LIB_SMAJOR)
$(LLT_TARGET): $(LLT_O)
- $(CC) $(LLT_LDFLAGS) -shared -o $@ -Wl,-soname=$(LLT_SMAJOR) $^
+ $(CC) $^ $(LLT_LDFLAGS) -shared -o $@ -Wl,-soname=$(LLT_SMAJOR)
ln -sf $(LLT_TARGET) $(LLT_SO)
ln -sf $(LLT_TARGET) $(LLT_SMAJOR)
--
1.7.12.4
next prev parent reply other threads:[~2012-11-02 15:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-02 15:39 [Cluster-devel] DLM patches from PLD Linux Jacek Konieczny
2012-11-02 15:39 ` Jacek Konieczny [this message]
2012-11-02 15:39 ` [Cluster-devel] [PATCH 2/3] Run dlm.service after sys-kernel-config.mount Jacek Konieczny
2012-11-02 15:39 ` [Cluster-devel] [PATCH 3/3] Do not crash uncleanly on SIGINT and SIGHUP Jacek Konieczny
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=1351870790-22294-2-git-send-email-jajcus@jajcus.net \
--to=jajcus@jajcus.net \
/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;
as well as URLs for NNTP newsgroup(s).