Fix firmware compile on Solaris.
authorkaf24@localhost.localdomain <kaf24@localhost.localdomain>
Sun, 28 Jan 2007 18:45:04 +0000 (18:45 +0000)
committerkaf24@localhost.localdomain <kaf24@localhost.localdomain>
Sun, 28 Jan 2007 18:45:04 +0000 (18:45 +0000)
Use $(LD) not ld. Include right headers for x86 ELF bits.

Signed-off-by: John Levon <john.levon@sun.com>
tools/firmware/hvmloader/32bitbios_support.c
tools/firmware/rombios/32bit/Makefile
tools/firmware/rombios/32bit/tcgbios/Makefile

index f8a9e85975aa3b836bb28331947d8c22471ebaca..f9274090cc139b9dad3b829c39e4959974e156fa 100644 (file)
  * 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 *elfarray) {
     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;
     }
index 01e68646837a48f2fbd07c148b45a1284f7a98cd..f47e1dbf982fb056a6c333858d176ba8c2d70f0e 100644 (file)
@@ -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:"; \
index 44b115ebad8546f68ce918bec184a65c97082bfe..871b8d6c31263a4fb93b582f8fdde948ce05c7cd 100644 (file)
@@ -19,4 +19,4 @@ clean:
        rm -rf *.o $(TARGET)
 
 $(TARGET): $(OBJECTS)
-       ld $(LDFLAGS_DIRECT) -r $^ -o $@
+       $(LD) $(LDFLAGS_DIRECT) -r $^ -o $@