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
24 #include "i386/gstabs.h"
27 /* Specify predefined symbols in preprocessor. */
30 #define CPP_PREDEFINES "-Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)"
33 #if TARGET_CPU_DEFAULT == 2
34 #define CPP_SPEC "%{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE}"
36 #define CPP_SPEC "%{m486:-D__i486__} %{posix:-D_POSIX_SOURCE}"
40 #define SIZE_TYPE "unsigned int"
43 #define PTRDIFF_TYPE "int"
46 #define WCHAR_TYPE "long int"
48 #undef WCHAR_TYPE_SIZE
49 #define WCHAR_TYPE_SIZE BITS_PER_WORD
54 /* Linux uses ctype from glibc.a. I am not sure how complete it is.
55 * For now, we play safe. It may change later.
58 #undef MULTIBYTE_CHARS
59 #define MULTIBYTE_CHARS 1
63 #define LIB_SPEC "%{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}"
67 #undef GPLUSPLUS_INCLUDE_DIR
72 * For cross-compile, we just need to search `$(tooldir)/lib'
75 #define STARTFILE_SPEC \
76 "%{pg:gcrt0.o%s -static} %{!pg:%{p:gcrt0.o%s -static} %{!p:crt0.o%s %{g*:-static} %{!static:%{nojump:-nojump}} %{static:-static}}} -L"TOOLDIR"/lib"
79 *The cross-compile uses this.
81 #define GPLUSPLUS_INCLUDE_DIR TOOLDIR"/g++-include"
85 #define STARTFILE_SPEC \
86 "%{pg:gcrt0.o%s -static} %{!pg:%{p:gcrt0.o%s -static} %{!p:crt0.o%s %{g*:-static}%{!static:%{nojump:-nojump}} %{static:-static}}}"
89 *The native Linux system uses this.
91 #define GPLUSPLUS_INCLUDE_DIR "/usr/g++-include"
95 /* There are conflicting reports about whether this system uses
96 a different assembler syntax. wilson@cygnus.com says # is right. */
98 #define COMMENT_BEGIN "#"
101 #define ASM_APP_ON "#APP\n"
104 #define ASM_APP_OFF "#NO_APP\n"
106 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
107 we want to retain compatibility with older gcc versions. */
108 #define DEFAULT_PCC_STRUCT_RETURN 0
110 /* We need that too. */
111 #define HANDLE_SYSV_PRAGMA
115 /* We want to pass -v to linker */
116 #if TARGET_CPU_DEFAULT == 2
117 #define LINK_SPEC "%{v:-dll-verbose} %{!m386:-m486}"
119 #define LINK_SPEC "%{v:-dll-verbose} %{m486:-m486}"