1/* Configuration for an OpenBSD i386 target. 2 Copyright (C) 1999-2015 Free Software Foundation, Inc. 3 4This file is part of GCC. 5 6GCC is free software; you can redistribute it and/or modify 7it under the terms of the GNU General Public License as published by 8the Free Software Foundation; either version 3, or (at your option) 9any later version. 10 11GCC is distributed in the hope that it will be useful, 12but WITHOUT ANY WARRANTY; without even the implied warranty of 13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14GNU General Public License for more details. 15 16You should have received a copy of the GNU General Public License 17along with GCC; see the file COPYING3. If not see 18<http://www.gnu.org/licenses/>. */ 19 20 21/* This goes away when the math-emulator is fixed */ 22#undef TARGET_SUBTARGET_DEFAULT 23#define TARGET_SUBTARGET_DEFAULT \ 24 (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) 25 26#define TARGET_OS_CPP_BUILTINS() \ 27 do \ 28 { \ 29 builtin_define ("__unix__"); \ 30 builtin_define ("__OpenBSD__"); \ 31 builtin_assert ("system=unix"); \ 32 builtin_assert ("system=bsd"); \ 33 builtin_assert ("system=OpenBSD"); \ 34 } \ 35 while (0) 36 37/* Layout of source language data types. */ 38 39/* This must agree with <machine/ansi.h> */ 40#undef SIZE_TYPE 41#define SIZE_TYPE "unsigned int" 42 43#undef PTRDIFF_TYPE 44#define PTRDIFF_TYPE "int" 45 46#undef WCHAR_TYPE 47#define WCHAR_TYPE "int" 48 49#undef WCHAR_TYPE_SIZE 50#define WCHAR_TYPE_SIZE 32 51 52/* Assembler format: overall framework. */ 53 54#undef ASM_APP_ON 55#define ASM_APP_ON "#APP\n" 56 57#undef ASM_APP_OFF 58#define ASM_APP_OFF "#NO_APP\n" 59 60/* Stack & calling: aggregate returns. */ 61 62/* Don't default to pcc-struct-return, because gcc is the only compiler, and 63 we want to retain compatibility with older gcc versions. */ 64#define DEFAULT_PCC_STRUCT_RETURN 0 65 66/* Assembler format: alignment output. */ 67 68/* Kludgy test: when gas is upgraded, it will have p2align, and no problems 69 with nops. */ 70#ifndef HAVE_GAS_MAX_SKIP_P2ALIGN 71/* i386 OpenBSD still uses an older gas that doesn't insert nops by default 72 when the .align directive demands to insert extra space in the text 73 segment. */ 74#undef ASM_OUTPUT_ALIGN 75#define ASM_OUTPUT_ALIGN(FILE,LOG) \ 76 if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG)) 77#endif 78 79/* Stack & calling: profiling. */ 80 81/* OpenBSD's profiler recovers all information from the stack pointer. 82 The icky part is not here, but in machine/profile.h. */ 83#undef FUNCTION_PROFILER 84#define FUNCTION_PROFILER(FILE, LABELNO) \ 85 fputs (flag_pic ? "\tcall mcount@PLT\n": "\tcall mcount\n", FILE); 86 87/* Assembler format: exception region output. */ 88 89/* All configurations that don't use elf must be explicit about not using 90 dwarf unwind information. */ 91#define DWARF2_UNWIND_INFO 0 92 93#undef ASM_PREFERRED_EH_DATA_FORMAT 94 95#undef ASM_COMMENT_START 96#define ASM_COMMENT_START ";#" 97 98/* OpenBSD gas currently does not support quad, so do not use it. */ 99#undef ASM_QUAD 100 101#define TARGET_HAVE_NAMED_SECTIONS false 102 103#define IX86_MAYBE_NO_LIBGCC_TFMODE 104