summaryrefslogtreecommitdiff
path: root/package/uboot-ifxmips/patches/110-compile_fix.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-11-05 21:25:31 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-11-05 21:25:31 +0000
commit0b7968af0202bda39b480e943d4467272596a32f (patch)
tree9db904d1ecde1dab049411b7b56eae4754256b20 /package/uboot-ifxmips/patches/110-compile_fix.patch
parentb9eaff23ad23d6fbbd8a5388f4855995c50f693a (diff)
uboot-ifxmips: fix compile errors with the cs toolchain due to non-PIC code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18321 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/uboot-ifxmips/patches/110-compile_fix.patch')
-rw-r--r--package/uboot-ifxmips/patches/110-compile_fix.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/uboot-ifxmips/patches/110-compile_fix.patch b/package/uboot-ifxmips/patches/110-compile_fix.patch
new file mode 100644
index 0000000000..34d0ac6e53
--- /dev/null
+++ b/package/uboot-ifxmips/patches/110-compile_fix.patch
@@ -0,0 +1,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