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] tools: disable linker --as-needed option

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] tools: disable linker --as-needed option
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 01 Feb 2011 09:09:45 +0000
Cc: Nathan March <nathan@xxxxxx>
Delivery-date: Tue, 01 Feb 2011 01:10:47 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 1296550939 0
# Node ID a3fb60cc3be3dc6596ed8395e0eb70514bdfcc74
# Parent  5b6663ba2bb2c54e8fa6745afa16297ebe43328d
tools: disable linker --as-needed option.

The Xen build system is not currently compatible with the --as-needed
linker option. The proper fix for this is turning out to be rather
invasive to the build system so simply disable for now with the
intention of revisiting for the 4.2 release.

The $(COMMA) trick allows "," in macro arguments.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Reported/Tested-by: Nathan March <nathan@xxxxxx>

diff -r 5b6663ba2bb2 -r a3fb60cc3be3 tools/Rules.mk
--- a/tools/Rules.mk    Mon Jan 31 09:14:52 2011 +0000
+++ b/tools/Rules.mk    Tue Feb 01 09:02:19 2011 +0000
@@ -55,6 +55,10 @@ LDFLAGS += $(shell getconf LFS_LDFLAGS)
 LDFLAGS += $(shell getconf LFS_LDFLAGS)
 endif
 
+# Xen tools build is currently incompatible with ld --as-needed
+COMMA := ,
+LDFLAGS += $(call cc-option,$(CC),-Wl$(COMMA)--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)

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