1 /* Definitions for IBM PS2 running AIX/386.
2 Copyright (C) 1988, 1996, 1998 Free Software Foundation, Inc.
3 Contributed by Minh Tran-Le <TRANLE@intellicorp.com>.
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)
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. */
23 #include "i386/i386.h"
25 /* Get the generic definitions for system V.3. */
29 /* Use the ATT assembler syntax.
30 This overrides at least one macro (USER_LABEL_PREFIX) from svr3.h. */
34 /* Use crt1.o as a startup file and crtn.o as a closing file. */
36 #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
37 #define ENDFILE_SPEC "crtn.o%s"
39 #define LIB_SPEC "%{shlib:-lc_s} -lc"
41 /* Special flags for the linker. I don't know what they do. */
43 #define LINK_SPEC "%{K} %{!K:-K} %{T*} %{z:-lm}"
45 /* Specify predefined symbols in preprocessor. */
47 #define CPP_PREDEFINES "-Dps2 -Dunix -Asystem=aix"
49 #define CPP_SPEC "%(cpp_cpu) \
50 %{posix:-D_POSIX_SOURCE}%{!posix:-DAIX} -D_I386 -D_AIX -D_MBCS"
52 /* special flags for the aix assembler to generate the short form for all
53 qualifying forward reference */
54 /* The buggy /bin/as of aix ps/2 1.2.x cannot always handle it. */
56 #define ASM_SPEC "-s2"
60 #define ASM_FILE_START(FILE) \
61 do { output_file_directive (FILE, main_input_filename); \
63 ASM_FILE_START_1 (FILE); \
65 fprintf (FILE, "\t.noopt\n"); \
68 /* This was suggested, but it shouldn't be right for DBX output. -- RMS
69 #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */
71 /* Writing `int' for a bitfield forces int alignment for the structure. */
73 #define PCC_BITFIELD_TYPE_MATTERS 1
76 /* Don't write a `.optim' pseudo; this assembler
77 is said to have a bug when .optim is used. */
79 #undef ASM_FILE_START_1
80 #define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.noopt\n")
83 /* Output assembler code to FILE to increment profiler label # LABELNO
84 for profiling a function entry. */
86 #undef FUNCTION_PROFILER
87 #define FUNCTION_PROFILER(FILE, LABELNO) \
88 fprintf (FILE, "\tleal %sP%d,%%eax\n\tcall mcount\n", LPREFIX, (LABELNO));
90 /* Note that using bss_section here caused errors
91 in building shared libraries on system V.3.
92 but AIX 1.2 does not have yet shareable libraries on PS2 */
93 #undef ASM_OUTPUT_LOCAL
94 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
96 ASM_OUTPUT_LABEL ((FILE), (NAME)), \
97 fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED)))
100 /* Undef all the .init and .fini section stuff if we are not using gas and
101 * gnu ld so that we can use collect because the standard /bin/as and /bin/ld
102 * cannot handle those.
105 # undef INIT_SECTION_ASM_OP
106 # undef FINI_SECTION_ASM_OP
107 # undef CTORS_SECTION_ASM_OP
108 # undef DTORS_SECTION_ASM_OP
109 # undef TARGET_ASM_CONSTRUCTOR
110 # undef TARGET_ASM_DESTRUCTOR
111 # undef DO_GLOBAL_CTORS_BODY
113 # undef CTOR_LIST_BEGIN
114 # define CTOR_LIST_BEGIN
115 # undef CTOR_LIST_END
116 # define CTOR_LIST_END
117 # undef DTOR_LIST_BEGIN
118 # define DTOR_LIST_BEGIN
119 # undef DTOR_LIST_END
120 # define DTOR_LIST_END
122 # undef CONST_SECTION_FUNCTION
123 # define CONST_SECTION_FUNCTION \
130 # undef EXTRA_SECTION_FUNCTIONS
131 # define EXTRA_SECTION_FUNCTIONS \
132 CONST_SECTION_FUNCTION
135 # define OBJECT_FORMAT_COFF
136 # define MY_ISCOFF(magic) \
137 ((magic) == I386MAGIC || (magic) == I386SVMAGIC)
139 #endif /* !USE_GAS */