From 7b10234cfd2201fae7de5fba3644b97098b1d0ff Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 14 Sep 2014 15:00:05 +0200 Subject: [PATCH] Add recipe for SDCC. --- dev-embedded/sdcc/patches/sdcc-3.4.0.patchset | 194 ++++++++++++++++++ dev-embedded/sdcc/sdcc-3.4.0.recipe | 101 +++++++++ 2 files changed, 295 insertions(+) create mode 100644 dev-embedded/sdcc/patches/sdcc-3.4.0.patchset create mode 100644 dev-embedded/sdcc/sdcc-3.4.0.recipe diff --git a/dev-embedded/sdcc/patches/sdcc-3.4.0.patchset b/dev-embedded/sdcc/patches/sdcc-3.4.0.patchset new file mode 100644 index 000000000..df8acb21a --- /dev/null +++ b/dev-embedded/sdcc/patches/sdcc-3.4.0.patchset @@ -0,0 +1,194 @@ +From 8dabca703681d397595e7076c19f07f523104f69 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 14 Sep 2014 12:25:39 +0200 +Subject: let sdbinutils know about Haiku. + + +diff --git a/support/sdbinutils/bfd/config.bfd b/support/sdbinutils/bfd/config.bfd +index a812403..31363e2 100644 +--- a/support/sdbinutils/bfd/config.bfd ++++ b/support/sdbinutils/bfd/config.bfd +@@ -693,6 +693,9 @@ case "${targ}" in + targ_defvec=bfd_elf32_i386_vec + targ_selvecs="i386pe_vec i386pei_vec" + ;; ++ i[3-7]86-*-haiku*) ++ targ_defvec=bfd_elf32_i386_vec ++ ;; + i[3-7]86-*-interix*) + targ_defvec=i386pei_vec + targ_selvecs="i386pe_vec" +-- +1.8.3.4 + + +From 850a29c40087948fdf36dc80b30a8870fc6858c3 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 14 Sep 2014 12:26:14 +0200 +Subject: Missing include. + + +diff --git a/sim/ucsim/cmd.src/newcmdposixcl.h b/sim/ucsim/cmd.src/newcmdposixcl.h +index 5050d2f..ef3ed70 100644 +--- a/sim/ucsim/cmd.src/newcmdposixcl.h ++++ b/sim/ucsim/cmd.src/newcmdposixcl.h +@@ -32,6 +32,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA + #include "newcmdcl.h" + #include "cmdutil.h" + ++#include + + /* + * Command fd console +-- +1.8.3.4 + + +From 8f059ca65eac475ce5c80852a6f6a4b499f80b06 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 14 Sep 2014 12:59:31 +0200 +Subject: strings.h fix. + + +diff --git a/sim/ucsim/pobj.cc b/sim/ucsim/pobj.cc +index e809980..166d8b1 100644 +--- a/sim/ucsim/pobj.cc ++++ b/sim/ucsim/pobj.cc +@@ -29,6 +29,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA + + #include + #include ++#include + + #include "pstr.h" + /*#include "pobjt.h"*/ +-- +1.8.3.4 + + +From d35e5495bb9e7ebf00de26030fe91fe302b80700 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 14 Sep 2014 12:59:16 +0200 +Subject: Remove hardcoded -lm + + +diff --git a/sdas/as6808/Makefile.in b/sdas/as6808/Makefile.in +index 04cf34f..dfac987 100644 +--- a/sdas/as6808/Makefile.in ++++ b/sdas/as6808/Makefile.in +@@ -37,7 +37,7 @@ VPATH = @srcdir@ + CPPFLAGS = @CPPFLAGS@ -DSDCDB -DNOICE -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../asxxsrc -I$(srcdir)/../../support/util + CFLAGS = @CFLAGS@ @WALL_FLAG@ $(CPPFLAGS) + LDFLAGS = @LDFLAGS@ +-LIBS = -lm ++LIBS = + + OBJDIR = obj + +diff --git a/sdas/as8051/Makefile.in b/sdas/as8051/Makefile.in +index e2d092a..3d92634 100644 +--- a/sdas/as8051/Makefile.in ++++ b/sdas/as8051/Makefile.in +@@ -37,7 +37,7 @@ VPATH = @srcdir@ + CPPFLAGS = @CPPFLAGS@ -DSDCDB -DNOICE -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../asxxsrc -I$(srcdir)/../../support/util + CFLAGS = @CFLAGS@ @WALL_FLAG@ $(CPPFLAGS) + LDFLAGS = @LDFLAGS@ +-LIBS = -lm ++LIBS = + + OBJDIR = obj + +diff --git a/sdas/as8xcxxx/Makefile.in b/sdas/as8xcxxx/Makefile.in +index 9ba2572..7e6f9ce 100644 +--- a/sdas/as8xcxxx/Makefile.in ++++ b/sdas/as8xcxxx/Makefile.in +@@ -37,7 +37,7 @@ VPATH = @srcdir@ + CPPFLAGS = @CPPFLAGS@ -DSDCDB -DNOICE -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../asxxsrc -I$(srcdir)/../../support/util + CFLAGS = @CFLAGS@ @WALL_FLAG@ $(CPPFLAGS) + LDFLAGS = @LDFLAGS@ +-LIBS = -lm ++LIBS = + + OBJDIR = obj + +diff --git a/sdas/asgb/Makefile.in b/sdas/asgb/Makefile.in +index e15d878..af34749 100644 +--- a/sdas/asgb/Makefile.in ++++ b/sdas/asgb/Makefile.in +@@ -37,7 +37,7 @@ VPATH = @srcdir@ + CPPFLAGS = @CPPFLAGS@ -DSDCDB -DNOICE -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../asxxsrc -I$(srcdir)/../../support/util + CFLAGS = @CFLAGS@ @WALL_FLAG@ $(CPPFLAGS) + LDFLAGS = @LDFLAGS@ +-LIBS = -lm ++LIBS = + + OBJDIR = obj + +diff --git a/sdas/asrab/Makefile.in b/sdas/asrab/Makefile.in +index 2518544..10ecc85 100644 +--- a/sdas/asrab/Makefile.in ++++ b/sdas/asrab/Makefile.in +@@ -37,7 +37,7 @@ VPATH = @srcdir@ + CPPFLAGS = @CPPFLAGS@ -DSDCDB -DNOICE -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../asxxsrc -I$(srcdir)/../../support/util + CFLAGS = @CFLAGS@ @WALL_FLAG@ $(CPPFLAGS) + LDFLAGS = @LDFLAGS@ +-LIBS = -lm ++LIBS = + + OBJDIR = obj + +diff --git a/sdas/asstm8/Makefile.in b/sdas/asstm8/Makefile.in +index ef2accb..06b0c48 100755 +--- a/sdas/asstm8/Makefile.in ++++ b/sdas/asstm8/Makefile.in +@@ -37,7 +37,7 @@ VPATH = @srcdir@ + CPPFLAGS = @CPPFLAGS@ -DSDCDB -DNOICE -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../asxxsrc -I$(srcdir)/../../support/util + CFLAGS = @CFLAGS@ @WALL_FLAG@ $(CPPFLAGS) + LDFLAGS = @LDFLAGS@ +-LIBS = -lm ++LIBS = + + OBJDIR = obj + +diff --git a/sdas/astlcs90/Makefile.in b/sdas/astlcs90/Makefile.in +index 8c299c4..dba0454 100644 +--- a/sdas/astlcs90/Makefile.in ++++ b/sdas/astlcs90/Makefile.in +@@ -37,7 +37,7 @@ VPATH = @srcdir@ + CPPFLAGS = @CPPFLAGS@ -DSDCDB -DNOICE -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../asxxsrc -I$(srcdir)/../../support/util + CFLAGS = @CFLAGS@ @WALL_FLAG@ $(CPPFLAGS) + LDFLAGS = @LDFLAGS@ +-LIBS = -lm ++LIBS = + + OBJDIR = obj + +diff --git a/sdas/asz80/Makefile.in b/sdas/asz80/Makefile.in +index 5de4cc8..f4bf6d2 100644 +--- a/sdas/asz80/Makefile.in ++++ b/sdas/asz80/Makefile.in +@@ -37,7 +37,7 @@ VPATH = @srcdir@ + CPPFLAGS = @CPPFLAGS@ -DSDCDB -DNOICE -DINDEXLIB -I. -I$(srcdir) -I$(srcdir)/../asxxsrc -I$(srcdir)/../../support/util + CFLAGS = @CFLAGS@ @WALL_FLAG@ $(CPPFLAGS) + LDFLAGS = @LDFLAGS@ +-LIBS = -lm ++LIBS = + + OBJDIR = obj + +diff --git a/src/Makefile.in b/src/Makefile.in +index 5f18ab6..782f5be 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -15,7 +15,7 @@ PORTS = $(shell cat ../ports.build) + ALLPORTS = $(shell cat ../ports.all) + PORT_LIBS = $(PORTS:%=%/port.a) + +-LIBS = -lm @LIBS@ ++LIBS = @LIBS@ + + CFLAGS = @CFLAGS@ @WALL_FLAG@ + CXXFLAGS = @CXXFLAGS@ @WALL_FLAG@ +-- +1.8.3.4 + diff --git a/dev-embedded/sdcc/sdcc-3.4.0.recipe b/dev-embedded/sdcc/sdcc-3.4.0.recipe new file mode 100644 index 000000000..e7e459ad4 --- /dev/null +++ b/dev-embedded/sdcc/sdcc-3.4.0.recipe @@ -0,0 +1,101 @@ +SUMMARY="a retargettable, optimizing ANSI - C compiler suite" +DESCRIPTION=" +SDCC is a retargettable, optimizing ANSI - C compiler suite that targets the +Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim +(formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based +(hc08, s08), Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000, Rabbit +3000A, TLCS-90) and STMicroelectronics STM8. Work is in progress on supporting +the Microchip PIC16 and PIC18 targets. It can be retargeted for other +microprocessors. +" +HOMEPAGE="http://sdcc.sourceforge.net" +LICENSE=" + GNU GPL v2 + " +COPYRIGHT=" + 1999-2013 Sandeep Dutta +" +SRC_URI="http://sourceforge.net/projects/sdcc/files/sdcc/3.4.0/sdcc-src-3.4.0.tar.bz2" +CHECKSUM_SHA256="cf6af862b94d5f259f11afa0a1b86304f3047b3723a9df96f20dba869deb5bf9" +REVISION="1" +ARCHITECTURES="x86 x86_64" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + # x86_gcc2 is fine as primary target architecture as long as we're building + # for a different secondary architecture. + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + sdcc$secondaryArchSuffix = $portVersion + cmd:sdcc$secondaryArchSuffix = $portVersion + cmd:as2gbmap$secondaryArchSuffix + cmd:makebin$secondaryArchSuffix + cmd:packihx$secondaryArchSuffix + cmd:s51$secondaryArchSuffix + cmd:savr$secondaryArchSuffix + cmd:sdar$secondaryArchSuffix + cmd:sdas390$secondaryArchSuffix + cmd:sdas6808$secondaryArchSuffix + cmd:sdas8051$secondaryArchSuffix + cmd:sdasgb$secondaryArchSuffix + cmd:sdasrab$secondaryArchSuffix + cmd:sdasstm8$secondaryArchSuffix + cmd:sdastlcs90$secondaryArchSuffix + cmd:sdasz80$secondaryArchSuffix + cmd:sdcclib$secondaryArchSuffix + cmd:sdcdb$secondaryArchSuffix + cmd:sdcdb.el$secondaryArchSuffix + cmd:sdcdbsrc.el$secondaryArchSuffix + cmd:sdcpp$secondaryArchSuffix + cmd:sdld$secondaryArchSuffix + cmd:sdld6808$secondaryArchSuffix + cmd:sdldgb$secondaryArchSuffix + cmd:sdldz80$secondaryArchSuffix + cmd:sdnm$secondaryArchSuffix + cmd:sdobjcopy$secondaryArchSuffix + cmd:sdranlib$secondaryArchSuffix + cmd:shc08$secondaryArchSuffix + cmd:sst7$secondaryArchSuffix + cmd:sstm8$secondaryArchSuffix + cmd:sz80$secondaryArchSuffix + devel:libiberty$secondaryArchSuffix + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libstdc++$secondaryArchSuffix + " + +BUILD_REQUIRES=" + devel:libboost_graph$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + " + +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:automake + cmd:autoconf + cmd:bison + cmd:flex + cmd:make + " + +PATCHES="sdcc-$portVersion.patchset" + +BUILD() +{ + # The PIC14/16 ports need gputils. Enable them when we have a recipe for it. + CFLAGS="-DO_ASYNC=0" \ + runConfigure ./configure --disable-pic14-port --disable-pic16-port + make $jobArgs +} + +INSTALL() +{ + make install + + prepareInstalledDevelLib libiberty +}