* add p cc
[mascara-docs.git] / compilers / pcc / pcc-1.0.0 / os / midnightbsd / ccconfig.h
blobcdea007301fd86079dbe3ce55a6f3a751a31a0cc
1 /* $Id: ccconfig.h,v 1.4 2008/07/18 06:53:48 gmcgarry Exp $ */
2 /*-
3 * Copyright (c) 2007, 2008
4 * Thorsten Glaser <tg@mirbsd.de>
6 * Provided that these terms and disclaimer and all copyright notices
7 * are retained or reproduced in an accompanying document, permission
8 * is granted to deal in this work without restriction, including un-
9 * limited rights to use, publicly perform, distribute, sell, modify,
10 * merge, give away, or sublicence.
12 * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
13 * the utmost extent permitted by applicable law, neither express nor
14 * implied; without malicious intent or gross negligence. In no event
15 * may a licensor, author or contributor be held liable for indirect,
16 * direct, other damage, loss, or other issues arising in any way out
17 * of dealing in the work, even if advised of the possibility of such
18 * damage or existence of a defect, except proven that it results out
19 * of said person's immediate fault when using the work as intended.
22 /**
23 * Configuration for pcc on a MidnightBSD (amd64, i386 or sparc64) target
26 /* === mi part === */
28 #ifndef LIBDIR
29 #define LIBDIR "/usr/lib/"
30 #endif
32 /* cpp MI defines */
33 #define CPPADD { \
34 "-D__MidnightBSD__", \
35 "-D__FreeBSD__", \
36 "-D__unix__", \
37 "-D__unix", \
38 "-Dunix", \
39 "-D__ELF__", \
40 "-D_LONGLONG", \
41 NULL \
44 /* for dynamically linked binaries */
45 #define DYNLINKER { \
46 "-dynamic-linker", \
47 "/libexec/ld-elf.so.1", \
48 NULL \
50 #define STARTFILES { \
51 LIBDIR "crti.o", \
52 LIBDIR "crtbegin.o", \
53 NULL \
55 #define ENDFILES { \
56 LIBDIR "crtend.o", \
57 LIBDIR "crtn.o", \
58 NULL \
61 /* for shared libraries */
62 #define STARTFILES_S { \
63 LIBDIR "crti.o", \
64 LIBDIR "crtbeginS.o", \
65 NULL \
67 #define ENDFILES_S { \
68 LIBDIR "crtendS.o", \
69 LIBDIR "crtn.o", \
70 NULL \
73 /* for statically linked binaries */
74 #define STARTFILES_T { \
75 LIBDIR "crti.o", \
76 LIBDIR "crtbeginT.o", \
77 NULL \
79 #define ENDFILES_T { \
80 LIBDIR "crtend.o", \
81 LIBDIR "crtn.o", \
82 NULL \
85 #define LIBCLIBS { \
86 "-lc", \
87 "-lpcc", \
88 NULL \
90 #define LIBCLIBS_PROFILE { \
91 "-lc_p", \
92 "-lpcc", \
93 NULL \
97 /* C run-time startup */
98 #define CRT0FILE LIBDIR "crt1.o"
99 #define CRT0FILE_PROFILE LIBDIR "gcrt1.o"
100 #define STARTLABEL "_start"
102 /* debugging info */
103 #define STABS
105 /* === md part === */
107 #if defined(mach_i386)
108 #define CPPMDADD { \
109 "-D__i386__", \
110 "-D__i386", \
111 "-Di386", \
112 NULL, \
114 #elif defined(mach_sparc64)
115 #define CPPMDADD { \
116 "-D__sparc64__", \
117 "-D__sparc_v9__", \
118 "-D__sparcv9", \
119 "-D__sparc__", \
120 "-D__sparc", \
121 "-Dsparc", \
122 "-D__arch64__", \
123 "-D__LP64__", \
124 "-D_LP64", \
125 NULL, \
127 #elif defined(mach_amd64)
128 #error pcc does not support amd64 yet
129 #else
130 #error this architecture is not supported by MidnightBSD
131 #endif