Submitted By: Jim Gifford (patches at jg555 dot com)
Date: 2006-01-02
Initial Package Version: 1.4.10
Origin: Rocklinux and Jim Gifford
Upstream Status: Unknown
Description: Fixes Compile issues with Silo
 
diff -Naur silo-1.4.10.orig/Rules.make silo-1.4.10/Rules.make
--- silo-1.4.10.orig/Rules.make	2005-12-03 02:38:20.000000000 +0000
+++ silo-1.4.10/Rules.make	2006-01-02 22:02:15.000000000 +0000
@@ -2,11 +2,15 @@
 IMGVERSION=0.99
 RM=rm -f
 # We want to force 32-bit builds
-CC=gcc -m32
-LD=ld
-AS=as
-STRIP=strip
-NM=nm
+CC=$(CROSS_COMPILE)gcc -m32
+BUILD_CC=gcc
+LD=$(CROSS_COMPILE)ld -m elf32_sparc
+AS=$(CROSS_COMPILE)as
+STRIP=$(CROSS_COMPILE)strip
+NM=$(CROSS_COMPILE)nm
+AR=$(CROSS_COMPILE)ar
+RANLIB=$(CROSS_COMPILE)ranlib
+
 ELFTOAOUT=elftoaout
 BIN2H=../common/bin2h
 
diff -Naur silo-1.4.10.orig/common/Makefile silo-1.4.10/common/Makefile
--- silo-1.4.10.orig/common/Makefile	2004-06-20 17:16:32.000000000 +0000
+++ silo-1.4.10/common/Makefile	2006-01-02 22:02:15.000000000 +0000
@@ -12,12 +12,15 @@
 
 OBJS = sdiv.o rem.o udiv.o urem.o jmp.o printf.o console.o prom.o tree.o stringops2.o\
 	stringops1.o ffs.o divdi3.o udivdi3.o
-PROGRAMS = bin2h
 
-all: $(OBJS) $(PROGRAMS)
+bin2h:
+	$(BUILD_CC) $(CFLAGS) -o bin2h bin2h.c
+
+all: $(OBJS) bin2h
 
 prom.o: prom.c
 	$(CC) $(CFLAGS) -c -Wa,-Av9 -o prom.o prom.c
 
 clean:
 	$(RM) $(PROGRAMS) *.o
+
diff -Naur silo-1.4.10.orig/second/Makefile silo-1.4.10/second/Makefile
--- silo-1.4.10.orig/second/Makefile	2004-06-20 17:16:32.000000000 +0000
+++ silo-1.4.10/second/Makefile	2006-01-02 22:02:15.000000000 +0000
@@ -3,13 +3,9 @@
 ##
 ##
 
-AS=as
-AR=ar
-NM=nm
 DD=dd
 AWK=awk
 LS=ls
-STRIP=strip
 GZIP=gzip
 GDB=gdb
 ECHO=echo
@@ -85,7 +81,7 @@
 	$(CC) $(CFLAGS) -c -o $@ $<
 
 util:	util.c
-	$(CC) -DSMALL_RELOC=$(SMALL_RELOC) -DLARGE_RELOC=$(LARGE_RELOC) -o $@ $<
+	$(BUILD_CC) -DSMALL_RELOC=$(SMALL_RELOC) -DLARGE_RELOC=$(LARGE_RELOC) -o $@ $<
 
 clean:
 	$(RM) *.o fs/*.o second* silotftp* util fs/libfs.a
diff -Naur silo-1.4.10.orig/second/ls.c silo-1.4.10/second/ls.c
--- silo-1.4.10.orig/second/ls.c	2004-01-10 23:36:34.000000000 +0000
+++ silo-1.4.10/second/ls.c	2006-01-02 22:02:15.000000000 +0000
@@ -19,10 +19,10 @@
    USA.  */
 
 #include <silo.h>
+#include <linux/types.h>
 #include <stringops.h>
 
 typedef int FILE;
-#include <linux/types.h>
 #include <ext2fs/ext2_fs.h>
 #include <ext2fs/ext2fs.h>
 
