summaryrefslogtreecommitdiff
path: root/pkg/scc/patch/0001-Allow-generated-headers-in-separate-directory.patch
blob: ff690129bc11b6e14f0418ea461bd3d44cd5194b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
From 5ee9b6dbb259fd0ca6024c27e9af1730f01db2d4 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 headers 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 +-
 driver/posix/Makefile      | 2 ++
 driver/posix/scc.c         | 4 ++--
 7 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/cc1/Makefile b/cc1/Makefile
index bd37547..3881eae 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 ba5d7ea..692a288 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 fd73eba..36d6366 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 01e2410..ab718c7 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 b5e31f3..a686c90 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"
 
diff --git a/driver/posix/Makefile b/driver/posix/Makefile
index 782a0a2..458b32b 100644
--- a/driver/posix/Makefile
+++ b/driver/posix/Makefile
@@ -1,6 +1,8 @@
 # See LICENSE file for copyright and license details.
 .POSIX:
 
+CSTDINC = -I../../inc
+
 include ../../config.mk
 
 OBJS = scc.o
diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index dd74e26..26f4f8c 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -16,8 +16,8 @@ static char sccsid[] = "@(#) ./driver/posix/scc.c";
 
 #include "../../inc/arg.h"
 #include "../../inc/cc.h"
-#include "../../inc/syslibs.h"
-#include "../../inc/ldflags.h"
+#include <syslibs.h>
+#include <ldflags.h>
 
 enum {
 	CC1,
-- 
2.14.1