rename patch set from 3.12-3 to reflect purpose
[debian/elilo] / debian / patches / cross-build.diff
1 Description: Upstream changes introduced in version 3.12-3
2  This patch has been created by dpkg-source during the package build.
3  Here's the last changelog entry, hopefully it gives details on why
4  those changes were made:
5  .
6  elilo (3.12-3) unstable; urgency=low
7  .
8    * fix paths and options to build both 32 and 64 bit versions on either
9      flavor of build host, closes: #574713
10    * don't generate noise when following symlink since that's now the normal
11      situation, closes: #581068
12  .
13  The person named in the Author field signed this changelog entry.
14 Author: Bdale Garbee <bdale@gag.com>
15 Bug-Debian: http://bugs.debian.org/574713
16 Bug-Debian: http://bugs.debian.org/581068
17
18 ---
19 The information above should follow the Patch Tagging Guidelines, please
20 checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
21 are templates for supplementary fields that you might want to add:
22
23 Origin: <vendor|upstream|other>, <url of original patch>
24 Bug: <url in upstream bugtracker>
25 Bug-Debian: http://bugs.debian.org/<bugnumber>
26 Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
27 Forwarded: <no|not-needed|url proving that it has been forwarded>
28 Reviewed-By: <name and email of someone who approved the patch>
29 Last-Update: <YYYY-MM-DD>
30
31 --- elilo-3.12.orig/Makefile
32 +++ elilo-3.12/Makefile
33 @@ -25,15 +25,19 @@
34  # to use this program.
35  #
36  
37 -include Make.defaults
38 -TOPDIR=.
39 +SRCDIR = .
40 +
41 +VPATH = $(SRCDIR)
42 +
43 +include $(SRCDIR)/Make.defaults
44 +TOPDIR = $(SRCDIR)
45  
46  
47  CRTOBJS       = $(EFICRT0)/crt0-efi-$(ARCH).o
48  LDSCRIPT      = $(EFICRT0)/elf_$(ARCH)_efi.lds
49  
50  LDFLAGS             += -T $(LDSCRIPT) -shared -Bsymbolic -L$(EFILIB) -L$(GNUEFILIB) $(CRTOBJS)
51 -LOADLIBES     = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name)
52 +LOADLIBES     = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
53  FORMAT        = efi-app-$(ARCH)
54  
55  FILESYSTEM    =
56 @@ -87,7 +91,8 @@ fileops.o : Make.defaults
57  chooser.o : Make.defaults
58  
59  $(SUBDIRS): dummy
60 -       $(MAKE) -C $@
61 +       mkdir -p $@
62 +       $(MAKE) -C $@ -f $(SRCDIR)/../$@/Makefile SRCDIR=$(SRCDIR)/../$@ ARCH=$(ARCH)
63  
64  dummy:
65  
66 @@ -106,4 +111,4 @@ ifeq ($(GCC_VERSION),2)
67         @exit 1
68  endif
69  
70 -include Make.rules
71 +include $(SRCDIR)/Make.rules
72 --- elilo-3.12.orig/devschemes/Makefile
73 +++ elilo-3.12/devschemes/Makefile
74 @@ -23,10 +23,15 @@
75  # to use this program.
76  #
77  
78 -include ../Make.defaults
79 -include ../Make.rules
80 +SRCDIR = .
81 +
82 +VPATH = $(SRCDIR)
83 +
84 +include $(SRCDIR)/../Make.defaults
85 +include $(SRCDIR)/../Make.rules
86 +
87 +TOPDIR=$(SRCDIR)/..
88  
89 -TOPDIR=$(CDIR)/..
90  
91  FILES=simple.o
92  
93 @@ -40,7 +45,7 @@ all: $(TARGET)
94  #      without doing make clean.
95  #
96  $(TARGET): $(FILES)
97 -       $(LD) -r -o $@ $(FILES)
98 +       $(LD) $(LD3264) -r -o $@ $(FILES)
99  
100  clean:
101         $(RM) -f $(TARGET) $(FILES)
102 --- elilo-3.12.orig/ia64/Makefile
103 +++ elilo-3.12/ia64/Makefile
104 @@ -23,10 +23,15 @@
105  # to use this program.
106  #
107  
108 -include ../Make.defaults
109 -include ../Make.rules
110 +SRCDIR = .
111 +
112 +VPATH = $(SRCDIR)
113 +
114 +include $(SRCDIR)/../Make.defaults
115 +include $(SRCDIR)/../Make.rules
116 +
117 +TOPDIR=$(SRCDIR)/..
118  
119 -TOPDIR=$(CDIR)/..
120  
121  FILES=system.o config.o fpswa.o plain_loader.o gzip_loader.o \
122        gzip.o memset.o memcpy.o setjmp.o longjmp.o
123 --- elilo-3.12.orig/choosers/Makefile
124 +++ elilo-3.12/choosers/Makefile
125 @@ -23,10 +23,15 @@
126  # to use this program.
127  #
128  
129 -include ../Make.defaults
130 -include ../Make.rules
131 +SRCDIR = .
132 +
133 +VPATH = $(SRCDIR)
134 +
135 +include $(SRCDIR)/../Make.defaults
136 +include $(SRCDIR)/../Make.rules
137 +
138 +TOPDIR=$(SRCDIR)/..
139  
140 -TOPDIR=$(CDIR)/..
141  
142  FILES=
143  
144 @@ -43,11 +48,11 @@ TARGET=choosers.o
145  all: $(TARGET)
146  
147  $(TARGET): check-choosers $(TOPDIR)/Make.defaults $(FILES)
148 -       $(LD) -o $@ -r $(FILES)
149 +       $(LD) $(LD3264) -o $@ -r $(FILES)
150  
151  clean:
152         $(RM) -f $(TARGET) $(FILES)
153 -       
154 +
155  check-choosers:
156         @if [ -n "$(FILES)" ]; then \
157                 exit 0; \
158 --- elilo-3.12.orig/ia32/Makefile
159 +++ elilo-3.12/ia32/Makefile
160 @@ -23,10 +23,15 @@
161  # to use this program.
162  #
163  
164 -include ../Make.defaults
165 -include ../Make.rules
166 +SRCDIR = .
167 +
168 +VPATH = $(SRCDIR)
169 +
170 +include $(SRCDIR)/../Make.defaults
171 +include $(SRCDIR)/../Make.rules
172 +
173 +TOPDIR=$(SRCDIR)/..
174  
175 -TOPDIR=$(CDIR)/..
176  
177  FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o
178  
179 @@ -37,13 +42,13 @@ all: $(TARGET)
180  system.o: rmswitch.h
181  
182  rmswitch.h: bin_to_h.c rmswitch.S
183 -       $(CC) -o bin_to_h bin_to_h.c
184 -       $(AS) -o rmswitch.o rmswitch.S
185 +       $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c
186 +       $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S
187         $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o
188         ./bin_to_h <rmswitch >rmswitch.h
189  
190  $(TARGET): $(FILES)
191 -       $(LD) -r -o $@ $(FILES)
192 +       $(LD) $(LD3264) -r -o $@ $(FILES)
193  
194  clean:
195         $(RM) -f $(TARGET) $(FILES)
196 --- elilo-3.12.orig/x86_64/Makefile
197 +++ elilo-3.12/x86_64/Makefile
198 @@ -23,10 +23,15 @@
199  # to use this program.
200  #
201  
202 -include ../Make.defaults
203 -include ../Make.rules
204 +SRCDIR = .
205 +
206 +VPATH = $(SRCDIR)
207 +
208 +include $(SRCDIR)/../Make.defaults
209 +include $(SRCDIR)/../Make.rules
210 +
211 +TOPDIR=$(SRCDIR)/..
212  
213 -TOPDIR=$(CDIR)/..
214  
215  FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o
216  #FILES=system.o config.o plain_loader.o
217 @@ -38,13 +43,13 @@ all: $(TARGET)
218  system.o: rmswitch.h
219  
220  rmswitch.h: bin_to_h.c rmswitch.S
221 -       $(CC) -o bin_to_h bin_to_h.c
222 -       $(AS) -o rmswitch.o rmswitch.S
223 +       $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c
224 +       $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S
225         $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o
226         ./bin_to_h <rmswitch >rmswitch.h
227  
228  $(TARGET): $(FILES)
229 -       $(LD) -r -o $@ $(FILES)
230 +       $(LD) $(LD3264) -r -o $@ $(FILES)
231  
232  clean:
233         $(RM) -f $(TARGET) $(FILES)
234 --- elilo-3.12.orig/tools/Makefile
235 +++ elilo-3.12/tools/Makefile
236 @@ -23,10 +23,15 @@
237  # to use this program.
238  #
239  
240 -include ../Make.defaults
241 -include ../Make.rules
242 +SRCDIR = .
243 +
244 +VPATH = $(SRCDIR)
245 +
246 +include $(SRCDIR)/../Make.defaults
247 +include $(SRCDIR)/../Make.rules
248 +
249 +TOPDIR=$(SRCDIR)/..
250  
251 -TOPDIR=$(CDIR)/..
252  
253  FILES=eliloalt.o
254  TARGET=eliloalt
255 --- elilo-3.12.orig/fs/Makefile
256 +++ elilo-3.12/fs/Makefile
257 @@ -23,10 +23,15 @@
258  # to use this program.
259  #
260  
261 -include ../Make.defaults
262 -include ../Make.rules
263 +SRCDIR = .
264 +
265 +VPATH = $(SRCDIR)
266 +
267 +include $(SRCDIR)/../Make.defaults
268 +include $(SRCDIR)/../Make.rules
269 +
270 +TOPDIR=$(SRCDIR)/..
271  
272 -TOPDIR=$(CDIR)/..
273  
274  FILES=
275  ifeq ($(CONFIG_localfs),y)
276 @@ -55,7 +60,7 @@ all: $(TARGET)
277  #      without doing make clean.
278  #
279  $(TARGET): check-filesystems $(TOPDIR)/Make.defaults $(FILES)
280 -       $(LD) -r -o $@ $(FILES)
281 +       $(LD) $(LD3264) -r -o $@ $(FILES)
282  
283  clean:
284         $(RM) -f $(TARGET) $(FILES)