summaryrefslogtreecommitdiffstats
path: root/package/uboot-ifxmips/patches/110-compile_fix.patch
blob: 34d0ac6e530863b69c304c906ba534e557691339 (plain)
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
--- a/cpu/mips/Makefile
+++ b/cpu/mips/Makefile
@@ -36,6 +36,9 @@ START	:= $(addprefix $(obj),$(START))
 
 all:	$(obj).depend $(START) $(LIB)
 
+start.o: start.S
+	$(CC) $(AFLAGS) -fPIC -c -o $@ $<
+
 $(LIB):	$(OBJS)
 	$(AR) $(ARFLAGS) $@ $(OBJS)
 
--- a/Makefile
+++ b/Makefile
@@ -185,8 +185,8 @@ include $(TOPDIR)/config.mk
 OBJS  = cpu/$(CPU)/start.o
 OBJS_BOOTSTRAP  = cpu/$(CPU)/start_bootstrap.o
 
-cpu/$(CPU)/start_bootstrap.S: cpu/$(CPU)/start.S
-	ln -s start.S cpu/$(CPU)/start_bootstrap.S
+cpu/$(CPU)/start_bootstrap.o: cpu/$(CPU)/start.S
+	$(CC) $(AFLAGS) -fPIC -DCFG_BOOTSTRAP_CODE -c -o $@ $<
 
 ifeq ($(CPU),i386)
 OBJS += cpu/$(CPU)/start16.o