linux.h revision 146895
1/* Definitions of target machine for GNU compiler, 2 for PowerPC machines running Linux. 3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4 Free Software Foundation, Inc. 5 Contributed by Michael Meissner (meissner@cygnus.com). 6 7 This file is part of GCC. 8 9 GCC is free software; you can redistribute it and/or modify it 10 under the terms of the GNU General Public License as published 11 by the Free Software Foundation; either version 2, or (at your 12 option) any later version. 13 14 GCC is distributed in the hope that it will be useful, but WITHOUT 15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 17 License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with GCC; see the file COPYING. If not, write to the 21 Free Software Foundation, 59 Temple Place - Suite 330, Boston, 22 MA 02111-1307, USA. */ 23 24#undef MD_EXEC_PREFIX 25#undef MD_STARTFILE_PREFIX 26 27/* Linux doesn't support saving and restoring 64-bit regs in a 32-bit 28 process. */ 29#define OS_MISSING_POWERPC64 1 30 31/* glibc has float and long double forms of math functions. */ 32#undef TARGET_C99_FUNCTIONS 33#define TARGET_C99_FUNCTIONS 1 34 35#undef TARGET_OS_CPP_BUILTINS 36#define TARGET_OS_CPP_BUILTINS() \ 37 do \ 38 { \ 39 builtin_define_std ("PPC"); \ 40 builtin_define_std ("powerpc"); \ 41 builtin_assert ("cpu=powerpc"); \ 42 builtin_assert ("machine=powerpc"); \ 43 TARGET_OS_SYSV_CPP_BUILTINS (); \ 44 } \ 45 while (0) 46 47#undef CPP_OS_DEFAULT_SPEC 48#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" 49 50/* The GNU C++ standard library currently requires _GNU_SOURCE being 51 defined on glibc-based systems. This temporary hack accomplishes this, 52 it should go away as soon as libstdc++-v3 has a real fix. */ 53#undef CPLUSPLUS_CPP_SPEC 54#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" 55 56#undef LINK_SHLIB_SPEC 57#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" 58 59#undef LIB_DEFAULT_SPEC 60#define LIB_DEFAULT_SPEC "%(lib_linux)" 61 62#undef STARTFILE_DEFAULT_SPEC 63#define STARTFILE_DEFAULT_SPEC "%(startfile_linux)" 64 65#undef ENDFILE_DEFAULT_SPEC 66#define ENDFILE_DEFAULT_SPEC "%(endfile_linux)" 67 68#undef LINK_START_DEFAULT_SPEC 69#define LINK_START_DEFAULT_SPEC "%(link_start_linux)" 70 71#undef LINK_OS_DEFAULT_SPEC 72#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" 73 74#define LINK_GCC_C_SEQUENCE_SPEC \ 75 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" 76 77#undef TARGET_VERSION 78#define TARGET_VERSION fprintf (stderr, " (PowerPC GNU/Linux)"); 79 80/* Override rs6000.h definition. */ 81#undef ASM_APP_ON 82#define ASM_APP_ON "#APP\n" 83 84/* Override rs6000.h definition. */ 85#undef ASM_APP_OFF 86#define ASM_APP_OFF "#NO_APP\n" 87 88/* For backward compatibility, we must continue to use the AIX 89 structure return convention. */ 90#undef DRAFT_V4_STRUCT_RET 91#define DRAFT_V4_STRUCT_RET 1 92 93/* We are 32-bit all the time, so optimize a little. */ 94#undef TARGET_64BIT 95#define TARGET_64BIT 0 96 97/* We don't need to generate entries in .fixup, except when 98 -mrelocatable or -mrelocatable-lib is given. */ 99#undef RELOCATABLE_NEEDS_FIXUP 100#define RELOCATABLE_NEEDS_FIXUP \ 101 (target_flags & target_flags_explicit & MASK_RELOCATABLE) 102 103#define TARGET_ASM_FILE_END file_end_indicate_exec_stack 104 105#define TARGET_HAS_F_SETLKW 106 107#ifdef IN_LIBGCC2 108#include "config/rs6000/linux-unwind.h" 109#endif 110