Debian Codegraph @

os/netbsd/ccconfig.h

raw symbols SCIP
1 /* $Id: ccconfig.h,v 1.34 2019/09/07 11:59:03 ragge Exp $ */
2
3 /*
4 * Copyright (c) 2004 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 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 /*
31 * Various settings that controls how the C compiler works.
32 */
33
34 /* common cpp predefines */
35 #define CPPADD { "-D__NetBSD__", "-D__ELF__", NULL, }
36
37 #ifdef LANG_F77
38 #define F77LIBLIST { "-L/usr/local/lib", "-lF77", "-lI77", "-lm", "-lc", NULL };
39 #endif
40
41 #define DYNLINKLIB "/usr/libexec/ld.elf_so"
42
43 #define CRTEND_T "crtend.o"
44 #define RCRT0 "crt0.o"
45
46 #ifdef notdef /* NetBSD needs libpcc now */
47 #define DEFLIBS { "-lc", NULL }
48 #define DEFPROFLIBS { "-lc_p", NULL }
49 #define DEFCXXLIBS { "-lp++", "-lc", NULL }
50 #endif
51
52 #if defined(mach_amd64)
53 #define CPPMDADD \
54 { "-D__x86_64__", "-D__x86_64", "-D__amd64__", "-D__amd64", \
55 "-D__LP64__", "-D_LP64", NULL, }
56 #elif defined(mach_arm)
57 #define CPPMDADD { "-D__arm__", NULL, }
58 #elif defined(mach_i386)
59 #define CPPMDADD { "-D__i386__", NULL, }
60 #define PCC_SIZE_TYPE "unsigned int"
61 #define PCC_PTRDIFF_TYPE "int"
62 #elif defined(mach_m68k)
63 #define CPPMDADD { "-D__mc68000__", "-D__mc68020__", "-D__m68k__", NULL, }
64 #undef DEFLIBS
65 #define DEFLIBS { "-lc", "-lgcc", NULL }
66 #define STARTLABEL "_start"
67 #elif defined(mach_mips)
68 #define CPPMDADD { "-D__mips__", NULL, }
69 #elif defined(mach_mips64)
70 #ifdef TARGET_BIG_ENDIAN
71 #define CPPMDADD { "-D__MIPSEB__", "-D__mips__", "-D__mips64__", NULL, }
72 #else
73 #define CPPMDADD { "-D__MIPSEL__", "-D__mips__", "-D__mips64__", "-D__mipsel__", "-D__mips64el__", NULL, }
74 #endif
75 #elif defined(mach_pdp10)
76 #define CPPMDADD { "-D__pdp10__", NULL, }
77 #elif defined(mach_powerpc)
78 #define CPPMDADD { "-D__ppc__", NULL, }
79 #define STARTLABEL "_start"
80 #elif defined(mach_vax)
81 #define CPPMDADD { "-D__vax__", NULL, }
82 #define PCC_EARLY_SETUP { kflag = 1; }
83 #elif defined(mach_sparc64)
84 #define CPPMDADD { "-D__sparc64__", NULL, }
85 #else
86 #error defines for arch missing
87 #endif
88
89 #ifndef PCC_WINT_TYPE
90 #define PCC_WINT_TYPE "int"
91 #endif
92 #ifndef PCC_SIZE_TYPE
93 #define PCC_SIZE_TYPE "unsigned long"
94 #endif
95 #ifndef PCC_PTRDIFF_TYPE
96 #define PCC_PTRDIFF_TYPE "long"
97 #endif