1 /* Definitions for Intel 386 running Linux
2 * Copyright (C) 1992 Free Software Foundation, Inc.
4 * Written by H.J. Lu (hlu@eecs.wsu.edu)
6 * Linux is a POSIX.1 compatible UNIX clone for i386, which uses GNU
7 * stuffs as the native stuffs.
10 #if 0 /* The FSF has fixed the known bugs. But ....... */
12 /* Linux has a hacked gas 1.38.1, which can handle repz, repnz
20 /* This is tested by i386/gas.h. */
21 #define YES_UNDERSCORES
23 #include "i386/gstabs.h"
25 /* Specify predefined symbols in preprocessor. */
28 #define CPP_PREDEFINES "-Dunix -Di386 -Dlinux"
31 #if TARGET_CPU_DEFAULT == 2
32 #define CPP_SPEC "%{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE}"
34 #define CPP_SPEC "%{m486:-D__i486__} %{posix:-D_POSIX_SOURCE}"
38 #define SIZE_TYPE "unsigned int"
41 #define PTRDIFF_TYPE "int"
44 #define WCHAR_TYPE "long int"
46 #undef WCHAR_TYPE_SIZE
47 #define WCHAR_TYPE_SIZE BITS_PER_WORD
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.
56 #undef MULTIBYTE_CHARS
57 #define MULTIBYTE_CHARS 1
61 #define LIB_SPEC "%{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}"
65 #undef GPLUSPLUS_INCLUDE_DIR
70 * For cross-compile, we just need to search `$(tooldir)/lib'
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}}}}"
77 *The cross-compile uses this.
79 #define GPLUSPLUS_INCLUDE_DIR TOOLDIR"/g++-include"
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}}}}"
87 *The native Linux system uses this.
89 #define GPLUSPLUS_INCLUDE_DIR "/usr/g++-include"
93 /* There are conflicting reports about whether this system uses
94 a different assembler syntax. wilson@cygnus.com says # is right. */
96 #define COMMENT_BEGIN "#"
99 #define ASM_APP_ON "#APP\n"
102 #define ASM_APP_OFF "#NO_APP\n"
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
108 /* We need that too. */
109 #define HANDLE_SYSV_PRAGMA
113 /* We want to pass -v to linker */
114 #if TARGET_CPU_DEFAULT == 2
115 #define LINK_SPEC "%{v:-dll-verbose} %{!m386:-m486}"
117 #define LINK_SPEC "%{v:-dll-verbose} %{m486:-m486}"