diff options
author | B. Watson <yalhcru@gmail.com> | 2021-09-07 00:58:13 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-13 00:52:00 +0700 |
commit | 92522b59bbd1921ff079757105679c132bb968cd (patch) | |
tree | 4581cc1903599e52328ddda62b00fc16639ac6f7 /development/pcc | |
parent | acbcbc9810ff71b1fe2bc65dd58886e6d9b5a566 (diff) |
development/pcc: Updated for version 1.2.0.DEVEL+20210905.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/pcc')
-rw-r--r-- | development/pcc/README | 39 | ||||
-rw-r--r-- | development/pcc/pcc.SlackBuild | 62 | ||||
-rw-r--r-- | development/pcc/pcc.info | 10 | ||||
-rw-r--r-- | development/pcc/slack-desc | 2 |
4 files changed, 70 insertions, 43 deletions
diff --git a/development/pcc/README b/development/pcc/README index 121124f12c69..eae8f47b8991 100644 --- a/development/pcc/README +++ b/development/pcc/README @@ -1,21 +1,30 @@ -pcc (Portable C Compiler) is based on the original Portable C Compiler -by S. C. Johnson, written in the late 70's. About 50% of the frontend -code and 80% of the backend code has been rewritten. +pcc (Portable C Compiler) + +pcc is based on the original Portable C Compiler by S. C. Johnson, +written in the late 1970s. About 50% of the frontend code and 80% of +the backend code has been rewritten. Build options (environment variables): + TLS - Enable thread local storage? Default=no, export TLS=yes to enable. -CC - Compiler to use. Default: look for pcc, gcc, clang (in that order). +CC - Compiler to use. Default: look for pcc and clang (in that order). + It's no longer possible to use CC=gcc. + +Notes: + +1. To bootstrap pcc, first remove any old versions of pcc + (and pcc-libs, if present), then build and install pcc twice + (without setting CC). The first time, pcc will be built with + clang. The second time, it will be built with itself. -This build is for the 1.1.0 release of pcc. The 1.0 release no longer -works on modern Slackware versions (newer than 13.37). The old pcc -1.0 had separate builds for pcc and pcc-libs; this build includes the -libraries so no separate pcc-libs is needed (or exists). +2. This build is for a post-1.1.0 snapshot of pcc. The 1.0 release no + longer works on modern Slackware versions (newer than 13.37), and + the 1.1.0 release no longer works on Slackware 15.0. The old pcc + 1.0 had separate builds for pcc and pcc-libs; this build includes + the libraries so no separate pcc-libs is needed (or exists). -Optional step: To bootstrap pcc, first remove any old versions of pcc -(and pcc-libs, if present), then build and install pcc twice (without -setting CC). The first time, pcc will be built with gcc. The second -time, it will be built with itself. +3. pcc is a C compiler only. There is experimental, incomplete + support for C++ and Fortran 77 in the pcc codebase, but neither is + usable yet. -Note: pcc is a C compiler only. There is experimental, incomplete -support for C++ and Fortran 77 in the pcc codebase, but neither is -usable yet. +See also: http://pcc.ludd.ltu.se/ftp/pub/pcc-docs/ diff --git a/development/pcc/pcc.SlackBuild b/development/pcc/pcc.SlackBuild index 1db36fee9dbe..21c9e3770086 100644 --- a/development/pcc/pcc.SlackBuild +++ b/development/pcc/pcc.SlackBuild @@ -2,10 +2,20 @@ # Slackware build script for pcc (Portable C Compiler) -# Originally written by Armin Besirovic <armin[at]linux[dot]org[dot]ba> - +# Originally written by Armin Besirovic <email removed> # Modified by B. Watson <yalhcru@gmail.com> +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20210906 bkw: +# - updated for 1.2.0.DEVEL+20210905. Putting the .DEVEL in VERSION +# is a bit unsightly, but it matches the output of "pcc --version" +# and also Debian's version numbering scheme. +# - compiling with gcc no longer works, use clang or pcc. actually, +# compiling with gcc gives us a pcc that seems to compile stuff OK, +# but anything compiled with that pcc will segfault on startup. +# - add WTPL (since there was no license at all). + # 20141031 bkw: # - took over maintentance. # - upgraded for 1.1.0 beta series. @@ -25,10 +35,18 @@ # - upgraded for pcc-1.1.0 release, no more beta # - add seddery to fix typo in cc.c (ifdef => ifndef) +# Note to self: when updating to a new CVS snapshot, first download +# the latest: http://pcc.ludd.ltu.se/ftp/pub/pcc/pcc-current.tgz Then +# look at the file DATESTAMP inside that tarball, and use that date's +# snapshot. This is because the CVS snap tarballs are generated +# nightly, whether or not there actually were any code changes, +# and we want VERSION to be the date of the last actual code change. +# For pcc-libs, just use the same snapshot date as pcc. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=pcc -VERSION=${VERSION:-1.1.0} +VERSION=${VERSION:-1.2.0.DEVEL+20210905} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -41,9 +59,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -53,6 +68,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +TARVER=${VERSION/*+} + # non-standard stanza here: we're not going to use -march= or -mtune= # on 32-bit Slackware, because doing so prevents pcc from being used # to compile itself. I could add logic to use those flags only if @@ -71,15 +88,23 @@ if [ "$CC" = "" ]; then # user didn't specify, autodetect. if pcc --version &>/dev/null; then CC=pcc - elif gcc --version &>/dev/null; then - CC=gcc elif clang --version &>/dev/null; then CC=clang + SLKCFLAGS+=" -fcommon" else - echo "Can't find any of pcc, gcc, or clang in \$PATH. Giving up." 1>&2 + echo "Can't find pcc or clang in \$PATH. Giving up." 1>&2 fi fi +# let the user shoot himself in the foot if he insists, but at least +# warn him how much it's going to hurt. +if [ "$CC" = "gcc" ]; then + echo + echo "!!! CC is gcc, this will produce a non-working pcc. You asked for it..." + echo + sleep 3 +fi + export CC WITHCC="$( basename $CC )" [ "$CC" = "pcc" ] && WITHCC="pcc itself" @@ -93,23 +118,16 @@ fi rm -rf $PKG $TMP/$PRGNAM mkdir -p $TMP/$PRGNAM $PKG $OUTPUT cd $TMP/$PRGNAM -tar xvf $CWD/$PRGNAM-$VERSION.tgz -tar xvf $CWD/$PRGNAM-libs-$VERSION.tgz +tar xvf $CWD/$PRGNAM-$TARVER.tgz +tar xvf $CWD/$PRGNAM-libs-$TARVER.tgz chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ # first, the compiler itself: -cd $PRGNAM-$VERSION - -# fix typo, ref http://marc.info/?l=pcc-list&m=141824411830017&w=2 -sed -i '0,/^#ifdef MULTI/!s,^#ifdef \(MULTI\),#ifndef \1,' cc/cc/cc.c +cd $PRGNAM-$TARVER CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ ./configure \ $TLSOPT \ --prefix=/usr \ @@ -136,7 +154,7 @@ sed -n '/Copyright/,/^ *$/s,^...,,p' cc/cc/cc.c \ # now, build the libs. we don't attempt to build them with the just-built # pcc (maybe possible, but not worth the effort). -cd $TMP/$PRGNAM/$PRGNAM-libs-$VERSION +cd $TMP/$PRGNAM/$PRGNAM-libs-$TARVER CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ diff --git a/development/pcc/pcc.info b/development/pcc/pcc.info index 9bd158fca741..4d1449ffbd51 100644 --- a/development/pcc/pcc.info +++ b/development/pcc/pcc.info @@ -1,10 +1,10 @@ PRGNAM="pcc" -VERSION="1.1.0" +VERSION="1.2.0.DEVEL+20210905" HOMEPAGE="http://pcc.ludd.ltu.se/" -DOWNLOAD="http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/pcc-1.1.0.tgz \ - http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/pcc-libs-1.1.0.tgz" -MD5SUM="1c0f22440753075d64f9f2c6ed0e8278 \ - 360c157bbf6a7a931c4760ccf4ad704a" +DOWNLOAD="http://pcc.ludd.ltu.se/ftp/pub/pcc/pcc-20210905.tgz \ + http://pcc.ludd.ltu.se/ftp/pub/pcc-libs/pcc-libs-20210905.tgz" +MD5SUM="6c724a95251c4cffdebc5ae0c3d975ee \ + a8d1ed9033b72cb3279b483c83c99582" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/pcc/slack-desc b/development/pcc/slack-desc index a04f018feac8..f105427ffe97 100644 --- a/development/pcc/slack-desc +++ b/development/pcc/slack-desc @@ -9,7 +9,7 @@ pcc: pcc (Portable C Compiler) pcc: pcc: The compiler is based on the original Portable C Compiler by S. C. -pcc: Johnson, written in the late 70's. About 50% of the frontend code +pcc: Johnson, written in the late 1970s. About 50% of the frontend code pcc: and 80% of the backend code has been rewritten. See the PCC History pcc: wiki page for details. pcc: |