home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gcc-2.4.5 / config / i386 / linux.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-05  |  2.7 KB  |  119 lines

  1. /* Definitions for Intel 386 running Linux
  2.  * Copyright (C) 1992 Free Software Foundation, Inc.
  3.  *
  4.  * Written by H.J. Lu (hlu@eecs.wsu.edu)
  5.  *
  6.  * Linux is a POSIX.1 compatible UNIX clone for i386, which uses GNU
  7.  * stuffs as the native stuffs.
  8.  */
  9.  
  10. #if 0    /* The FSF has fixed the known bugs. But ....... */
  11.  
  12. /* Linux has a hacked gas 1.38.1, which can handle repz, repnz
  13.  * and fildll.
  14.  */
  15.  
  16. #define GOOD_GAS
  17.  
  18. #endif
  19.  
  20. /* This is tested by i386/gas.h.  */
  21. #define YES_UNDERSCORES
  22.  
  23. #include "i386/gstabs.h"
  24.  
  25. /* Specify predefined symbols in preprocessor.  */
  26.  
  27. #undef CPP_PREDEFINES
  28. #define CPP_PREDEFINES "-Dunix -Di386 -Dlinux"
  29.  
  30. #undef CPP_SPEC
  31. #if TARGET_CPU_DEFAULT == 2
  32. #define CPP_SPEC "%{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE}"
  33. #else
  34. #define CPP_SPEC "%{m486:-D__i486__} %{posix:-D_POSIX_SOURCE}"
  35. #endif
  36.  
  37. #undef SIZE_TYPE
  38. #define SIZE_TYPE "unsigned int"
  39.  
  40. #undef PTRDIFF_TYPE
  41. #define PTRDIFF_TYPE "int"
  42.  
  43. #undef WCHAR_TYPE
  44. #define WCHAR_TYPE "long int"
  45.  
  46. #undef WCHAR_TYPE_SIZE
  47. #define WCHAR_TYPE_SIZE BITS_PER_WORD
  48.  
  49. #undef HAVE_ATEXIT
  50. #define HAVE_ATEXIT
  51.  
  52. /* Linux uses ctype from glibc.a. I am not sure how complete it is.
  53.  * For now, we play safe. It may change later.
  54.  */
  55. #if 0
  56. #undef MULTIBYTE_CHARS
  57. #define MULTIBYTE_CHARS    1
  58. #endif
  59.  
  60. #undef LIB_SPEC
  61. #define LIB_SPEC "%{g*:-lg} %{!g*:%{!p:%{!pg:-lc}}%{p:-lgmon -lc_p}%{pg:-lgmon -lc_p}}"
  62.  
  63.  
  64. #undef STARTFILE_SPEC
  65. #undef GPLUSPLUS_INCLUDE_DIR
  66.  
  67. #ifdef CROSS_COMPILE
  68.  
  69. /*
  70.  * For cross-compile, we just need to search `$(tooldir)/lib'
  71.  */
  72.  
  73. #define STARTFILE_SPEC  \
  74.   "%{g*:crt0.o%s -static} %{!g*:%{pg:gcrt0.o%s -static} %{!pg:%{p:gcrt0.o%s -static} %{!p:crt0.o%s %{!static:%{nojump:-nojump}} %{static:-static}}}}"
  75.  
  76. /*
  77.  *The cross-compile uses this.
  78.  */
  79. #define GPLUSPLUS_INCLUDE_DIR TOOLDIR"/g++-include"
  80.  
  81. #else
  82.  
  83. #define STARTFILE_SPEC  \
  84.   "%{g*:crt0.o%s -static} %{!g*:%{pg:gcrt0.o%s -static} %{!pg:%{p:gcrt0.o%s -static} %{!p:crt0.o%s %{!static:%{nojump:-nojump}} %{static:-static}}}}"
  85.  
  86. /*
  87.  *The native Linux system uses this.
  88.  */
  89. #define GPLUSPLUS_INCLUDE_DIR "/usr/g++-include"
  90.  
  91. #endif
  92.  
  93. /* There are conflicting reports about whether this system uses
  94.    a different assembler syntax.  wilson@cygnus.com says # is right.  */
  95. #undef COMMENT_BEGIN
  96. #define COMMENT_BEGIN "#"
  97.  
  98. #undef ASM_APP_ON
  99. #define ASM_APP_ON "#APP\n"
  100.  
  101. #undef ASM_APP_OFF
  102. #define ASM_APP_OFF "#NO_APP\n"
  103.  
  104. /* Don't default to pcc-struct-return, because gcc is the only compiler, and
  105.    we want to retain compatibility with older gcc versions.  */
  106. #define DEFAULT_PCC_STRUCT_RETURN 0
  107.  
  108. /* We need that too. */
  109. #define HANDLE_SYSV_PRAGMA
  110.  
  111. #undef LINK_SPEC
  112.  
  113. /* We want to pass -v to linker */
  114. #if TARGET_CPU_DEFAULT == 2
  115. #define LINK_SPEC    "%{v:-dll-verbose} %{!m386:-m486}"
  116. #else
  117. #define LINK_SPEC    "%{v:-dll-verbose} %{m486:-m486}"
  118. #endif
  119.