diff options
| author | Michael Forney <mforney@mforney.org> | 2017-02-09 13:08:08 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2017-02-09 13:08:08 -0800 |
| commit | 296ffd4196fbdeb9159d1e599e8c7c3a33007d2a (patch) | |
| tree | 2040021613dadd6564bf486493c227e533043d99 | |
| parent | 9277a796ec1bfd6dc056f5f09d003060d82d2a1e (diff) | |
scc: Update to latest git
| -rw-r--r-- | .gitmodules | 1 | ||||
| -rw-r--r-- | pkg/scc/gen.rc | 11 | ||||
| -rw-r--r-- | pkg/scc/patch/0001-Allow-generated-sysincludes.h-in-separate-directory.patch | 81 | ||||
| -rw-r--r-- | pkg/scc/patch/0002-cc1-Add-missing-icode-declaration.patch | 24 | ||||
| -rw-r--r-- | pkg/scc/rev | 2 | ||||
| m--------- | pkg/scc/src | 0 |
6 files changed, 113 insertions, 6 deletions
diff --git a/.gitmodules b/.gitmodules index ebd48367..f852f0a5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -192,6 +192,7 @@ [submodule "pkg/scc/src"] path = pkg/scc/src url = git://git.suckless.org/scc + ignore = all [submodule "pkg/sdhcp/src"] path = pkg/sdhcp/src url = git://git.2f30.org/sdhcp diff --git a/pkg/scc/gen.rc b/pkg/scc/gen.rc index c698d9c5..e29e7534 100644 --- a/pkg/scc/gen.rc +++ b/pkg/scc/gen.rc @@ -5,12 +5,13 @@ cflags\ -D 'PREFIX=' \ -D NDEBUG\ -I '$srcdir'/inc/$std\ - -I '$outdir'/lib + -I '$outdir'/inc lib libcc.a lib/^(debug.c die.c newitem.c xcalloc.c xmalloc.c xrealloc.c xstrdup.c) -build '$outdir'/lib/error.h awk '$srcdir'/cc2/cc2.h '|' '$srcdir'/cc2/generror.awk ; with\ +build '$outdir'/inc/error.h awk '$srcdir'/cc2/cc2.h '|' '$srcdir'/cc2/generror.awk ; with\ expr '-f $srcdir/cc2/generror.awk' +build '$outdir'/inc/sysincludes.h copy '$srcdir'/inc/sysincludes.def.h set baseoutdir '$outdir' hdrs=() @@ -19,13 +20,13 @@ for(arch in $archs) { set outdir '$outdir'/$arch cflags -D 'ARCH=''"'^$arch^'"''' - exe cc1-$arch cc1/^(\ + exe cc1-$arch -d '$baseoutdir'/inc/sysincludes.h cc1/^(\ types.c decl.c lex.c error.c symbol.c main.c expr.c\ code.c stmt.c cpp.c fold.c init.c arch/$arch/arch.c\ ) '$baseoutdir'/libcc.a file libexec/scc/cc1-$arch '$outdir'/cc1-$arch 755 - exe cc2-$arch -d '$baseoutdir'/lib/error.h cc2/^(\ + exe cc2-$arch -d '$baseoutdir'/inc/error.h cc2/^(\ main.c parser.c peep.c symbol.c node.c code.c optm.c\ arch/$arch/^(code.c cgen.c types.c optm.c)\ ) '$baseoutdir'/libcc.a @@ -42,6 +43,6 @@ file bin/scc '$outdir'/scc 755 if(~ amd64-sysv $archs) hdrs=($hdrs amd64-sysv/stdarg.h) for(hdr in $hdrs) - file include/scc/arch/$hdr '$srcdir'/libc/include/$hdr 644 + file include/scc/$hdr '$srcdir'/libc/include/$hdr 644 fetch git diff --git a/pkg/scc/patch/0001-Allow-generated-sysincludes.h-in-separate-directory.patch b/pkg/scc/patch/0001-Allow-generated-sysincludes.h-in-separate-directory.patch new file mode 100644 index 00000000..e6545788 --- /dev/null +++ b/pkg/scc/patch/0001-Allow-generated-sysincludes.h-in-separate-directory.patch @@ -0,0 +1,81 @@ +From e44ceb42cf228e57264e657ea1fa3767811e68cf Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 9 Feb 2017 13:01:13 -0800 +Subject: [PATCH] Allow generated sysincludes.h in separate directory + +--- + cc1/Makefile | 2 +- + cc1/arch/amd64-sysv/arch.c | 2 +- + cc1/arch/i386-sysv/arch.c | 2 +- + cc1/arch/qbe/arch.c | 2 +- + cc1/arch/z80/arch.c | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/cc1/Makefile b/cc1/Makefile +index b9f73ce..3ec023b 100644 +--- a/cc1/Makefile ++++ b/cc1/Makefile +@@ -1,7 +1,7 @@ + # See LICENSE file for copyright and license details. + .POSIX: + +-CSTDINC = -I../inc/$(STD) ++CSTDINC = -I../inc -I../inc/$(STD) + + include ../config.mk + +diff --git a/cc1/arch/amd64-sysv/arch.c b/cc1/arch/amd64-sysv/arch.c +index f4492b4..f72d275 100644 +--- a/cc1/arch/amd64-sysv/arch.c ++++ b/cc1/arch/amd64-sysv/arch.c +@@ -2,7 +2,7 @@ + static char sccsid[] = "@(#) ./cc1/arch/amd64-sysv/arch.c"; + #include <stdio.h> + +-#include "../../../inc/sysincludes.h" ++#include <sysincludes.h> + #include "../../../inc/cc.h" + #include "../../cc1.h" + +diff --git a/cc1/arch/i386-sysv/arch.c b/cc1/arch/i386-sysv/arch.c +index f72f889..3672acd 100644 +--- a/cc1/arch/i386-sysv/arch.c ++++ b/cc1/arch/i386-sysv/arch.c +@@ -2,7 +2,7 @@ + static char sccsid[] = "@(#) ./cc1/arch/i386-sysv/arch.c"; + #include <stdio.h> + +-#include "../../../inc/sysincludes.h" ++#include <sysincludes.h> + #include "../../../inc/cc.h" + #include "../../cc1.h" + +diff --git a/cc1/arch/qbe/arch.c b/cc1/arch/qbe/arch.c +index 233a390..e633a40 100644 +--- a/cc1/arch/qbe/arch.c ++++ b/cc1/arch/qbe/arch.c +@@ -2,7 +2,7 @@ + static char sccsid[] = "@(#) ./cc1/arch/qbe/arch.c"; + #include <stdio.h> + +-#include "../../../inc/sysincludes.h" ++#include <sysincludes.h> + #include "../../../inc/cc.h" + #include "../../cc1.h" + +diff --git a/cc1/arch/z80/arch.c b/cc1/arch/z80/arch.c +index 0c603f6..e709bfb 100644 +--- a/cc1/arch/z80/arch.c ++++ b/cc1/arch/z80/arch.c +@@ -2,7 +2,7 @@ + static char sccsid[] = "@(#) ./cc1/arch/z80/arch.c"; + #include <stdio.h> + +-#include "../../../inc/sysincludes.h" ++#include <sysincludes.h> + #include "../../../inc/cc.h" + #include "../../cc1.h" + +-- +2.11.1 + diff --git a/pkg/scc/patch/0002-cc1-Add-missing-icode-declaration.patch b/pkg/scc/patch/0002-cc1-Add-missing-icode-declaration.patch new file mode 100644 index 00000000..78d250f1 --- /dev/null +++ b/pkg/scc/patch/0002-cc1-Add-missing-icode-declaration.patch @@ -0,0 +1,24 @@ +From eca0568e51f6c14648a9ca0e0cba4897d961e644 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 9 Feb 2017 13:03:30 -0800 +Subject: [PATCH] [cc1] Add missing icode declaration + +--- + cc1/cc1.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cc1/cc1.h b/cc1/cc1.h +index 705e0b9..06484fc 100644 +--- a/cc1/cc1.h ++++ b/cc1/cc1.h +@@ -410,6 +410,7 @@ extern int setloc(char *fname, unsigned line); + #define accept(t) ((yytoken == (t)) ? next() : 0) + + /* code.c */ ++extern void icode(void); + extern void prtree(Node *np); + extern void emit(unsigned, void *); + extern Node *node(unsigned op, Type *tp, Node *left, Node *rigth); +-- +2.11.1 + diff --git a/pkg/scc/rev b/pkg/scc/rev index b8626c4c..7ed6ff82 100644 --- a/pkg/scc/rev +++ b/pkg/scc/rev @@ -1 +1 @@ -4 +5 diff --git a/pkg/scc/src b/pkg/scc/src -Subproject 60bbc9b93785a652d0f89146e3eefe9d2d0fb52 +Subproject a84618bba7d82a3c2cd9f96bcf1234419917476 |
