summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/sdcc/files/use-native-tools.patch80
-rw-r--r--packages/sdcc/sdcc-native_2.5.0.bb13
-rw-r--r--packages/sdcc/sdcc_2.5.0.bb4
3 files changed, 92 insertions, 5 deletions
diff --git a/packages/sdcc/files/use-native-tools.patch b/packages/sdcc/files/use-native-tools.patch
new file mode 100644
index 0000000000..d3b02c4a44
--- /dev/null
+++ b/packages/sdcc/files/use-native-tools.patch
@@ -0,0 +1,80 @@
+Index: sdcc/device/lib/Makefile.in
+===================================================================
+--- sdcc.orig/device/lib/Makefile.in
++++ sdcc/device/lib/Makefile.in
+@@ -18,8 +18,8 @@ ifndef PORTINCDIR
+ PORTINCDIR = $(INCDIR)/mcs51
+ endif
+
+-CC = $(PRJDIR)/bin/sdcc
+-CPP = $(PRJDIR)/bin/sdcpp
++CC = sdcc
++CPP = sdcpp
+
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+Index: sdcc/device/lib/mcs51/Makefile
+===================================================================
+--- sdcc.orig/device/lib/mcs51/Makefile
++++ sdcc/device/lib/mcs51/Makefile
+@@ -1,8 +1,8 @@
+
+ TOPDIR = ../../..
+
+-SAS = $(TOPDIR)/bin/asx8051
+-SCC = $(TOPDIR)/bin/sdcc
++SAS = asx8051
++SCC = sdcc
+
+ OBJ = crtstart.rel crtxinit.rel crtxclear.rel crtclear.rel crtxstack.rel \
+ crtpagesfr.rel
+Index: sdcc/device/lib/ds390/Makefile
+===================================================================
+--- sdcc.orig/device/lib/ds390/Makefile
++++ sdcc/device/lib/ds390/Makefile
+@@ -1,4 +1,4 @@
+-CC = ../../../bin/sdcc
++CC = sdcc
+
+ #VERBOSE = --verbose
+
+Index: sdcc/device/lib/ds400/Makefile
+===================================================================
+--- sdcc.orig/device/lib/ds400/Makefile
++++ sdcc/device/lib/ds400/Makefile
+@@ -1,4 +1,4 @@
+-CC = ../../../bin/sdcc
++CC = sdcc
+
+ #VERBOSE = --verbose
+
+Index: sdcc/device/lib/z80/Makefile
+===================================================================
+--- sdcc.orig/device/lib/z80/Makefile
++++ sdcc/device/lib/z80/Makefile
+@@ -2,8 +2,8 @@
+
+ TOPDIR = ../../..
+
+-SCC = $(TOPDIR)/bin/sdcc -mz80
+-SAS = $(TOPDIR)/bin/as-z80
++SCC = sdcc -mz80
++SAS = as-z80
+
+ OBJ = div.o mul.o putchar.o shift.o stubs.o crt0_rle.o heap.o fstubs.o
+
+Index: sdcc/device/lib/gbz80/Makefile
+===================================================================
+--- sdcc.orig/device/lib/gbz80/Makefile
++++ sdcc/device/lib/gbz80/Makefile
+@@ -2,8 +2,8 @@
+
+ TOPDIR = ../../..
+
+-SCC = $(TOPDIR)/bin/sdcc -mgbz80
+-SAS = $(TOPDIR)/bin/as-gbz80
++SCC = sdcc -mgbz80
++SAS = as-gbz80
+
+ OBJ = div.o mul.o putchar.o printf.o shift.o stubs.o crt0_rle.o heap.o fstubs.o
+
diff --git a/packages/sdcc/sdcc-native_2.5.0.bb b/packages/sdcc/sdcc-native_2.5.0.bb
index 85c3d5b0fd..6f6c3c1710 100644
--- a/packages/sdcc/sdcc-native_2.5.0.bb
+++ b/packages/sdcc/sdcc-native_2.5.0.bb
@@ -1,10 +1,15 @@
require sdcc_${PV}.bb
-
inherit native
+DEPENDS = ""
+
+# don't need native-tools patch here
+SRC_URI = "${SOURCEFORGE_MIRROR}/sdcc/sdcc-${PV}.tar.gz \
+ file://gcc4.patch;patch=1"
-# yes, we usually don't want to do this in order to prevent staging pollution,
-# however sdcc behaves pretty nice here, so we can do an exception here (ML).
do_stage() {
- oe_runmake install
+ autotools_stage_all
+ for i in bin/as-*; do
+ install -m 0755 $i ${STAGING_BINDIR}
+ done
}
diff --git a/packages/sdcc/sdcc_2.5.0.bb b/packages/sdcc/sdcc_2.5.0.bb
index 117770efd8..3347fb9f6e 100644
--- a/packages/sdcc/sdcc_2.5.0.bb
+++ b/packages/sdcc/sdcc_2.5.0.bb
@@ -2,10 +2,12 @@ DESCRIPTION= "SDCC - Small Device C Compiler"
LICENSE = "GPL"
SECTION = "devel"
HOMEPAGE = "http://sdcc.sourceforge.net"
+DEPENDS = "sdcc-native"
PR = "r1"
SRC_URI = "${SOURCEFORGE_MIRROR}/sdcc/sdcc-${PV}.tar.gz \
- file://gcc4.patch;patch=1"
+ file://gcc4.patch;patch=1 \
+ file://use-native-tools.patch;patch=1"
S = "${WORKDIR}/sdcc"
PARALLEL_MAKE = ""