summaryrefslogtreecommitdiffstats
path: root/development/sdcc
diff options
context:
space:
mode:
Diffstat (limited to 'development/sdcc')
-rw-r--r--development/sdcc/README17
-rw-r--r--development/sdcc/patches/source-tree.patch6
-rw-r--r--development/sdcc/sdcc.SlackBuild44
-rw-r--r--development/sdcc/sdcc.info6
-rw-r--r--development/sdcc/slack-desc10
5 files changed, 43 insertions, 40 deletions
diff --git a/development/sdcc/README b/development/sdcc/README
index 17bf5e4510..761e4b5a82 100644
--- a/development/sdcc/README
+++ b/development/sdcc/README
@@ -2,12 +2,15 @@ SDCC is a retargettable, optimizing Standard C (ANSI C89, ISO C99, ISO
C11) 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), Padauk (pdk14, pdk15) and STMicroelectronics STM8. Work is
-in progress on supporting the Padauk (pdk13), Microchip PIC16 and
-PIC18 targets. It can be retargeted for other microprocessors.
+Z80 based MCUs (Z80, Z180, SM83, Rabbit 2000, 2000A, 3000A, TLCS-90),
+Padauk (pdk14, pdk15) and STMicroelectronics STM8. Work is in progress
+on supporting the Padauk pdk13 and MOS 6502 targets; Microchip PIC16 and
+PIC18 targets are unmaintained. SDCC can be retargeted for other
+microprocessors.
-By default, this will build sdcc without pic support. If you want
-that, install gputils and run the script as follows:
+The documentation (SDCC manual) and support for PIC targets are disabled
+by default because they require extra packages. Enable them by passing
+these variables to the script (VAR=yes|no ./sdcc.SlackBuild):
-ENABLE_PIC=y sh ./sdcc.SlackBuild
+ENABLE_DOC=yes|no (default: no), requires lyx, latex2html
+ENABLE_PIC=yes|no (default: no), requires gputils
diff --git a/development/sdcc/patches/source-tree.patch b/development/sdcc/patches/source-tree.patch
index 93c2798f75..78458cbe8c 100644
--- a/development/sdcc/patches/source-tree.patch
+++ b/development/sdcc/patches/source-tree.patch
@@ -1,10 +1,10 @@
diff --git a/device/lib/Makefile.in b/device/lib/Makefile.in
--- a/device/lib/Makefile.in
+++ b/device/lib/Makefile.in
-@@ -599,19 +599,11 @@
- $(CP_U) -r $(MODELS) mcs51 ds390 ds400 z80 z180 ez80_z80 r2k r3ka tlcs90 gbz80 hc08 s08 stm8 pdk13 pdk14 pdk15 $(sdcc_libdir)/src
+@@ -661,19 +661,11 @@
+ $(CP_U) -r $(MODELS) mcs51 ds390 ds400 z80 z180 ez80_z80 z80n r2k r2ka r3ka tlcs90 sm83 hc08 s08 stm8 pdk13 pdk14 pdk15 $(sdcc_libdir)/src
- for src in $(MODELS) ds390 ds400 z80 z180 ez80_z80 r2k r3ka tlcs90 gbz80 hc08 s08 stm8 pdk13 pdk14 pdk15 pic14 pic16; do \
+ for src in $(MODELS) ds390 ds400 z80 z180 ez80_z80 z80n r2k r2ka r3ka tlcs90 sm83 hc08 s08 mos6502 mos65c02 stm8 pdk13 pdk14 pdk15 pic14 pic16; do \
- find $(sdcc_libdir)/src/$$src -depth \
- \( -name '*.rel' -o -name '*.dump*' -o -name '*.sym' -o -name '*.o' -o -name '*.lib' -o \
- -name '*.lst' -o -name '*.asm' -o -name '.svn' -o -name 'autom4te.cache' -o \
diff --git a/development/sdcc/sdcc.SlackBuild b/development/sdcc/sdcc.SlackBuild
index 8e6a39a06f..1e02cb8bcc 100644
--- a/development/sdcc/sdcc.SlackBuild
+++ b/development/sdcc/sdcc.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for sdcc
-# Copyright 2014-2020 Kyle Guinn <elyk03@gmail.com>
+# Copyright 2014-2023 Kyle Guinn <elyk03@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=sdcc
-VERSION=${VERSION:-4.0.0}
+VERSION=${VERSION:-4.3.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
@@ -35,17 +38,18 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM-$VERSION
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="COPYING ChangeLog"
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i586" ]; then
+if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
@@ -78,14 +82,7 @@ chmod -x device/lib/isinf.c device/lib/isnan.c
# up afterwards. Delete some byproducts that they missed.
patch -p1 < $CWD/patches/source-tree.patch
-# Avoid creating empty man directories.
-sed -i '/(man1dir)/d' sim/ucsim/doc/Makefile.in
-
-# make considers device/lib/pic14/aclocal.m4 out-of-date and tries to
-# rebuild it using aclocal-1.16 which doesn't exist yet on Slackware 14.2.
-(cd device/lib/pic14 && autoreconf -vif)
-
-# Requires lyx, latex2html, possibly others. Untested.
+# Requires lyx and latex2html.
if [ "${ENABLE_DOC:-no}" != 'no' ]; then
enable_doc='--enable-doc'
fi
@@ -101,12 +98,12 @@ ARCH= \
EARCH= \
./configure \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX}/$PRGNAM \
+ --libdir=\${exec_prefix}/lib${LIBDIRSUFFIX}/$PRGNAM \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --mandir=\${prefix}/man \
+ --infodir=\${prefix}/info \
+ --docdir=\${prefix}/doc/$PRGNAM-$VERSION \
--enable-libgc \
$enable_doc \
$enable_pic \
@@ -120,12 +117,15 @@ make install DESTDIR=$PKG
find $PKG -exec file {} + | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG/usr/man -type f -exec gzip -9 {} +
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a sdas/doc $PKG/usr/doc/$PRGNAM-$VERSION/sdas
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/sdcc/sdcc.info b/development/sdcc/sdcc.info
index 82b700329c..ac022fbcb8 100644
--- a/development/sdcc/sdcc.info
+++ b/development/sdcc/sdcc.info
@@ -1,8 +1,8 @@
PRGNAM="sdcc"
-VERSION="4.0.0"
+VERSION="4.3.0"
HOMEPAGE="http://sdcc.sourceforge.net/"
-DOWNLOAD="https://sourceforge.net/projects/sdcc/files/sdcc/4.0.0/sdcc-src-4.0.0.tar.bz2"
-MD5SUM="eac8f83af265dca1f3e4c79abcd43c6c"
+DOWNLOAD="https://sourceforge.net/projects/sdcc/files/sdcc/4.3.0/sdcc-src-4.3.0.tar.bz2"
+MD5SUM="799a1c0b906a016aca96ef0c1733d831"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/sdcc/slack-desc b/development/sdcc/slack-desc
index fabcddda7f..e84dbace93 100644
--- a/development/sdcc/slack-desc
+++ b/development/sdcc/slack-desc
@@ -12,8 +12,8 @@ sdcc: SDCC is a retargettable, optimizing Standard C (ANSI C89, ISO C99, ISO
sdcc: C11) compiler suite that targets the Intel MCS51 based microprocessors
sdcc: (8031, 8032, 8051, 8052, etc.), Maxim (formerly Dallas) DS80C390
sdcc: variants, Freescale (formerly Motorola) HC08 based (hc08, s08), Zilog
-sdcc: Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000, Rabbit 3000A,
-sdcc: TLCS-90), Padauk (pdk14, pdk15) and STMicroelectronics STM8. Work is
-sdcc: in progress on supporting the Padauk (pdk13), Microchip PIC16 and
-sdcc: PIC18 targets. It can be retargeted for other microprocessors.
-sdcc:
+sdcc: Z80 based MCUs (Z80, Z180, SM83, Rabbit 2000, 2000A, 3000A, TLCS-90),
+sdcc: Padauk (pdk14, pdk15) and STMicroelectronics STM8. Work is in
+sdcc: progress on supporting the Padauk pdk13 and MOS 6502 targets;
+sdcc: Microchip PIC16 and PIC18 targets are unmaintained. SDCC can be
+sdcc: retargeted for other microprocessors.