Skip to contentSkip to conversation

Fix firmware compile on Solaris

PATCH New [email protected] 1 participant 1 message Jan 28, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix firmware compile on Solaris

# HG changeset patch
# User [email protected]
# Date 1170003890 28800
# Node ID 06be3ee8ffeade0300c23f2233b20eaf6798dccf # Parent 132cc7bc2a356aa058b8550b90d5bb491fe0ea8c Fix firmware compile on Solaris.

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

tools/firmware/hvmloader/32bitbios_support.c +6 -1
@@ -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;
     }
tools/firmware/rombios/32bit/Makefile +1 -1
@@ -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:"; \
tools/firmware/rombios/32bit/tcgbios/Makefile +1 -1
@@ -19,4 +19,4 @@ clean:
 	rm -rf *.o $(TARGET)
 
 $(TARGET): $(OBJECTS)
-	ld $(LDFLAGS_DIRECT) -r $^ -o $@
+	$(LD) $(LDFLAGS_DIRECT) -r $^ -o $@