Debian Codegraph @

os/minix/ccconfig.h

raw symbols SCIP
1 /* $Id: ccconfig.h,v 1.8 2016/11/06 08:34:06 ragge Exp $ */
2 /*
3 * Escrit per Antoine Leca pel projecte PCC, 2011-03.
4 * Copyright (C) 2011 Anders Magnusson ([email protected]).
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28 /*
29 * Various settings that controls how the C compiler works.
30 *
31 * MINIX (http://www.minix3.org), both Classic a.out=PC/IX and ELF
32 */
33
34 #ifdef ELFABI
35 /* MINIX versions 3.2 (2011) and up, using NetBSD userland. */
36
37 /* common cpp predefines */
38 #define CPPADD { "-D__minix", "-D__ELF__", NULL }
39
40 #define DYNLINKLIB "/usr/libexec/ld.elf_so"
41
42 #define CRTEND_T "crtend.o"
43
44 #define DEFLIBS { "-lc", NULL }
45 #define DEFPROFLIBS { "-lc_p", NULL }
46 #define DEFCXXLIBS { "-lp++", "-lc", NULL }
47
48 #if defined(mach_amd64)
49 #include "../inc/amd64.h"
50 #define PCC_SIZE_TYPE "unsigned long"
51 #define PCC_PTRDIFF_TYPE "long"
52 #elif defined(mach_arm)
53 #define CPPMDADD { "-D__arm__", NULL, }
54 #elif defined(mach_i386)
55 #define CPPMDADD { "-D__i386", "-D__i386__", NULL, }
56 #else
57 #error defines for arch missing
58 #endif
59
60 #ifndef PCC_WINT_TYPE
61 #define PCC_WINT_TYPE "int"
62 #endif
63 #ifndef PCC_SIZE_TYPE
64 #define PCC_SIZE_TYPE "unsigned int"
65 #endif
66 #ifndef PCC_PTRDIFF_TYPE
67 #define PCC_PTRDIFF_TYPE "int"
68 #endif
69
70 #elif defined(AOUTABI)
71 /* MINIX 2 or 3.1.x, a.out-like format derived from PC/IX. */
72
73 /* common cpp predefines */
74 #define CPPADD { "-D__minix", NULL }
75
76 /* linker stuff */
77 #define STARTLABEL "crtso"
78 #define CRT0 "crtso.o"
79 #ifdef notyet
80 #define GCRT0 "/usr/lib/pcc/gcrtso.o"
81 #endif
82
83 #define CRTBEGIN 0
84 #define CRTEND 0
85 #define CRTBEGIN_S 0
86 #define CRTEND_S 0
87 #define CRTBEGIN_T 0
88 #define CRTEND_T 0
89
90 #define CRTI 0
91 #define CRTN "end.a"
92
93 #define DEFLIBS {"-lc", "-lpccsoftfloat", "-lpcc", "-lc", NULL }
94
95 #if defined(mach_i386)
96 #define CPPMDADD { "-D__i386", "-D__i386__", \
97 "-D_EM_WSIZE=4", "-D_EM_PSIZE=4", "-D_EM_LSIZE=4", \
98 "-D_EM_SSIZE=2", "-D_EM_FSIZE=4", "-D_EM_DSIZE=8", \
99 NULL, }
100 #else
101 #define CPPMDADD { "-D__i86", \
102 "-D_EM_WSIZE=2", "-D_EM_PSIZE=2", "-D_EM_LSIZE=4", \
103 "-D_EM_SSIZE=2", "-D_EM_FSIZE=4", "-D_EM_DSIZE=8", \
104 NULL, }
105 #endif
106
107 #else
108 #error defines for ABI missing
109 #endif