update pcc to 20210128

The previous version in the tree was close to a decade old and no longer
compiled with -fcommon.
This commit is contained in:
daniel 2021-02-18 02:26:43 +00:00
parent 1848563b96
commit c29b8e710f
19 changed files with 194 additions and 45 deletions

View File

@ -1,33 +1,7 @@
# $OpenBSD: Makefile,v 1.22 2021/02/06 22:08:35 naddy Exp $
# $OpenBSD: Makefile,v 1.23 2021/02/18 02:26:43 daniel Exp $
COMMENT = portable C compiler
SUBDIR =
SUBDIR += pcc
SUBDIR += pcc-libs
PCCVER = 1.0.0
DISTNAME = pcc-${PCCVER}
REVISION = 18
EXTRACT_SUFX = .tgz
CATEGORIES = lang
HOMEPAGE = http://pcc.ludd.ltu.se/
# Other architectures not fully supported yet
ONLY_FOR_ARCHS = i386 amd64
# BSD
PERMIT_PACKAGE = Yes
WANTLIB += c
MASTER_SITES = http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ \
ftp://pcc.ludd.ltu.se/pub/pcc-releases/
CONFIGURE_STYLE = gnu
CONFIG = ${MACHINE_ARCH:S/amd64/x86_64/}-unknown-openbsd${OSREV}
SUBST_VARS = PCCVER CONFIG
do-test:
cd ${WRKBUILD} && ./cc/cc/pcc --version
.include <bsd.port.mk>
.include <bsd.port.subdir.mk>

26
lang/pcc/Makefile.inc Normal file
View File

@ -0,0 +1,26 @@
# $OpenBSD: Makefile.inc,v 1.1 2021/02/18 02:26:43 daniel Exp $
# Other architectures not fully supported yet
ONLY_FOR_ARCHS = i386 amd64
DISTVER = 20210128
PKGVER = 1.1.0.${DISTVER}
PCCVER = 1.2.0.DEVEL
# XXX: If a new release is made:
# DISTVER = ${PCCVER}
# PKGVER = ${PCCVER}
# PCCVER = 1.2.0
EXTRACT_SUFX = .tgz
CATEGORIES ?= lang
HOMEPAGE ?= http://pcc.ludd.ltu.se/
# BSD
PERMIT_PACKAGE = Yes
CONFIGURE_STYLE = gnu
NO_TEST ?= Yes

View File

@ -1,2 +0,0 @@
SHA256 (pcc-1.0.0.tgz) = WALbukbW6j+brapVuQRKBBa7QQAgwkpcKoouqvQRVss=
SIZE (pcc-1.0.0.tgz) = 652308

View File

@ -0,0 +1,14 @@
# $OpenBSD: Makefile,v 1.1 2021/02/18 02:26:43 daniel Exp $
COMMENT = libraries for the portable C compiler
DISTNAME = pcc-libs-${DISTVER}
PKGNAME = pcc-libs-${PKGVER}
MASTER_SITES = http://pcc.ludd.ltu.se/ftp/pub/pcc-libs/ \
ftp://pcc.ludd.ltu.se/pub/pcc-libs/
CONFIG = ${MACHINE_ARCH:S/amd64/x86_64/}-unknown-openbsd${OSREV}
SUBST_VARS = CONFIG PCCVER
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (pcc-libs-20210128.tgz) = r30gkICmAVJSfkjrKaJXTjVzcVX/ye1gzqiWGfXUm4A=
SIZE (pcc-libs-20210128.tgz) = 201329

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-libpcc_Makefile_in,v 1.1 2021/02/18 02:26:43 daniel Exp $
Index: libpcc/Makefile.in
--- libpcc/Makefile.in.orig
+++ libpcc/Makefile.in
@@ -49,7 +49,7 @@ $(DEST): $(OBJS)
$(RANLIB) $@
.c.o :
- $(CC) -O $(CPPFLAGS) $(CFLAGS) -c $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
install: install-headers install-lib

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-libsoftfloat_Makefile_in,v 1.1 2021/02/18 02:26:43 daniel Exp $
Index: libsoftfloat/Makefile.in
--- libsoftfloat/Makefile.in.orig
+++ libsoftfloat/Makefile.in
@@ -42,10 +42,10 @@ $(DEST): $(OBJS)
$(RANLIB) $@
softfloat.o : bits64/softfloat.c
- $(CC) -O $(CPPFLAGS) $(CFLAGS) -c $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
.c.o :
- $(CC) -O $(CPPFLAGS) $(CFLAGS) -c $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
install:
test -z "${DESTDIR}$(PCCLIBDIR)" || mkdir -p "${DESTDIR}$(PCCLIBDIR)"

View File

@ -0,0 +1 @@
Libraries for the Portable C Compiler.

View File

@ -0,0 +1,19 @@
@comment $OpenBSD: PLIST,v 1.1 2021/02/18 02:26:44 daniel Exp $
lib/pcc/
lib/pcc/${CONFIG}/
lib/pcc/${CONFIG}/${PCCVER}/
lib/pcc/${CONFIG}/${PCCVER}/include/
lib/pcc/${CONFIG}/${PCCVER}/include/float.h
lib/pcc/${CONFIG}/${PCCVER}/include/iso646.h
lib/pcc/${CONFIG}/${PCCVER}/include/libpcc_float.h
lib/pcc/${CONFIG}/${PCCVER}/include/libpcc_limits.h
lib/pcc/${CONFIG}/${PCCVER}/include/libpcc_stdarg.h
lib/pcc/${CONFIG}/${PCCVER}/include/libpcc_stdbool.h
lib/pcc/${CONFIG}/${PCCVER}/include/libpcc_stddef.h
lib/pcc/${CONFIG}/${PCCVER}/include/limits.h
lib/pcc/${CONFIG}/${PCCVER}/include/stdarg.h
lib/pcc/${CONFIG}/${PCCVER}/include/stdbool.h
lib/pcc/${CONFIG}/${PCCVER}/include/stddef.h
lib/pcc/${CONFIG}/${PCCVER}/lib/
@static-lib lib/pcc/${CONFIG}/${PCCVER}/lib/libpcc.a
@static-lib lib/pcc/${CONFIG}/${PCCVER}/lib/libpccsoftfloat.a

