WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 4 of 4] tools: support building with --as-needed

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 4 of 4] tools: support building with --as-needed
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 15 Mar 2011 16:16:07 +0000
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 15 Mar 2011 09:21:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1300205763@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# 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@xxxxxxxxxx>

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
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel