Skip to contentSkip to conversation

stubdom: fix stubdom-vtpm build

PATCH Superseded Juergen Gross 2 participants 3 messages Oct 28, 2016 – Oct 31, 2016 1 message not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stubdom: fix stubdom-vtpm build

stubdom-vtpm needs gmp and expects it under stubdom/cross-root-x86_64/x86_64-xen-elf/lib while gmp seems to install it under stubdom/cross-root-x86_64/x86_64-xen-elf/lib64

Modify the Makefile to account for this by moving the gmp.a file from lib64 to lib if necessary.

---
 stubdom/Makefile | 2 ++
 1 file changed, 2 insertions(+)
stubdom/Makefile +2 -0
index 0252bcc..4851d03 100644
@@ -176,11 +176,13 @@ gmp-$(XEN_TARGET_ARCH): gmp-$(GMP_VERSION).tar.bz2 $(NEWLIB_STAMPFILE)
 	touch $@
 
 GMP_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libgmp.a
+GMP_STAMPFILE64=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib64/libgmp.a
 cross-gmp: $(GMP_STAMPFILE)
 $(GMP_STAMPFILE): gmp-$(XEN_TARGET_ARCH)
 	( cd $< && \
 	  $(MAKE) && \
 	  $(MAKE) DESTDIR= install )
+	if [ ! -f "$(GMP_STAMPFILE)" -a -f "$(GMP_STAMPFILE64)" ]; then mv $(GMP_STAMPFILE64) $(GMP_STAMPFILE); fi
 
 #############
 # cross-polarssl
Signature · 7 lines
2.6.6


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 28.10.16 at 17:10, <[email protected]> wrote:

stubdom-vtpm needs gmp and expects it under stubdom/cross-root-x86_64/x86_64-xen-elf/lib while gmp seems to install it under stubdom/cross-root-x86_64/x86_64-xen-elf/lib64

Are you sure this is universal, rather dependent upon some (possibly even host) configuration item? I think that some distros have switched to (or have always used) /lib as the main library directory for x86-64, while others (like SUSE's) stick to the originally mandated /lib64. Over the years I have found quite a few projects where, in order to become consistent with SUSE's model, I had to override the global default of /lib with /lib64 just for x86-64 (but not for e.g. ia64).

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 5 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 28.10.16 at 17:10, <[email protected]> wrote:

stubdom-vtpm needs gmp and expects it under stubdom/cross-root-x86_64/x86_64-xen-elf/lib while gmp seems to install it under stubdom/cross-root-x86_64/x86_64-xen-elf/lib64

Quoted 8 lines

Are you sure this is universal, rather dependent upon some (possibly even host) configuration item? I think that some distros have switched to (or have always used) /lib as the main library directory for x86-64, while others (like SUSE's) stick to the originally mandated /lib64. Over the years I have found quite a few projects where, in order to become consistent with SUSE's model, I had to override the global default of /lib with /lib64 just for x86-64 (but not for e.g. ia64).

No, I don't think it is universal. This is the reason I did the move of the file only in case it is to be found under lib64 but not under lib.

I've tested the build to break with plain

./configure

and with

./configure --prefix=/usr --libdir=/usr/lib64

which I use normally to match my SUSE environment.

OTOH looking at Wei's recent patch to modify gmp's configure to specify cross compilation I now believe the correct answer to my problem is to add

--libdir=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib

to the configure statement of gmp. I'll send V2 of the patch.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel