1 /* Definitions for SPARC running Linux-based GNU systems with a.out. 2 Copyright (C) 1996, 1997, 1999, 2002 Free Software Foundation, Inc. 3 Contributed by Eddie C. Dost (ecd@skynet.be) 4 5 This file is part of GNU CC. 6 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. 11 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. 16 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. */ 21 22 /* Don't assume anything about the header files. */ 23 #define NO_IMPLICIT_EXTERN_C 24 25 /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is. 26 For now, we play safe. It may change later. */ 27 28 #if 0 29 #undef MULTIBYTE_CHARS 30 #define MULTIBYTE_CHARS 1 31 #endif 32 33 /* We need that too. */ 34 #define HANDLE_SYSV_PRAGMA 1 35 36 #undef MD_EXEC_PREFIX 37 #undef MD_STARTFILE_PREFIX 38 39 /* Output at beginning of assembler file. */ 40 /* The .file command should always begin the output. */ 41 #undef ASM_FILE_START 42 #define ASM_FILE_START(FILE) output_file_directive (FILE, main_input_filename) 43 44 #undef STARTFILE_SPEC 45 #define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}" 46 47 #undef TARGET_VERSION 48 #define TARGET_VERSION fprintf (stderr, " (sparc GNU/Linux with a.out)"); 49 50 #undef SIZE_TYPE 51 #define SIZE_TYPE "unsigned int" 52 53 #undef PTRDIFF_TYPE 54 #define PTRDIFF_TYPE "int" 55 56 #undef WCHAR_TYPE 57 #define WCHAR_TYPE "int" 58 59 #undef WCHAR_TYPE_SIZE 60 #define WCHAR_TYPE_SIZE 32 61 62 #undef CPP_PREDEFINES 63 #define CPP_PREDEFINES "-Dunix -Dsparc -D__gnu_linux__ -Dlinux -Asystem=unix -Asystem=posix" 64 65 #undef CPP_SUBTARGET_SPEC 66 #define CPP_SUBTARGET_SPEC \ 67 "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}" 68 69 /* Don't default to pcc-struct-return, because gcc is the only compiler, 70 and we want to retain compatibility with older gcc versions. */ 71 #undef DEFAULT_PCC_STRUCT_RETURN 72 #define DEFAULT_PCC_STRUCT_RETURN 0 73 74 #undef LIB_SPEC 75 76 #if 1 77 /* We no longer link with libc_p.a or libg.a by default. If you 78 want to profile or debug the GNU/Linux C library, please add 79 -lc_p or -ggdb to LDFLAGS at the link time, respectively. */ 80 #define LIB_SPEC \ 81 "%{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}" 82 #else 83 #define LIB_SPEC \ 84 "%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \ 85 %{!p:%{!pg:%{!g*:-lc} %{g*:-lg -static}}}" 86 #endif 87 88 #undef LINK_SPEC 89 #define LINK_SPEC "-m sparclinux" 90 91 /* The sun bundled assembler doesn't accept -Yd, (and neither does gas). 92 It's safe to pass -s always, even if -g is not used. */ 93 #undef ASM_SPEC 94 #define ASM_SPEC \ 95 "%{V} %{v:%{!V:-V}} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s %{fpic:-K PIC} %{fPIC:-K PIC}" 96 97