| 1 | /* $Id: ccconfig.h,v 1.7 2014/12/24 08:43:28 plunky Exp $ */ |
| 2 | /*- |
| 3 | * Copyright (c) 2007, 2008 |
| 4 | * Thorsten Glaser <[email protected]> |
| 5 | * |
| 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. |
| 11 | * |
| 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. |
| 20 | */ |
| 21 | |
| 22 | /** |
| 23 | * Configuration for pcc on a MidnightBSD (amd64, i386 or sparc64) target |
| 24 | */ |
| 25 | |
| 26 | /* === mi part === */ |
| 27 | |
| 28 | /* cpp MI defines */ |
| 29 | #define CPPADD { \ |
| 30 | "-D__MidnightBSD__", \ |
| 31 | "-D__FreeBSD__", \ |
| 32 | "-D__unix__", \ |
| 33 | "-D__unix", \ |
| 34 | "-Dunix", \ |
| 35 | "-D__ELF__", \ |
| 36 | "-D_LONGLONG", \ |
| 37 | NULL \ |
| 38 | } |
| 39 | |
| 40 | /* for dynamically linked binaries */ |
| 41 | #define DYNLINKLIB "/libexec/ld-elf.so.1" |
| 42 | |
| 43 | /* C run-time startup */ |
| 44 | #define CRT0 "crt1.o" |
| 45 | #define GCRT0 "gcrt1.o" |
| 46 | |
| 47 | #define CRTEND_T "crtend.o" |
| 48 | |
| 49 | /* === md part === */ |
| 50 | |
| 51 | #if defined(mach_i386) |
| 52 | #define CPPMDADD { \ |
| 53 | "-D__i386__", \ |
| 54 | "-D__i386", \ |
| 55 | "-Di386", \ |
| 56 | NULL, \ |
| 57 | } |
| 58 | #elif defined(mach_sparc64) |
| 59 | #define CPPMDADD { \ |
| 60 | "-D__sparc64__", \ |
| 61 | "-D__sparc_v9__", \ |
| 62 | "-D__sparcv9", \ |
| 63 | "-D__sparc__", \ |
| 64 | "-D__sparc", \ |
| 65 | "-Dsparc", \ |
| 66 | "-D__arch64__", \ |
| 67 | "-D__LP64__", \ |
| 68 | "-D_LP64", \ |
| 69 | NULL, \ |
| 70 | } |
| 71 | #elif defined(mach_amd64) |
| 72 | #error pcc does not support amd64 yet |
| 73 | #else |
| 74 | #error this architecture is not supported by MidnightBSD |
| 75 | #endif |