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

[Xen-devel] [PATCH] Fix firmware compile on Solaris



# HG changeset patch
# User john.levon@xxxxxxx
# Date 1170003890 28800
# Node ID 06be3ee8ffeade0300c23f2233b20eaf6798dccf
# Parent  132cc7bc2a356aa058b8550b90d5bb491fe0ea8c
Fix firmware compile on Solaris.

Use $(LD) not ld. Include right headers for x86 ELF bits.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/tools/firmware/hvmloader/32bitbios_support.c 
b/tools/firmware/hvmloader/32bitbios_support.c
--- a/tools/firmware/hvmloader/32bitbios_support.c
+++ b/tools/firmware/hvmloader/32bitbios_support.c
@@ -17,7 +17,12 @@
  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  * Place - Suite 330, Boston, MA 02111-1307 USA.
  */
+#include <inttypes.h>
 #include <elf.h>
+#ifdef __sun__
+#include <sys/machelf.h>
+#endif
+
 #include <xen/hvm/e820.h>
 #include "util.h"
 #include "config.h"
@@ -35,7 +40,7 @@ static int relocate_elf(unsigned char *e
     int i;
 
     if (ehdr->e_type != ET_REL) {
-        printf("Not a relocatabel BIOS object file. Has type %d, need %d\n",
+        printf("Not a relocatable BIOS object file. Has type %d, need %d\n",
                ehdr->e_type, ET_REL);
         return -1;
     }
diff --git a/tools/firmware/rombios/32bit/Makefile 
b/tools/firmware/rombios/32bit/Makefile
--- a/tools/firmware/rombios/32bit/Makefile
+++ b/tools/firmware/rombios/32bit/Makefile
@@ -30,7 +30,7 @@ clean:
        done;
 
 $(TARGET): subdirs 32bitbios.o util.o
-       ld $(LDFLAGS_DIRECT) -r 32bitbios.o $(MODULES) util.o -o 32bitbios_all.o
+       $(LD) $(LDFLAGS_DIRECT) -r 32bitbios.o $(MODULES) util.o -o 
32bitbios_all.o
        @nm 32bitbios_all.o |                                \
          grep -E -q '^ +U ' && {                            \
            echo "There are undefined symbols in the BIOS:"; \
diff --git a/tools/firmware/rombios/32bit/tcgbios/Makefile 
b/tools/firmware/rombios/32bit/tcgbios/Makefile
--- a/tools/firmware/rombios/32bit/tcgbios/Makefile
+++ b/tools/firmware/rombios/32bit/tcgbios/Makefile
@@ -19,4 +19,4 @@ clean:
        rm -rf *.o $(TARGET)
 
 $(TARGET): $(OBJECTS)
-       ld $(LDFLAGS_DIRECT) -r $^ -o $@
+       $(LD) $(LDFLAGS_DIRECT) -r $^ -o $@

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


 


Rackspace

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