* add p cc
[mascara-docs.git] / compilers / pcc / pcc-1.0.0 / os / mirbsd / ccconfig.h
blob1160957eea9c61323cebe6bda435487f79cca646
1 /* $Id: ccconfig.h,v 1.7 2009/01/24 21:43:49 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 MirOS BSD (i386 or sparc) target
26 /* === mi part === */
28 #ifndef LIBDIR
29 #define LIBDIR "/usr/lib/"
30 #endif
32 /* cpp MI defines */
33 #define CPPADD { \
34 "-D__MirBSD__", \
35 "-D__OpenBSD__", \
36 "-D__unix__", \
37 "-D__ELF__", \
38 NULL \
41 /* for dynamically linked binaries */
42 #define DYNLINKER { \
43 "-dynamic-linker", \
44 "/usr/libexec/ld.so", \
45 NULL \
47 #define STARTFILES { \
48 LIBDIR "crti.o", \
49 LIBDIR "crtbegin.o", \
50 NULL \
52 #define ENDFILES { \
53 LIBDIR "crtend.o", \
54 LIBDIR "crtn.o", \
55 NULL \
58 /* for shared libraries */
59 #define STARTFILES_S { \
60 LIBDIR "crti.o", \
61 LIBDIR "crtbeginS.o", \
62 NULL \
64 #define ENDFILES_S { \
65 LIBDIR "crtendS.o", \
66 LIBDIR "crtn.o", \
67 NULL \
70 /* for statically linked binaries */
71 #define STARTFILES_T { \
72 LIBDIR "crti.o", \
73 LIBDIR "crtbeginT.o", \
74 NULL \
76 #define ENDFILES_T { \
77 LIBDIR "crtend.o", \
78 LIBDIR "crtn.o", \
79 NULL \
82 /* libc contains helper functions, so -lpcc is not needed */
83 #define LIBCLIBS { \
84 "-lc", \
85 NULL \
88 /* C run-time startup */
89 #define CRT0FILE LIBDIR "crt0.o"
90 #define STARTLABEL "__start"
92 /* debugging info */
93 #define STABS
95 /* === md part === */
97 #if defined(mach_i386)
98 #define CPPMDADD { \
99 "-D__i386__", \
100 "-D__i386", \
101 "-Di386", \
102 NULL, \
104 #elif defined(mach_sparc)
105 #error pcc does not support sparc yet
106 #else
107 #error this architecture is not supported by MirOS BSD
108 #endif