freebsd.h revision 169706
190075Sobrien/* Definitions for PowerPC running FreeBSD using the ELF format 2132718Skan Copyright (C) 2001, 2003 Free Software Foundation, Inc. 390075Sobrien Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi. 490075Sobrien 5132718Skan This file is part of GCC. 690075Sobrien 7132718Skan GCC is free software; you can redistribute it and/or modify it 8132718Skan under the terms of the GNU General Public License as published 9132718Skan by the Free Software Foundation; either version 2, or (at your 10132718Skan option) any later version. 1190075Sobrien 12132718Skan GCC is distributed in the hope that it will be useful, but WITHOUT 13132718Skan ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14132718Skan or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 15132718Skan License for more details. 1690075Sobrien 17132718Skan You should have received a copy of the GNU General Public License 18132718Skan along with GCC; see the file COPYING. If not, write to the 19169706Skan Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 20169706Skan MA 02110-1301, USA. */ 2190075Sobrien 2290075Sobrien/* Override the defaults, which exist to force the proper definition. */ 2390075Sobrien 2490075Sobrien#undef CPP_OS_DEFAULT_SPEC 2590075Sobrien#define CPP_OS_DEFAULT_SPEC "%(cpp_os_freebsd)" 2690075Sobrien 27147823Sscottl#undef CPP_OS_FREEBSD_SPEC 28147823Sscottl#define CPP_OS_FREEBSD_SPEC "\ 29147823Sscottl -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ \ 30169706Skan -Acpu=powerpc -Amachine=powerpc " 31147823Sscottl 3290075Sobrien#undef STARTFILE_DEFAULT_SPEC 3390075Sobrien#define STARTFILE_DEFAULT_SPEC "%(startfile_freebsd)" 3490075Sobrien 3590075Sobrien#undef ENDFILE_DEFAULT_SPEC 3690075Sobrien#define ENDFILE_DEFAULT_SPEC "%(endfile_freebsd)" 3790075Sobrien 3890075Sobrien#undef LIB_DEFAULT_SPEC 3990075Sobrien#define LIB_DEFAULT_SPEC "%(lib_freebsd)" 4090075Sobrien 4190075Sobrien#undef LINK_START_DEFAULT_SPEC 4290075Sobrien#define LINK_START_DEFAULT_SPEC "%(link_start_freebsd)" 4390075Sobrien 4490075Sobrien#undef LINK_OS_DEFAULT_SPEC 4590075Sobrien#define LINK_OS_DEFAULT_SPEC "%(link_os_freebsd)" 4690075Sobrien 47117395Skan/* XXX: This is wrong for many platforms in sysv4.h. 48132718Skan We should work on getting that definition fixed. */ 49117395Skan#undef LINK_SHLIB_SPEC 50117395Skan#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" 5190075Sobrien 52117395Skan 5390075Sobrien/************************[ Target stuff ]***********************************/ 5490075Sobrien 5590075Sobrien/* Define the actual types of some ANSI-mandated types. 5690075Sobrien Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.c, 5790075Sobrien c-common.c, and config/<arch>/<arch>.h. */ 5890075Sobrien 59117395Skan#undef SIZE_TYPE 60117395Skan#define SIZE_TYPE "unsigned int" 61117395Skan 6290075Sobrien/* rs6000.h gets this wrong for FreeBSD. We use the GCC defaults instead. */ 6390075Sobrien#undef WCHAR_TYPE 6490075Sobrien 6590075Sobrien#undef WCHAR_TYPE_SIZE 6690075Sobrien#define WCHAR_TYPE_SIZE 32 6790075Sobrien 6890075Sobrien#undef TARGET_VERSION 6990075Sobrien#define TARGET_VERSION fprintf (stderr, " (FreeBSD/PowerPC ELF)"); 7090075Sobrien 7190075Sobrien/* Override rs6000.h definition. */ 7290075Sobrien#undef ASM_APP_ON 7390075Sobrien#define ASM_APP_ON "#APP\n" 7490075Sobrien 7590075Sobrien/* Override rs6000.h definition. */ 7690075Sobrien#undef ASM_APP_OFF 7790075Sobrien#define ASM_APP_OFF "#NO_APP\n" 78