17
lang/pcc/pcc/Makefile Normal file
View File

@ -0,0 +1,17 @@
# $OpenBSD: Makefile,v 1.1 2021/02/18 02:26:43 daniel Exp $
COMMENT = portable C compiler
DISTNAME = pcc-${DISTVER}
PKGNAME = pcc-${PKGVER}
WANTLIB += c
MASTER_SITES = http://pcc.ludd.ltu.se/ftp/pub/pcc/ \
ftp://pcc.ludd.ltu.se/pub/pcc/
CONFIGURE_ENV = YACC=/usr/bin/yacc
RUN_DEPENDS = lang/pcc/pcc-libs
.include <bsd.port.mk>

2
lang/pcc/pcc/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (pcc-20210128.tgz) = eZXPADIBs7r1y/fetoWuhYZbUwVuc6BdqAVEISDhK24=
SIZE (pcc-20210128.tgz) = 970002

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-cc_Makefile_in,v 1.1 2021/02/18 02:26:43 daniel Exp $
Index: cc/Makefile.in
--- cc/Makefile.in.orig
+++ cc/Makefile.in
@@ -5,7 +5,7 @@
@SET_MAKE@
-ALL_SUBDIRS= cc cpp ccom cxxcom
+ALL_SUBDIRS= cc cpp ccom
DIST_SUBDIRS= $(ALL_SUBDIRS) driver
all install clean:

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-cc_cc_Makefile_in,v 1.1 2021/02/18 02:26:43 daniel Exp $
Index: cc/cc/Makefile.in
--- cc/cc/Makefile.in.orig
+++ cc/cc/Makefile.in
@@ -45,7 +45,7 @@ MDIR=$(top_srcdir)/arch/$(TARGMACHDIR)
COMMONDIR=$(top_srcdir)/common
DEST=cc$(EXEEXT)
-DRIVERS=pcc pcpp p++
+DRIVERS=pcc pcpp
all: $(DEST)

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-cc_cc_cc_c,v 1.1 2021/02/18 02:26:43 daniel Exp $
Index: cc/cc/cc.c
--- cc/cc/cc.c.orig
+++ cc/cc/cc.c
@@ -1787,7 +1787,7 @@ static char *gcppflags[] = {
#ifndef os_win32
#ifdef GCC_COMPAT
"-D__GNUC__=4",
- "-D__GNUC_MINOR__=3",
+ "-D__GNUC_MINOR__=2",
"-D__GNUC_PATCHLEVEL__=1",
"-D__REGISTER_PREFIX__=" REGISTER_PREFIX,
"-D__USER_LABEL_PREFIX__=" USER_LABEL_PREFIX,

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-cc_driver_platform_c,v 1.1 2021/02/18 02:26:43 daniel Exp $
Index: cc/driver/platform.c
--- cc/driver/platform.c.orig
+++ cc/driver/platform.c
@@ -162,7 +162,7 @@ static const char * const predefined_macros_values4[]
};
static const char * const predefined_macros_values5[] = {
"-D__GNUC__=4",
- "-D__GNUC_MINOR__=3",
+ "-D__GNUC_MINOR__=2",
"-D__GNUC_PATCHLEVEL__=1",
"-D__GNUC_STDC_INLINE__=1",
NULL

11
lang/pcc/pcc/pkg/PLIST Normal file
View File

@ -0,0 +1,11 @@
@comment $OpenBSD: PLIST,v 1.1 2021/02/18 02:26:43 daniel Exp $
@pkgpath lang/pcc
@bin bin/pcc
@bin bin/pcpp
@bin libexec/ccom
@bin libexec/cpp
@man man/man1/ccom.1
@man man/man1/cpp.1
@man man/man1/pcc.1
@man man/man1/pcpp.1
share/doc/pkg-readmes/${PKGSTEM}

9
lang/pcc/pcc/pkg/README Normal file
View File

@ -0,0 +1,9 @@
$OpenBSD: README,v 1.1 2021/02/18 02:26:43 daniel Exp $
+-----------------------------------------------------------------------
| Compiling ${PKGSTEM} on OpenBSD
+-----------------------------------------------------------------------
${PKGSTEM} appears to have problems with STATICPIE so use:
env STATICPIE= CC=pcc make
When doing builds

View File

@ -1,12 +0,0 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/04/19 14:47:17 okan Exp $
@bin bin/pcc
lib/pcc/
lib/pcc/${CONFIG}/
lib/pcc/${CONFIG}/${PCCVER}.RELEASE/
lib/pcc/${CONFIG}/${PCCVER}.RELEASE/include/
lib/pcc/${CONFIG}/${PCCVER}.RELEASE/lib/
@bin libexec/ccom
@bin libexec/cpp
@man man/man1/ccom.1
@man man/man1/cpp.1
@man man/man1/pcc.1