Package: stalin / 0.11-6

0001-allow-compiler-selection.diff.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
From 3b3ce56f5c88abdffb92dee6b2bec3d790de2150 Mon Sep 17 00:00:00 2001
From: Rob Browning <rlb@defaultvalue.org>
Date: Sat, 27 Jun 2015 11:00:54 -0500
Subject: allow-compiler-selection.diff

---
 build        |  7 ++++++-
 build-gl-fpi | 10 ++++++++--
 makefile     | 29 +++++++++++++++--------------
 3 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/build b/build
index fe02cd6..a678cd9 100755
--- a/build
+++ b/build
@@ -22,6 +22,11 @@ fi
 #  ARCH_OPTS="${ARCH_OPTS} -g -I/usr/include/gc"
 #fi
 
+if [ x"${CC}" = x ]
+then
+  CC=gcc
+fi
+
 case `uname -s`/`uname -r` in
   IRIX*/*)   RANLIB=touch;;
   SunOS/5.*) RANLIB=touch;;
@@ -57,7 +62,7 @@ case `uname -s`/`uname -r` in
 
 cd include
 rm -f libstalin.a
-gcc -c -O2 -fomit-frame-pointer -freg-struct-return xlib-c.c
+${CC} -c -O2 -fomit-frame-pointer -freg-struct-return xlib-c.c
 ar rc libstalin.a xlib-c.o
 $RANLIB libstalin.a
 rm xlib-c.o
diff --git a/build-gl-fpi b/build-gl-fpi
index 39d6263..ffc5a56 100755
--- a/build-gl-fpi
+++ b/build-gl-fpi
@@ -1,8 +1,14 @@
 #!/bin/sh
+
+if [ x"${CC}" = x ]
+then
+  CC=gcc
+fi
+
 cd include
 rm -f libstalin.a
-gcc -c -O2 -fomit-frame-pointer -freg-struct-return xlib-c.c
-gcc -c -O2 -fomit-frame-pointer -freg-struct-return gl-c.c
+${CC} -c -O2 -fomit-frame-pointer -freg-struct-return xlib-c.c
+${CC} -c -O2 -fomit-frame-pointer -freg-struct-return gl-c.c
 ar rc libstalin.a xlib-c.o gl-c.c
 case `uname -s`/`uname -r` in
   IRIX*/*)   RANLIB=touch;;
diff --git a/makefile b/makefile
index cf42173..4563307 100644
--- a/makefile
+++ b/makefile
@@ -1,4 +1,5 @@
-CC = gcc
+
+stalin ?= ./stalin
 
 OPTIONS = -d1 -d5 -d6 -On -t -c -db\
           -clone-size-limit 4 -split-even-if-no-widening\
@@ -22,54 +23,54 @@ stalin-architecture: stalin-architecture.c
 	$(CC) -o stalin-architecture stalin-architecture.c
 
 stalin.c: stalin.sc
-	./stalin $(OPTIONS) stalin
+	$(stalin) $(OPTIONS) stalin
 
 stalin-IA32.c: stalin.sc
-	./stalin $(OPTIONS) -architecture IA32 stalin
+	$(stalin) $(OPTIONS) -architecture IA32 stalin
 	mv -f stalin.c stalin-IA32.c
 
 stalin-IA32-align-double.c: stalin.sc
-	./stalin $(OPTIONS) -architecture IA32-align-double stalin
+	$(stalin) $(OPTIONS) -architecture IA32-align-double stalin
 	mv -f stalin.c stalin-IA32-align-double.c
 
 stalin-SPARC.c: stalin.sc
-	./stalin $(OPTIONS) -architecture SPARC stalin
+	$(stalin) $(OPTIONS) -architecture SPARC stalin
 	mv -f stalin.c stalin-SPARC.c
 
 stalin-SPARCv9.c: stalin.sc
-	./stalin $(OPTIONS) -architecture SPARCv9 stalin
+	$(stalin) $(OPTIONS) -architecture SPARCv9 stalin
 	mv -f stalin.c stalin-SPARCv9.c
 
 stalin-SPARC64.c: stalin.sc
-	./stalin $(OPTIONS) -architecture SPARC64 stalin
+	$(stalin) $(OPTIONS) -architecture SPARC64 stalin
 	mv -f stalin.c stalin-SPARC64.c
 
 stalin-MIPS.c: stalin.sc
-	./stalin $(OPTIONS) -architecture MIPS stalin
+	$(stalin) $(OPTIONS) -architecture MIPS stalin
 	mv -f stalin.c stalin-MIPS.c
 
 stalin-Alpha.c: stalin.sc
-	./stalin $(OPTIONS) -architecture Alpha stalin
+	$(stalin) $(OPTIONS) -architecture Alpha stalin
 	mv -f stalin.c stalin-Alpha.c
 
 stalin-ARM.c: stalin.sc
-	./stalin $(OPTIONS) -architecture ARM stalin
+	$(stalin) $(OPTIONS) -architecture ARM stalin
 	mv -f stalin.c stalin-ARM.c
 
 stalin-M68K.c: stalin.sc
-	./stalin $(OPTIONS) -architecture M68K stalin
+	$(stalin) $(OPTIONS) -architecture M68K stalin
 	mv -f stalin.c stalin-M68K.c
 
 stalin-PowerPC.c: stalin.sc
-	./stalin $(OPTIONS) -architecture PowerPC stalin
+	$(stalin) $(OPTIONS) -architecture PowerPC stalin
 	mv -f stalin.c stalin-PowerPC.c
 
 stalin-S390.c: stalin.sc
-	./stalin $(OPTIONS) -architecture S390 stalin
+	$(stalin) $(OPTIONS) -architecture S390 stalin
 	mv -f stalin.c stalin-S390.c
 
 stalin-PowerPC64.c: stalin.sc
-	./stalin $(OPTIONS) -architecture PowerPC64 stalin
+	$(stalin) $(OPTIONS) -architecture PowerPC64 stalin
 	mv -f stalin.c stalin-PowerPC64.c
 
 # Should ./include/stalin, ./stalin.c, and ./stalin only be deleted in a