Initial revision
[official-gcc.git] / gcc / config / sparc / linux-aout.h
blobf48d7f3e01786e15774586190946dbe92f87b363
1 /* Definitions for SPARC running Linux with a.out
2 Copyright (C) 1996 Free Software Foundation, Inc.
3 Contributed by Eddie C. Dost (ecd@skynet.be)
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 #include <aoutos.h>
23 #include <sparc/sparc.h>
25 /* Don't assume anything about the header files. */
26 #define NO_IMPLICIT_EXTERN_C
28 #undef HAVE_ATEXIT
29 #define HAVE_ATEXIT
31 /* Linux uses ctype from glibc.a. I am not sure how complete it is.
32 For now, we play safe. It may change later. */
34 #if 0
35 #undef MULTIBYTE_CHARS
36 #define MULTIBYTE_CHARS 1
37 #endif
39 /* There are conflicting reports about whether this system uses
40 a different assembler syntax. wilson@cygnus.com says # is right. */
41 #undef COMMENT_BEGIN
42 #define COMMENT_BEGIN "#"
44 /* We need that too. */
45 #define HANDLE_SYSV_PRAGMA
47 #undef MD_EXEC_PREFIX
48 #undef MD_STARTFILE_PREFIX
50 /* Output at beginning of assembler file. */
51 /* The .file command should always begin the output. */
52 #undef ASM_FILE_START
53 #define ASM_FILE_START(FILE) \
54 do { \
55 output_file_directive (FILE, main_input_filename); \
56 fprintf (FILE, "\t.version\t\"01.01\"\n"); \
57 } while (0)
59 #undef STARTFILE_SPEC
60 #define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}"
62 #undef TARGET_VERSION
63 #define TARGET_VERSION fprintf (stderr, " (sparc Linux/a.out)");
65 #undef SIZE_TYPE
66 #define SIZE_TYPE "unsigned int"
68 #undef PTRDIFF_TYPE
69 #define PTRDIFF_TYPE "int"
71 #undef WCHAR_TYPE
72 #define WCHAR_TYPE "long int"
74 #undef WCHAR_TYPE_SIZE
75 #define WCHAR_TYPE_SIZE BITS_PER_WORD
77 #undef CPP_PREDEFINES
78 #define CPP_PREDEFINES "-Dunix -Dsparc -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(sparc) -Amachine(sparc)"
80 #undef CPP_SPEC
81 #define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{msparclite:-D__sparclite__} %{mv8:-D__sparc_v8__} %{msupersparc:-D__supersparc__ -D__sparc_v8__} %{posix:-D_POSIX_SOURCE}"
83 /* Don't default to pcc-struct-return, because gcc is the only compiler,
84 and we want to retain compatibility with older gcc versions. */
85 #define DEFAULT_PCC_STRUCT_RETURN 0
87 #undef LIB_SPEC
89 #if 1
90 /* We no longer link with libc_p.a or libg.a by default. If you
91 * want to profile or debug the Linux C library, please add
92 * -lc_p or -ggdb to LDFLAGS at the link time, respectively.
94 #define LIB_SPEC \
95 "%{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}"
96 #else
97 #define LIB_SPEC \
98 "%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
99 %{!p:%{!pg:%{!g*:-lc} %{g*:-lg -static}}}"
100 #endif
102 #undef LINK_SPEC
103 #define LINK_SPEC "-m sparclinux"
105 /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
106 It's safe to pass -s always, even if -g is not used. */
107 #undef ASM_SPEC
108 #define ASM_SPEC \
109 "%{V} %{v:%{!V:-V}} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s %{fpic:-K PIC} %{fPIC:-K PIC}"
111 #if 0
112 /* Define for support of TFmode long double and REAL_ARITHMETIC.
113 Sparc ABI says that long double is 4 words. Linux does not support
114 long double yet. */
115 #define LONG_DOUBLE_TYPE_SIZE 128
116 #endif