[hackers] [scc] [cc1] Remove arch.h || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Tue, 29 Nov 2016 12:40:58 +0100 (CET)

commit 7970e948796bc1670bba5c5cad6130d1ddd2d059
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Nov 29 12:38:35 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Nov 29 12:38:35 2016 +0100

    [cc1] Remove arch.h
    
    After removing this file the common objects of cc1 will compile
    to the same content indepently of the architecture, so we can
    avoid the clean that the global Makefile is doing.

diff --git a/cc1/Makefile b/cc1/Makefile
index 9020ba6..48a32ab 100644
--- a/cc1/Makefile
+++ b/cc1/Makefile
_AT_@ -13,7 +13,7 @@ all: cc1
 
 cpp.o: stallman.msg
 
-$(OBJS): cc1.h ../inc/cc.h ../inc/sizes.h arch/$(ARCH)/arch.h
+$(OBJS): cc1.h ../inc/cc.h ../inc/sizes.h
 
 ../lib/libcc.a:
         cd ../lib && $(MAKE) -e
diff --git a/cc1/arch/amd64-sysv/arch.c b/cc1/arch/amd64-sysv/arch.c
index 4728b78..a7d09c3 100644
--- a/cc1/arch/amd64-sysv/arch.c
+++ b/cc1/arch/amd64-sysv/arch.c
_AT_@ -1,7 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <stdio.h>
 
-#include "arch.h"
 #include "../../../inc/cc.h"
 #include "../../cc1.h"
 
diff --git a/cc1/arch/amd64-sysv/arch.h b/cc1/arch/amd64-sysv/arch.h
deleted file mode 100644
index 6e36646..0000000
--- a/cc1/arch/amd64-sysv/arch.h
+++ /dev/null
_AT_@ -1,3 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-#define L_ENUM L_INT32
diff --git a/cc1/arch/i386-sysv/arch.c b/cc1/arch/i386-sysv/arch.c
index 3229183..5d215e7 100644
--- a/cc1/arch/i386-sysv/arch.c
+++ b/cc1/arch/i386-sysv/arch.c
_AT_@ -1,7 +1,5 @@
 /* See LICENSE file for copyright and license details. */
 #include <stdio.h>
-
-#include "arch.h"
 #include "../../../inc/cc.h"
 #include "../../cc1.h"
 
diff --git a/cc1/arch/i386-sysv/arch.h b/cc1/arch/i386-sysv/arch.h
deleted file mode 100644
index 6e36646..0000000
--- a/cc1/arch/i386-sysv/arch.h
+++ /dev/null
_AT_@ -1,3 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-#define L_ENUM L_INT32
diff --git a/cc1/arch/qbe/arch.c b/cc1/arch/qbe/arch.c
index 81cd57d..72b2bfb 100644
--- a/cc1/arch/qbe/arch.c
+++ b/cc1/arch/qbe/arch.c
_AT_@ -1,7 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <stdio.h>
 
-#include "arch.h"
 #include "../../../inc/cc.h"
 #include "../../cc1.h"
 
diff --git a/cc1/arch/qbe/arch.h b/cc1/arch/qbe/arch.h
deleted file mode 100644
index 6e36646..0000000
--- a/cc1/arch/qbe/arch.h
+++ /dev/null
_AT_@ -1,3 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-#define L_ENUM L_INT32
diff --git a/cc1/arch/z80/arch.c b/cc1/arch/z80/arch.c
index 9a74708..a5e9cc2 100644
--- a/cc1/arch/z80/arch.c
+++ b/cc1/arch/z80/arch.c
_AT_@ -1,7 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <stdio.h>
 
-#include "arch.h"
 #include "../../../inc/cc.h"
 #include "../../cc1.h"
 
diff --git a/cc1/arch/z80/arch.h b/cc1/arch/z80/arch.h
deleted file mode 100644
index c8ef7a1..0000000
--- a/cc1/arch/z80/arch.h
+++ /dev/null
_AT_@ -1,3 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-#define L_ENUM L_INT16
diff --git a/cc1/code.c b/cc1/code.c
index f2105e1..6c0ff45 100644
--- a/cc1/code.c
+++ b/cc1/code.c
_AT_@ -5,7 +5,6 @@
 #include <stdarg.h>
 
 #include "../inc/cc.h"
-#include "arch.h"
 #include "cc1.h"
 
 static void emitbin(unsigned, void *),
diff --git a/cc1/cpp.c b/cc1/cpp.c
index 80131f7..682a371 100644
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
_AT_@ -8,7 +8,6 @@
 
 #include "../inc/sizes.h"
 #include "../inc/cc.h"
