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

Re: [Xen-devel] [PATCH][XTF] don't require x32 support in binutils



On 14/12/16 13:07, Jan Beulich wrote:
Older binutils don't have this at all, and newer may not have it
configured in.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, although


--- a/build/gen.mk
+++ b/build/gen.mk
@@ -40,6 +40,8 @@ install: install-each-env info.json
 	@$(INSTALL_DIR) $(DESTDIR)$(xtftestdir)/$(NAME)
 	$(INSTALL_DATA) info.json $(DESTDIR)$(xtftestdir)/$(NAME)
 
+hvm64-format := $(firstword $(filter elf32-x86-64,$(shell $(OBJCOPY) --help)) elf32-i386)
+
 define PERENV_build
 
 ifneq ($(1),hvm64)
@@ -47,10 +49,10 @@ install: install-each-env info.json
 test-$(1)-$(NAME): $$(DEPS-$(1)) $$(link-$(1))
 	$$(LD) $$(LDFLAGS_$(1)) $$(DEPS-$(1)) -o $$@
 else
-# hvm64 needs linking normally, then converting to elf32-x86-64
+# hvm64 needs linking normally, then converting to elf32-x86-64 or elf32-i386
 test-$(1)-$(NAME): $$(DEPS-$(1)) $$(link-$(1))
 	$$(LD) $$(LDFLAGS_$(1)) $$(DEPS-$(1)) -o $$@.tmp
-	$$(OBJCOPY) $$@.tmp -O elf32-x86-64 $$@
+	$(OBJCOPY) $$@.tmp -O $(hvm64-format) $$@

This needs to stays as $(OBJCOPY) as this code gets eval()'d once before running.

 	rm -f $$@.tmp
 endif
 





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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