PageRenderTime 48ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/pcc-20111216/os/netbsd/ccconfig.h

#
C Header | 102 lines | 57 code | 11 blank | 34 comment | 3 complexity | 8d54128aec5d8fd3c660f3319a69623e MD5 | raw file
  1. /* $Id: ccconfig.h,v 1.20 2011/07/23 08:29:27 plunky Exp $ */
  2. /*
  3. * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se).
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. * 1. Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. * 3. The name of the author may not be used to endorse or promote products
  15. * derived from this software without specific prior written permission
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  18. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  19. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  20. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  21. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  22. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  23. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  24. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  26. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. */
  28. /*
  29. * Various settings that controls how the C compiler works.
  30. */
  31. #ifndef LIBDIR
  32. #define LIBDIR "/usr/lib/"
  33. #endif
  34. /* common cpp predefines */
  35. #define CPPADD { "-D__NetBSD__", "-D__ELF__", NULL, }
  36. /* host-dependent */
  37. #define CRT0FILE LIBDIR "crt0.o"
  38. #define CRT0FILE_PROFILE LIBDIR "gcrt0.o"
  39. #if TARGOSVER == 1
  40. #define STARTFILES { LIBDIR "crtbegin.o", NULL }
  41. #define ENDFILES { LIBDIR "crtend.o", NULL }
  42. #else
  43. #define STARTFILES { LIBDIR "crti.o", LIBDIR "crtbegin.o", NULL }
  44. #define ENDFILES { LIBDIR "crtend.o", LIBDIR "crtn.o", NULL }
  45. #endif
  46. /* shared libraries linker files */
  47. #if TARGOSVER == 1
  48. #define STARTFILES_S { LIBDIR "crtbeginS.o", NULL }
  49. #define ENDFILES_S { LIBDIR "crtendS.o", NULL }
  50. #else
  51. #define STARTFILES_S { LIBDIR "crti.o", LIBDIR "crtbeginS.o", NULL }
  52. #define ENDFILES_S { LIBDIR "crtendS.o", LIBDIR "crtn.o", NULL }
  53. #endif
  54. #ifdef LANG_F77
  55. #define F77LIBLIST { "-L/usr/local/lib", "-lF77", "-lI77", "-lm", "-lc", NULL };
  56. #endif
  57. /* host-independent */
  58. #define DYNLINKER { "-dynamic-linker", "/usr/libexec/ld.elf_so", NULL }
  59. #if defined(mach_amd64)
  60. #define CPPMDADD \
  61. { "-D__x86_64__", "-D__x86_64", "-D__amd64__", "-D__amd64", \
  62. "-D__LP64__", "-D_LP64", NULL, }
  63. #elif defined(mach_arm)
  64. #define CPPMDADD { "-D__arm__", NULL, }
  65. #elif defined(mach_i386)
  66. #define CPPMDADD { "-D__i386__", NULL, }
  67. #define PCC_SIZE_TYPE "unsigned int"
  68. #define PCC_PTRDIFF_TYPE "int"
  69. #elif defined(mach_mips)
  70. #define CPPMDADD { "-D__mips__", NULL, }
  71. #elif defined(mach_pdp10)
  72. #define CPPMDADD { "-D__pdp10__", NULL, }
  73. #elif defined(mach_powerpc)
  74. #define CPPMDADD { "-D__ppc__", NULL, }
  75. #define STARTLABEL "_start"
  76. #elif defined(mach_vax)
  77. #define CPPMDADD { "-D__vax__", NULL, }
  78. #elif defined(mach_sparc64)
  79. #define CPPMDADD { "-D__sparc64__", NULL, }
  80. #else
  81. #error defines for arch missing
  82. #endif
  83. #ifndef PCC_WINT_TYPE
  84. #define PCC_WINT_TYPE "int"
  85. #endif
  86. #ifndef PCC_SIZE_TYPE
  87. #define PCC_SIZE_TYPE "unsigned long"
  88. #endif
  89. #ifndef PCC_PTRDIFF_TYPE
  90. #define PCC_PTRDIFF_TYPE "long"
  91. #endif