Patches from David Mosberger, and a patch to make bootstrap work.
[official-gcc.git] / gcc / config / ia64 / linux.h
blob5108cfa8211c27d1d4ac4a0c42a77a13e0032918
1 /* Definitions for ia64-linux target. */
2 #include "ia64/ia64.h"
3 #include <linux.h>
4 #include "sysv4.h"
6 /* ??? Maybe this should be in sysv4.h? */
7 #define CPP_PREDEFINES "\
8 -D__ia64 -D__ia64__ -D__linux -D__linux__ -D_LONGLONG -Dlinux -Dunix \
9 -D__LP64__ -D__ELF__ -Asystem(linux) -Acpu(ia64) -Amachine(ia64)"
11 /* ??? ia64 gas doesn't accept standard svr4 assembler options? */
12 #undef ASM_SPEC
14 /* Define this for shared library support because it isn't in the main
15 linux.h file. */
17 #undef LINK_SPEC
18 #define LINK_SPEC "\
19 %{shared:-shared} \
20 %{!shared: \
21 %{!static: \
22 %{rdynamic:-export-dynamic} \
23 %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.1}} \
24 %{static:-static}}"
27 #define DONT_USE_BUILTIN_SETJMP
28 #define JMP_BUF_SIZE (8 * 76)
30 /* Output any profiling code before the prologue. */
32 #undef PROFILE_BEFORE_PROLOGUE
33 #define PROFILE_BEFORE_PROLOGUE 1
35 /* A C statement or compound statement to output to FILE some assembler code to
36 call the profiling subroutine `mcount'. */
38 #undef FUNCTION_PROFILER
39 #define FUNCTION_PROFILER(FILE, LABELNO) \
40 do { \
41 char buf[20]; \
42 ASM_GENERATE_INTERNAL_LABEL (buf, "LP", LABELNO); \
43 fputs ("\talloc out0 = ar.pfs, 8, 0, 4, 0\n", FILE); \
44 if (TARGET_AUTO_PIC) \
45 fputs ("\tmovl out3 = @gprel(", FILE); \
46 else \
47 fputs ("\taddl out3 = @ltoff(", FILE); \
48 assemble_name (FILE, buf); \
49 if (TARGET_AUTO_PIC) \
50 fputs (");;\n", FILE); \
51 else \
52 fputs ("), r1;;\n", FILE); \
53 fputs ("\tmov out1 = r1\n", FILE); \
54 fputs ("\tmov out2 = b0\n", FILE); \
55 fputs ("\tbr.call.sptk.many b0 = _mcount;;\n", FILE); \
56 } while (0)
58 /* End of linux.h */