pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import 8cc-0nb20161001 as wip/8cc.



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Oct 1 21:48:32 2016 +0200
Changeset:	bd5361f60eecc6977318285c0ef18e2b76a22e25

Added Files:
	8cc/DESCR
	8cc/Makefile
	8cc/PLIST
	8cc/TODO
	8cc/distinfo
	8cc/patches/patch-8cc.h

Log Message:
Import 8cc-0nb20161001 as wip/8cc.

8cc is a compiler for the C programming language. It's intended to support all
C11 language features while keeping the code as small and simple as possible.

The compiler is able to compile itself. You can see its code both as an
implementation of the C language and as an example of what this compiler is
able to compile.

8cc's source code is carefully written to be as concise and easy-to-read as
possible, so that the source code becomes good study material to learn about
various techniques used in compilers. You may find the lexer, the preprocessor
and the parser are already useful to learn how C source code is processed at
each stage.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bd5361f60eecc6977318285c0ef18e2b76a22e25

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 8cc/DESCR               | 12 ++++++++++++
 8cc/Makefile            | 19 +++++++++++++++++++
 8cc/PLIST               |  1 +
 8cc/TODO                |  3 +++
 8cc/distinfo            |  3 +++
 8cc/patches/patch-8cc.h | 31 +++++++++++++++++++++++++++++++
 6 files changed, 69 insertions(+)

diffs:
diff --git a/8cc/DESCR b/8cc/DESCR
new file mode 100644
index 0000000..1a6621d
--- /dev/null
+++ b/8cc/DESCR
@@ -0,0 +1,12 @@
+8cc is a compiler for the C programming language. It's intended to support all
+C11 language features while keeping the code as small and simple as possible.
+
+The compiler is able to compile itself. You can see its code both as an
+implementation of the C language and as an example of what this compiler is
+able to compile.
+
+8cc's source code is carefully written to be as concise and easy-to-read as
+possible, so that the source code becomes good study material to learn about
+various techniques used in compilers. You may find the lexer, the preprocessor
+and the parser are already useful to learn how C source code is processed at
+each stage.
diff --git a/8cc/Makefile b/8cc/Makefile
new file mode 100644
index 0000000..1e41a2a
--- /dev/null
+++ b/8cc/Makefile
@@ -0,0 +1,19 @@
+# $NetBSD$
+
+PKGNAME=	8cc-0
+CATEGORIES=	lang
+
+GIT_REPOSITORIES=	8cc
+GIT_REPO.8cc=		https://github.com/rui314/8cc.git
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/rui314/8cc/
+COMMENT=	Small C Compiler
+LICENSE=	mit
+
+USE_TOOLS+=	gmake
+
+WRKSRC=		${WRKDIR}/8cc
+
+.include "../../wip/mk/git-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/8cc/PLIST b/8cc/PLIST
new file mode 100644
index 0000000..48d96a5
--- /dev/null
+++ b/8cc/PLIST
@@ -0,0 +1 @@
+@comment $NetBSD$
diff --git a/8cc/TODO b/8cc/TODO
new file mode 100644
index 0000000..df8b6c7
--- /dev/null
+++ b/8cc/TODO
@@ -0,0 +1,3 @@
+- Upstream C11 support in NetBSD.
+- Add support for NetBSD headers (be able to declare __GNUC__ and support
+  extensions)
diff --git a/8cc/distinfo b/8cc/distinfo
new file mode 100644
index 0000000..a9bc268
--- /dev/null
+++ b/8cc/distinfo
@@ -0,0 +1,3 @@
+$NetBSD$
+
+SHA1 (patch-8cc.h) = 948965804814e2428bee21e191cb0c86cdfb363a
diff --git a/8cc/patches/patch-8cc.h b/8cc/patches/patch-8cc.h
new file mode 100644
index 0000000..bb39fa3
--- /dev/null
+++ b/8cc/patches/patch-8cc.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+Add support for NetBSD.
+
+--- 8cc.h.orig	2016-10-01 19:32:15.000000000 +0000
++++ 8cc.h
+@@ -7,7 +7,10 @@
+ #include <inttypes.h>
+ #include <stdbool.h>
+ #include <stdio.h>
++#include <stdarg.h>
++#if !defined(__NetBSD__)
+ #include <stdnoreturn.h>
++#endif
+ #include <time.h>
+ 
+ enum {
+@@ -348,7 +351,12 @@ extern bool warning_is_error;
+ #define warn(...)        warnf(__FILE__ ":" STR(__LINE__), NULL, __VA_ARGS__)
+ #define warnt(tok, ...)  warnf(__FILE__ ":" STR(__LINE__), token_pos(tok), __VA_ARGS__)
+ 
+-noreturn void errorf(char *line, char *pos, char *fmt, ...);
++#if defined(__NetBSD__)
++__dead
++#else
++noreturn 
++#endif
++void errorf(char *line, char *pos, char *fmt, ...);
+ void warnf(char *line, char *pos, char *fmt, ...);
+ char *token_pos(Token *tok);
+ 


Home | Main Index | Thread Index | Old Index