xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 4 of 4] tools: support building with --as-needed
Date: Tue, 15 Mar 2011 16:16:07 +0000	[thread overview]
Message-ID: <ec906d89bd42120407bb.1300205767@localhost.localdomain> (raw)
In-Reply-To: <patchbomb.1300205763@localhost.localdomain>

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1300205703 0
# Node ID ec906d89bd42120407bb53d28d31079162b37286
# Parent  4446ee65519b4fcd894b08cf091c5aed935d0e74
tools: support building with --as-needed

Tested by forcing --as-needed via tools/Rules.mk but this is included
since the intention is simply to support diustros which default to
--as-needed, not to enable it everywhere.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r 4446ee65519b -r ec906d89bd42 tools/Rules.mk
--- a/tools/Rules.mk	Tue Mar 15 16:10:33 2011 +0000
+++ b/tools/Rules.mk	Tue Mar 15 16:15:03 2011 +0000
@@ -65,9 +65,6 @@ LDFLAGS += $(shell getconf LFS_LDFLAGS)
 LDFLAGS += $(shell getconf LFS_LDFLAGS)
 endif
 
-# Xen tools build is currently incompatible with ld --as-needed
-LDFLAGS += -Wl,--no-as-needed
-
 # 32-bit x86 does not perform well with -ve segment accesses on Xen.
 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
 CFLAGS += $(CFLAGS-y)
diff -r 4446ee65519b -r ec906d89bd42 tools/blktap2/vhd/lib/Makefile
--- a/tools/blktap2/vhd/lib/Makefile	Tue Mar 15 16:10:33 2011 +0000
+++ b/tools/blktap2/vhd/lib/Makefile	Tue Mar 15 16:15:03 2011 +0000
@@ -57,7 +57,7 @@ build: $(LIBVHD-BUILD)
 
 libvhd.a: $(LIB-OBJS)
 	$(CC) $(CFLAGS) -Wl,$(SONAME_LDFLAG),$(LIBVHD-SONAME) $(SHLIB_LDFLAGS) \
-		$(LDFLAGS) -o libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(LIBS) $^
+		$(LDFLAGS) -o libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $^ $(LIBS)
 	ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) libvhd.so.$(LIBVHD-MAJOR)
 	ln -sf libvhd.so.$(LIBVHD-MAJOR) libvhd.so
 	$(AR) rc $@ $^
diff -r 4446ee65519b -r ec906d89bd42 tools/libxc/Makefile
--- a/tools/libxc/Makefile	Tue Mar 15 16:10:33 2011 +0000
+++ b/tools/libxc/Makefile	Tue Mar 15 16:15:03 2011 +0000
@@ -159,7 +159,7 @@ libxenctrl.so.$(MAJOR): libxenctrl.so.$(
 	ln -sf $< $@
 
 libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
-	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(DLOPEN_LIBS) $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(DLOPEN_LIBS) $(PTHREAD_LIBS)
 
 # libxenguest

  parent reply	other threads:[~2011-03-15 16:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15 16:16 [PATCH 0 of 4] tools: build system fix indirect library usage and --as-needed Ian Campbell
2011-03-15 16:16 ` [PATCH 1 of 4] tools/blktap2: push uuid wrapper functions down into libvhd Ian Campbell
2011-03-15 16:16 ` [PATCH 2 of 4] tools/blktap2/libvhd: move uuid wrapper functions out of line Ian Campbell
2011-03-15 16:42   ` Daniel Stodden
2011-03-15 16:16 ` [PATCH 3 of 4] tools: link each shared library or binary only against the libraries it uses Ian Campbell
2011-03-15 16:16 ` Ian Campbell [this message]
2011-03-15 16:18 ` [PATCH 0 of 4] tools: build system fix indirect library usage and --as-needed Ian Campbell
2011-03-17 19:17   ` Ian Jackson

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=ec906d89bd42120407bb.1300205767@localhost.localdomain \
    --to=ian.campbell@citrix.com \
    --cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).