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

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

#
C Header | 72 lines | 31 code | 10 blank | 31 comment | 1 complexity | af1e822d05fe094aa56b51d662647d7b MD5 | raw file
  1. /* $Id: ccconfig.h,v 1.21 2011/06/04 19:27:25 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. /* common cpp predefines */
  32. #define CPPADD { "-D__linux__", "-D__ELF__", NULL, }
  33. #define CRT0FILE LIBDIR "crt1.o"
  34. #define CRT0FILE_PROFILE LIBDIR "gcrt1.o"
  35. #define LIBCLIBS { "-lc", "-lpcc", NULL }
  36. #define LIBCLIBS_PROFILE LIBCLIBS
  37. #define STARTFILES { LIBDIR "crti.o", PCCLIBDIR "crtbegin.o", NULL }
  38. #define ENDFILES { PCCLIBDIR "crtend.o", LIBDIR "crtn.o", NULL }
  39. #define STARTFILES_S { LIBDIR "crti.o", PCCLIBDIR "crtbegin.o", NULL }
  40. #define ENDFILES_S { PCCLIBDIR "crtend.o", LIBDIR "crtn.o", NULL }
  41. #define STARTLABEL "_start"
  42. #if defined(mach_i386)
  43. #define CPPMDADD { "-D__i386__", NULL, }
  44. #define DYNLINKER { "-dynamic-linker", "/lib/ld-linux.so.2", NULL }
  45. #elif defined(mach_powerpc)
  46. #define CPPMDADD { "-D__ppc__", NULL, }
  47. #define DYNLINKER { "-dynamic-linker", "/lib/ld-linux.so.2", NULL }
  48. #elif defined(mach_amd64)
  49. #define CPPMDADD { "-D__x86_64__", NULL, }
  50. #define DYNLINKER { "-dynamic-linker", "/lib64/ld-linux-x86-64.so.2", NULL }
  51. #ifndef LIBDIR
  52. #define LIBDIR "/usr/lib64/"
  53. #endif
  54. #elif defined(mach_mips)
  55. #define CPPMDADD { "-D__mips__", NULL, }
  56. #define DYNLINKER { "-dynamic-linker", "/lib/ld.so.1", NULL }
  57. #else
  58. #error defines for arch missing
  59. #endif
  60. #ifndef LIBDIR
  61. #define LIBDIR "/usr/lib/"
  62. #endif