All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - Makefiles for tools/loader/{hvmloader|vmxassist}
@ 2006-03-31 21:24 Ben Thomas
  2006-04-01  9:03 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Thomas @ 2006-03-31 21:24 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

Fix makefiles for hvmloader and vmxassist for FC5 on x86_64
systems.

In FC5, gcc has issues with the command lines used to build
hvmloader and vmxassist.  Basically, the compiler doesn't
like the combination of -m64 and -m32.  As these are 32 bit
apps, and intended to be, take a modified approach and simply
define XEN_TARGET_ARCH for 32 bits.  This cleans up the
command line and builds the images correctly.

We could also wait for a gcc fix, but...

Signed-off-by: Ben Thomas (ben@virtualiron.com)

-- 
------------------------------------------------------------------------
Ben Thomas                                         Virtual Iron Software
bthomas@virtualiron.com                            Tower 1, Floor 2
978-849-1214                                       900 Chelmsford Street
                                                    Lowell, MA 01851

[-- Attachment #2: m.patch --]
[-- Type: text/x-patch, Size: 1280 bytes --]

diff -r 6730b42c7289 tools/firmware/hvmloader/Makefile
--- a/tools/firmware/hvmloader/Makefile	Fri Mar 31 14:28:59 2006 -0500
+++ b/tools/firmware/hvmloader/Makefile	Fri Mar 31 15:58:44 2006 -0500
@@ -21,6 +21,7 @@
 # External CFLAGS can do more harm than good.
 CFLAGS :=
 
+XEN_TARGET_ARCH = x86_32
 XEN_ROOT = ../../..
 include $(XEN_ROOT)/Config.mk
 
@@ -39,7 +40,6 @@ CFLAGS  += $(call test-gcc-flag,$(CC),-f
 
 OBJCOPY  = objcopy
 CFLAGS  += $(DEFINES) -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
-CFLAGS  += -m32 -march=i686
 LDFLAGS  = -m32 -nostdlib -Wl,-N -Wl,-Ttext -Wl,$(LOADADDR)
 
 all: hvmloader
diff -r 6730b42c7289 tools/firmware/vmxassist/Makefile
--- a/tools/firmware/vmxassist/Makefile	Fri Mar 31 14:28:59 2006 -0500
+++ b/tools/firmware/vmxassist/Makefile	Fri Mar 31 15:58:44 2006 -0500
@@ -21,6 +21,7 @@
 # External CFLAGS can do more harm than good.
 CFLAGS :=
 
+XEN_TARGET_ARCH = x86_32
 XEN_ROOT = ../../..
 include $(XEN_ROOT)/Config.mk
 
@@ -38,7 +39,6 @@ CPP      = cpp -P
 CPP      = cpp -P
 OBJCOPY  = objcopy -p -O binary -R .note -R .comment -R .bss -S --gap-fill=0
 CFLAGS  += $(DEFINES) -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
-CFLAGS  += -m32 -march=i686
 LDFLAGS  = -m elf_i386
 
 OBJECTS = head.o trap.o vm86.o setup.o util.o

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] - Makefiles for tools/loader/{hvmloader|vmxassist}
  2006-03-31 21:24 [PATCH] - Makefiles for tools/loader/{hvmloader|vmxassist} Ben Thomas
@ 2006-04-01  9:03 ` Keir Fraser
  2006-04-01 11:12   ` Ben Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2006-04-01  9:03 UTC (permalink / raw)
  To: Ben Thomas; +Cc: xen-devel


On 31 Mar 2006, at 22:24, Ben Thomas wrote:

> In FC5, gcc has issues with the command lines used to build
> hvmloader and vmxassist.  Basically, the compiler doesn't
> like the combination of -m64 and -m32.  As these are 32 bit
> apps, and intended to be, take a modified approach and simply
> define XEN_TARGET_ARCH for 32 bits.  This cleans up the
> command line and builds the images correctly.
>
> We could also wait for a gcc fix, but...

No, this patch is sane. Putting both switches on the command line makes 
no sense. I wonder whether to simply put 'CFLAGS :=' *after* the 
include of Rules.mk though.

  -- Keir

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] - Makefiles for tools/loader/{hvmloader|vmxassist}
  2006-04-01  9:03 ` Keir Fraser
@ 2006-04-01 11:12   ` Ben Thomas
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Thomas @ 2006-04-01 11:12 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1422 bytes --]


-----Original Message-----
From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk]
Sent: Sat 4/1/2006 4:03 AM
To: Ben Thomas
Cc: xen-devel@lists.xensource.com
Subject: Re: [Xen-devel] [PATCH] - Makefiles for tools/loader/{hvmloader|vmxassist}
 

On 31 Mar 2006, at 22:24, Ben Thomas wrote:

> In FC5, gcc has issues with the command lines used to build
> hvmloader and vmxassist.  Basically, the compiler doesn't
> like the combination of -m64 and -m32.  As these are 32 bit
> apps, and intended to be, take a modified approach and simply
> define XEN_TARGET_ARCH for 32 bits.  This cleans up the
> command line and builds the images correctly.
>
> We could also wait for a gcc fix, but...

No, this patch is sane. Putting both switches on the command line makes 
no sense. I wonder whether to simply put 'CFLAGS :=' *after* the 
include of Rules.mk though.

  -- Keir



Possibly.  I have a feeling that CFLAGS wasn't the only thing.  Perhaps LDFLAGS got modified as well ?  I cannot recall.  The image really needs to be 32 bits, as near as I can see. 

I tried a few options, but eventually tired of trying to outguess make and gcc.  In the end, this is a 32 bit app and this patch worked.  However, you're more familiar with the environment than I am. As long as it builds/works, I'm happy.  I actually waited a few days to see if someone else would fix it before I did.

Thanks,
-b



[-- Attachment #1.2: Type: text/html, Size: 2104 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-01 11:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-31 21:24 [PATCH] - Makefiles for tools/loader/{hvmloader|vmxassist} Ben Thomas
2006-04-01  9:03 ` Keir Fraser
2006-04-01 11:12   ` Ben Thomas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.