-#include "arch.h"
 #include "cc1.h"
 
 static char *argp, *macroname;
diff --git a/cc1/decl.c b/cc1/decl.c
index 05677ab..6397ca0 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -7,7 +7,6 @@
 
 #include "../inc/sizes.h"
 #include "../inc/cc.h"
-#include "arch.h"
 #include "cc1.h"
 
 #define NOSCLASS 0
diff --git a/cc1/error.c b/cc1/error.c
index a864d4b..65afa7d 100644
--- a/cc1/error.c
+++ b/cc1/error.c
_AT_@ -4,7 +4,6 @@
 #include <stdlib.h>
 
 #include "../inc/cc.h"
-#include "arch.h"
 #include "cc1.h"
 
 #define MAXERRNUM 10
diff --git a/cc1/expr.c b/cc1/expr.c
index a9945c9..9a0e406 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
_AT_@ -6,7 +6,6 @@
 
 #include "../inc/cc.h"
 #include "../inc/sizes.h"
-#include "arch.h"
 #include "cc1.h"
 
 #define XCHG(lp, rp, np) (np = lp, lp = rp, rp = np)
diff --git a/cc1/fold.c b/cc1/fold.c
index 37cca42..d49412b 100644
--- a/cc1/fold.c
+++ b/cc1/fold.c
_AT_@ -3,7 +3,6 @@
 #include <stdlib.h>
 
 #include "../inc/cc.h"
-#include "arch.h"
 #include "cc1.h"
 
 
diff --git a/cc1/init.c b/cc1/init.c
index cdd7aa4..1433453 100644
--- a/cc1/init.c
+++ b/cc1/init.c
_AT_@ -6,7 +6,6 @@
 
 #include "../inc/cc.h"
 #include "../inc/sizes.h"
-#include "arch.h"
 #include "cc1.h"
 
 
diff --git a/cc1/lex.c b/cc1/lex.c
index 1119f59..f6d8536 100644
--- a/cc1/lex.c
+++ b/cc1/lex.c
_AT_@ -8,7 +8,6 @@
 
 #include "../inc/sizes.h"
 #include "../inc/cc.h"
-#include "arch.h"
 #include "cc1.h"
 
 unsigned yytoken;
diff --git a/cc1/main.c b/cc1/main.c
index d2fdf0e..16f9f1a 100644
--- a/cc1/main.c
+++ b/cc1/main.c
_AT_@ -7,7 +7,6 @@
 
 #include "../inc/arg.h"
 #include "../inc/cc.h"
-#include "arch.h"
 #include "cc1.h"
 
 char *argv0;
diff --git a/cc1/stmt.c b/cc1/stmt.c
index 2896ac6..489eac1 100644
--- a/cc1/stmt.c
+++ b/cc1/stmt.c
_AT_@ -5,7 +5,6 @@
 
 #include "../inc/cc.h"
 #include "../inc/sizes.h"
-#include "arch.h"
 #include "cc1.h"
 
 Symbol *curfun;
diff --git a/cc1/symbol.c b/cc1/symbol.c
index 9eea01c..d8c3ce4 100644
--- a/cc1/symbol.c
+++ b/cc1/symbol.c
_AT_@ -6,7 +6,6 @@
 
 #include "../inc/cc.h"
 #include "../inc/sizes.h"
-#include "arch.h"
 #include "cc1.h"
 
 #define NR_SYM_HASH 64
diff --git a/cc1/types.c b/cc1/types.c
index 58aa01c..df44f4d 100644
--- a/cc1/types.c
+++ b/cc1/types.c
_AT_@ -6,9 +6,7 @@
 
 #include "../inc/sizes.h"
 #include "../inc/cc.h"
-#include "arch.h"
 #include "cc1.h"
-#include "arch.h"
 
 #define NR_TYPE_HASH 16
 
_AT_@ -257,12 +255,12 @@ mktype(Type *tp, int op, TINT nelem, Type *pars[])
                 op = FTN;
         }
         switch (op) {
- case PTR: c = L_POINTER; break;
- case ARY: c = L_ARRAY; break;
- case FTN: c = L_FUNCTION; break;
- case ENUM: c = L_ENUM; break;
- case STRUCT: c = L_STRUCT; break;
- case UNION: c = L_UNION; break;
+ case PTR: c = L_POINTER; break;
+ case ARY: c = L_ARRAY; break;
+ case FTN: c = L_FUNCTION; break;
+ case ENUM: c = inttype->letter; break;
+ case STRUCT: c = L_STRUCT; break;
+ case UNION: c = L_UNION; break;
         }
 
         type.type = tp;
Received on Tue Nov 29 2016 - 12:40:58 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 29 2016 - 12:48:14 CET