[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 7/9] stubdom: fix unfound libgmp library issues

From: "Luis R. Rodriguez" <mcgrof@xxxxxxxx>

With binutils 2.25.0 libgmp is not found. When building
studom's we build our own libgmp for each minios. On
x86-64 all libraries are put on the directory:


The exception is libgmp, it gets tosse don lib64. It doesn't
seem the latest linker might amend lib64 as a default search
path when using -nostdlib -- I cannot confirm from binutils
code changes that's the case yet, but at least through the
observed behaviour that seems to be the case.

Be explicit and peg the lib64 directory as part of the search
path as well when on x86-64. This fixes the following final
linker error:

ld -r -d -nostdlib
-m elf_x86_64 -\( /sda3/home/mcgrof/devel/xen/stubdom/vtpm/vtpm.a -T
app.lds -\) -ltpm -ltpm_crypto -lgmp -lpolarssl --undefined main -o
ld: cannot find -lgmp

Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxx>
 stubdom/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index e1359cfaf7e5..e01be070bf26 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -53,6 +53,11 @@ TARGET_CPPFLAGS += -I$(CURDIR)/include
 TARGET_CPPFLAGS += -I$(XEN_ROOT)/xen/include
 TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib
+# lib64 is not pegged as default search path for archs for some versions
+# of binutils, its where libgmp gets tossed, so be explicit
+ifeq ($(XEN_TARGET_ARCH),x86_64)

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.