aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog26
-rw-r--r--gcc/config.gcc9
-rw-r--r--gcc/config/freebsd.h134
-rw-r--r--gcc/config/ia64/aix.h5
-rw-r--r--gcc/config/ia64/elf.h43
-rw-r--r--gcc/config/ia64/freebsd.h66
-rw-r--r--gcc/config/ia64/hpux.h5
-rw-r--r--gcc/config/ia64/ia64.h70
-rw-r--r--gcc/config/ia64/linux.h28
9 files changed, 272 insertions, 114 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 783c2de..4d6ecea 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,29 @@
+2001-11-07 David O'Brien <obrien@FreeBSD.org>
+
+ * config.gcc: Add FreeBSD/IA-64 target. Expand config/i64/elf.h headers.
+ * config/i64/ia64.h (TARGET_VERSION,ASM_SPEC,LINK_SPEC): Remove,
+ they are OS specific. Use CPP_CPU_SPEC rather than CPP_PREDEFINES,
+ so OS specific files and use CPP_PREDEFINES for their needs.
+ * config/i64/elf.h (TARGET_VERSION): Add. Also, move inclusion of
+ target headers to tm_file.
+ * config/ia64/aix.h (TARGET_VERSION): Likewise.
+ * config/ia64/hpux.h (TARGET_VERSION): Likewise.
+ * config/ia64/linux.h (TARGET_VERSION): Likewise.
+ (FUNCTION_PROFILER): Remove.
+ * config/ia64/ia64.h (FUNCTION_PROFILER): Update defintion using the
+ version in config/ia64/linux.h.
+ * config/ia64/freebsd.h: New file.
+ * config/freebsd.h: Tidy up.
+ (_USING_CONFIG_FREEBSD): Define.
+ (FBSD_CPP_PREDEFINES): Add __KPRINTF_ATTRIBUTE__.
+ (FBSD_CPP_SPEC): Define generic FreeBSD spec.
+ (FBSD_STARTFILE_SPEC): Likewise.
+ (FBSD_ENDFILE_SPEC): Likewise.
+ (FBSD_LIB_SPEC): Likewise.
+ (WCHAR_UNSIGNED): Undefine, FreeBSD's wchars are signed.
+ (USER_LABEL_PREFIX): Define to ELF compatible value as some CPU headers
+ set an ELF-improper one.
+
2001-11-09 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.c (emit_move_sequence): Use cint_ok_for_move to check whether a
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 2d9f0f2..97304e2 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -337,6 +337,7 @@ case $machine in
*) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;;
esac
tmake_file=t-freebsd
+ xmake_file=none
xm_defines=POSIX
case x${enable_threads} in
xno) fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h";;
@@ -1531,7 +1532,7 @@ ia64*-*-aix*)
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
;;
ia64*-*-elf*)
- tm_file=ia64/elf.h
+ tm_file="${tm_file} elfos.h ia64/sysv4.h ia64/elf.h"
tmake_file="ia64/t-ia64"
target_cpu_default="0"
if test x$gas = xyes
@@ -1544,6 +1545,12 @@ ia64*-*-elf*)
fi
float_format=i386
;;
+ia64*-*-freebsd*)
+ tm_file="${tm_file} ${fbsd_tm_file} elfos.h ia64/sysv4.h ia64/freebsd.h"
+ target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
+ tmake_file="${tmake_file} ia64/t-ia64"
+ float_format=i386
+ ;;
ia64*-*-linux*)
tm_file="${tm_file} elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc"
diff --git a/gcc/config/freebsd.h b/gcc/config/freebsd.h
index 56d16c3..949be89 100644
--- a/gcc/config/freebsd.h
+++ b/gcc/config/freebsd.h
@@ -27,6 +27,9 @@ Boston, MA 02111-1307, USA. */
Loren J. Rittle <ljrittle@acm.org>. */
+/* To help with rs6000/sysv4.h carnal knowledge problem. */
+#define _USING_CONFIG_FREEBSD 1
+
/* This defines which switch letters take arguments. On FreeBSD, most of
the normal cases (defined in gcc.c) apply, and we also have -h* and
-z* options (for the linker) (coming from SVR4).
@@ -38,41 +41,43 @@ Boston, MA 02111-1307, USA. */
|| (CHAR) == 'z' /* ignored by ld */ \
|| (CHAR) == 'R')
-#undef SWITCH_TAKES_ARG
+#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) (FBSD_SWITCH_TAKES_ARG(CHAR))
+/* This defines which multi-letter switches take arguments. */
+
#define FBSD_WORD_SWITCH_TAKES_ARG(STR) \
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
|| !strcmp ((STR), "rpath") || !strcmp ((STR), "rpath-link") \
|| !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \
|| !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker"))
-#undef WORD_SWITCH_TAKES_ARG
+#undef WORD_SWITCH_TAKES_ARG
#define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR))
#if FBSD_MAJOR == 6
#define FBSD_CPP_PREDEFINES \
- "-D__FreeBSD__=6 -Dunix -D__ELF__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
+ "-D__FreeBSD__=6 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#endif
#if FBSD_MAJOR == 5
#define FBSD_CPP_PREDEFINES \
- "-D__FreeBSD__=5 -Dunix -D__ELF__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
+ "-D__FreeBSD__=5 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#endif
#if FBSD_MAJOR == 4
#define FBSD_CPP_PREDEFINES \
- "-D__FreeBSD__=4 -Dunix -D__ELF__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
+ "-D__FreeBSD__=4 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#endif
#if FBSD_MAJOR == 3
#define FBSD_CPP_PREDEFINES \
- "-D__FreeBSD__=3 -Dunix -D__ELF__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
+ "-D__FreeBSD__=3 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#endif
#ifndef FBSD_CPP_PREDEFINES
#define FBSD_CPP_PREDEFINES \
- "-D__FreeBSD__ -Dunix -D__ELF__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
+ "-D__FreeBSD__ -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD"
#endif
#undef CPP_PREDEFINES
@@ -81,11 +86,35 @@ Boston, MA 02111-1307, USA. */
/* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC
option `-posix', and PIC issues. */
-#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) \
+#define FBSD_CPP_SPEC " \
+ %(cpp_cpu) \
%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \
%{posix:-D_POSIX_SOURCE}"
+#undef CPP_SPEC
+#define CPP_SPEC FBSD_CPP_SPEC
+
+/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add
+ the magical crtbegin.o file (see crtstuff.c) which provides part
+ of the support for getting C++ file-scope static object constructed
+ before entering `main'. */
+
+#define FBSD_STARTFILE_SPEC \
+ "%{!shared: \
+ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
+ %{!p:%{profile:gcrt1.o%s} \
+ %{!profile:crt1.o%s}}}} \
+ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+
+/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
+ the magical crtend.o file (see crtstuff.c) which provides part of
+ the support for getting C++ file-scope static object constructed
+ before entering `main', followed by a normal "finalizer" file,
+ `crtn.o'. */
+
+#define FBSD_ENDFILE_SPEC \
+ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+
/* Provide a LIB_SPEC appropriate for FreeBSD as configured and as
required by the user-land thread model. Before __FreeBSD_version
500016, select the appropriate libc, depending on whether we're
@@ -100,9 +129,12 @@ Boston, MA 02111-1307, USA. */
misconfigured the gcc bootstrap but are later consulting FreeBSD
manual pages that refer to the mythical -pthread option). */
-#undef LIB_SPEC
+/* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate
+ libc, depending on whether we're doing profiling or need threads support.
+ (simular to the default, except no -lg, and no -p). */
+
#ifdef FBSD_NO_THREADS
-#define LIB_SPEC " \
+#define FBSD_LIB_SPEC " \
%{pthread: %eThe -pthread option is only supported on FreeBSD when gcc \
is built with the --enable-threads configure-time option.} \
%{!shared: \
@@ -111,13 +143,13 @@ is built with the --enable-threads configure-time option.} \
}"
#else
#if FBSD_MAJOR >= 5
-#define LIB_SPEC " \
+#define FBSD_LIB_SPEC " \
%{!shared: \
%{!pg: %{pthread:-lc_r} -lc} \
%{pg: %{pthread:-lc_r_p} -lc_p} \
}"
#else
-#define LIB_SPEC " \
+#define FBSD_LIB_SPEC " \
%{!shared: \
%{!pg: \
%{!pthread:-lc} \
@@ -129,49 +161,81 @@ is built with the --enable-threads configure-time option.} \
#endif
#endif
-/* Code generation parameters. */
+#undef LIB_SPEC
+#define LIB_SPEC FBSD_LIB_SPEC
+
-/* Make gcc agree with <machine/ansi.h>. */
+/************************[ Target stuff ]***********************************/
-#undef WCHAR_TYPE
+/* Don't assume anything about the header files. */
+#undef NO_IMPLICIT_EXTERN_C
+#define NO_IMPLICIT_EXTERN_C
+
+/* Allow #sccs in preprocessor. */
+#undef SCCS_DIRECTIVE
+#define SCCS_DIRECTIVE
+
+/* Make gcc agree with FreeBSD's standard headers (<machine/ansi.h>, etc...) */
+
+#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
-#undef WCHAR_UNSIGNED
+#undef WCHAR_UNSIGNED
#define WCHAR_UNSIGNED 0
+/* Code generation parameters. */
+
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
we want to retain compatibility with older gcc versions
(even though the SVR4 ABI for the i386 says that records and unions are
returned in memory). */
-#undef DEFAULT_PCC_STRUCT_RETURN
+#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0
-/* Ensure we the configuration knows our system correctly so we can link with
- libraries compiled with the native cc. */
+/* Use periods rather than dollar signs in special g++ assembler names.
+ This ensures the configuration knows our system correctly so we can link
+ with libraries compiled with the native cc. */
#undef NO_DOLLAR_IN_LABEL
-/* The GNU tools operate better with dwarf2 than stabs. Since we
- don't have any native tools to be compatible with, default to
- dwarf2. */
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+/* The prefix to add to user-visible assembler symbols.
+ For System V Release 4 & ELF the convention is *not* to prepend a leading
+ underscore onto user-level symbol names. Some CPU files such as
+ config/sparc/sparc.h set this wrong for ELF. */
+
+#undef USER_LABEL_PREFIX
+#define USER_LABEL_PREFIX ""
+
+/* Handle #pragma weak and #pragma pack. */
+#undef HANDLE_SYSV_PRAGMA
+#define HANDLE_SYSV_PRAGMA
+
+/* Use more efficient ``thunks'' to implement C++ vtables. */
+#undef DEFAULT_VTABLE_THUNKS
+#define DEFAULT_VTABLE_THUNKS 1
+
+/************************[ Assembler stuff ]********************************/
-#undef IDENT_ASM_OP
+#undef IDENT_ASM_OP
#define IDENT_ASM_OP "\t.ident\t"
/* Output #ident as a .ident. */
-#undef ASM_OUTPUT_IDENT
+
+#undef ASM_OUTPUT_IDENT
#define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf ((FILE), "%s\"%s\"\n", IDENT_ASM_OP, (NAME));
-/* Miscellaneous parameters. */
+/************************[ Debugger stuff ]*********************************/
-/* Don't assume anything about the header files. */
-#undef NO_IMPLICIT_EXTERN_C
-#define NO_IMPLICIT_EXTERN_C
+/* All ELF targets can support DWARF-2. */
+#undef DWARF2_DEBUGGING_INFO
+#define DWARF2_DEBUGGING_INFO
-/* Allow #sccs in preprocessor. */
-#define SCCS_DIRECTIVE
+/* This is BSD, so we want the DBX format. */
+#undef DBX_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO
-/* Handle #pragma weak and #pragma pack. */
-#define HANDLE_SYSV_PRAGMA
+/* Even though this is BSD, ELF and the GNU tools operates better with dwarf2
+ than stabs. Since we don't have any native tools to be compatible with,
+ defaulting to dwarf2 is OK. */
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
diff --git a/gcc/config/ia64/aix.h b/gcc/config/ia64/aix.h
index 8366824..7b93683 100644
--- a/gcc/config/ia64/aix.h
+++ b/gcc/config/ia64/aix.h
@@ -22,6 +22,11 @@ Boston, MA 02111-1307, USA. */
/* AIX5 (aka Monterey): a mix of AIX and UnixWare.
This file is loosely based on ia64/linux.h. */
+/* This macro is a C statement to print on `stderr' a string describing the
+ particular machine description choice. */
+
+#define TARGET_VERSION fprintf (stderr, " (IA-64) AIX");
+
#undef ASM_APP_ON
#define ASM_APP_ON "#APP\n"
diff --git a/gcc/config/ia64/elf.h b/gcc/config/ia64/elf.h
index a3b851c..af8c7a6 100644
--- a/gcc/config/ia64/elf.h
+++ b/gcc/config/ia64/elf.h
@@ -1,9 +1,44 @@
/* Definitions for embedded ia64-elf target. */
-/* TODO: convert includes to ${tm_file} list in config.gcc. */
-#include "ia64/ia64.h"
-#include "elfos.h"
-#include "sysv4.h"
+/* This macro is a C statement to print on `stderr' a string describing the
+ particular machine description choice. */
+
+#define TARGET_VERSION fprintf (stderr, " (IA-64) ELF");
+
+/* Define this to be a string constant containing `-D' options to define the
+ predefined macros that identify this machine and system. These macros will
+ be predefined unless the `-ansi' option is specified. */
+/* ??? This is undefed in svr4.h. */
+#define CPP_PREDEFINES "-Dia64 -Amachine=ia64"
+
+/* A C string constant that tells the GNU CC driver program options to pass to
+ the assembler. It can also specify how to translate options you give to GNU
+ CC into options for GNU CC to pass to the assembler. */
+
+#if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GNU_AS) != 0
+/* GNU AS. */
+#define ASM_SPEC \
+ "%{mno-gnu-as:-N so} %{!mno-gnu-as:-x} %{mconstant-gp} %{mauto-pic}"
+#else
+/* Intel ias. */
+#define ASM_SPEC \
+ "%{!mgnu-as:-N so} %{mgnu-as:-x} %{mconstant-gp:-M const_gp}\
+ %{mauto-pic:-M no_plabel}"
+#endif
+
+/* A C string constant that tells the GNU CC driver program options to pass to
+ the linker. It can also specify how to translate options you give to GNU CC
+ into options for GNU CC to pass to the linker. */
+
+/* The Intel linker does not support dynamic linking, so we need -dn.
+ The Intel linker gives annoying messages unless -N so is used. */
+#if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GNU_LD) != 0
+/* GNU LD. */
+#define LINK_SPEC "%{mno-gnu-ld:-dn -N so}"
+#else
+/* Intel ild. */
+#define LINK_SPEC "%{!mgnu-ld:-dn -N so}"
+#endif
/* svr4.h links with crti.o/crtn.o, but elfos.h does not. We override elfos.h
so that we can use the standard ELF Unix method. */
diff --git a/gcc/config/ia64/freebsd.h b/gcc/config/ia64/freebsd.h
new file mode 100644
index 0000000..75cfc04
--- /dev/null
+++ b/gcc/config/ia64/freebsd.h
@@ -0,0 +1,66 @@
+/* Definitions for Intel IA-64 running FreeBSD using the ELF format
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%{p:%e`-p' not supported; use `-pg' and gprof(1)} \
+ %{Wl,*:%*} \
+ %{assert*} %{R*} %{rpath*} %{defsym*} \
+ %{shared:-Bshareable %{h*} %{soname*}} \
+ %{symbolic:-Bsymbolic} \
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld-elf.so.1}} \
+ %{static:-Bstatic}}"
+
+#undef ASM_SPEC
+#define ASM_SPEC "-x %{mconstant-gp} %{mauto-pic}"
+
+
+/************************[ Target stuff ]***********************************/
+
+/* Define the actual types of some ANSI-mandated types.
+ Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.c,
+ c-common.c, and config/<arch>/<arch>.h. */
+
+/* Earilier headers may get this wrong for FreeBSD.
+ We use the GCC defaults instead. */
+#undef WCHAR_TYPE
+
+#undef WCHAR_UNSIGNED
+#define WCHAR_UNSIGNED 0
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (FreeBSD/IA-64 ELF)");
+
+#define TARGET_ELF 1
+
+#define DONT_USE_BUILTIN_SETJMP
+#define JMP_BUF_SIZE 76
+
+/* Output any profiling code before the prologue. */
+
+#undef PROFILE_BEFORE_PROLOGUE
+#define PROFILE_BEFORE_PROLOGUE 1
diff --git a/gcc/config/ia64/hpux.h b/gcc/config/ia64/hpux.h
index c9df25b..6fb8f87 100644
--- a/gcc/config/ia64/hpux.h
+++ b/gcc/config/ia64/hpux.h
@@ -20,6 +20,11 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* This macro is a C statement to print on `stderr' a string describing the
+ particular machine description choice. */
+
+#define TARGET_VERSION fprintf (stderr, " (IA-64) HP-UX");
+
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "\
-D__IA64__ -D__ia64 -D__ia64__ -D__hpux -D__hpux__ -Dhpux -Dunix \
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index 361cf0a..baca932 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -31,11 +31,11 @@ Boston, MA 02111-1307, USA. */
/* Run-time target specifications */
-/* Define this to be a string constant containing `-D' options to define the
- predefined macros that identify this machine and system. These macros will
- be predefined unless the `-ansi' option is specified. */
-/* ??? This is undefed in svr4.h. */
-#define CPP_PREDEFINES "-Dia64 -Amachine=ia64"
+#define CPP_CPU_SPEC "\
+ -Acpu=ia64 -Amachine=ia64 \
+ %{!ansi:%{!std=c*:%{!std=i*:-Dia64}}} -D__ia64 -D__ia64__"
+
+#define CC1_SPEC "%(cc1_cpu) "
/* This declaration should be present. */
extern int target_flags;
@@ -176,11 +176,6 @@ extern const char *ia64_fixed_range_string;
N_("Specify range of registers to make fixed.")}, \
}
-/* This macro is a C statement to print on `stderr' a string describing the
- particular machine description choice. */
-
-#define TARGET_VERSION fprintf (stderr, " (IA-64)");
-
/* Sometimes certain combinations of command options do not make sense on a
particular target machine. You can define a macro `OVERRIDE_OPTIONS' to
take account of this. This macro, if defined, is executed once just after
@@ -242,36 +237,6 @@ extern const char *ia64_fixed_range_string;
into options for GNU CC to pass to the `cc1plus'. */
/* #define CC1PLUS_SPEC "" */
-
-/* A C string constant that tells the GNU CC driver program options to pass to
- the assembler. It can also specify how to translate options you give to GNU
- CC into options for GNU CC to pass to the assembler. */
-
-#if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GNU_AS) != 0
-/* GNU AS. */
-#define ASM_SPEC \
- "%{mno-gnu-as:-N so} %{!mno-gnu-as:-x} %{mconstant-gp} %{mauto-pic}"
-#else
-/* Intel ias. */
-#define ASM_SPEC \
- "%{!mgnu-as:-N so} %{mgnu-as:-x} %{mconstant-gp:-M const_gp}\
- %{mauto-pic:-M no_plabel}"
-#endif
-
-/* A C string constant that tells the GNU CC driver program options to pass to
- the linker. It can also specify how to translate options you give to GNU CC
- into options for GNU CC to pass to the linker. */
-
-/* The Intel linker does not support dynamic linking, so we need -dn.
- The Intel linker gives annoying messages unless -N so is used. */
-#if ((TARGET_CPU_DEFAULT | TARGET_DEFAULT) & MASK_GNU_LD) != 0
-/* GNU LD. */
-#define LINK_SPEC "%{mno-gnu-ld:-dn -N so}"
-#else
-/* Intel ild. */
-#define LINK_SPEC "%{!mgnu-ld:-dn -N so}"
-#endif
-
/* Storage Layout */
@@ -1570,21 +1535,24 @@ do { \
/* A C statement or compound statement to output to FILE some assembler code to
call the profiling subroutine `mcount'. */
-/* ??? Unclear if this will actually work. No way to test this currently. */
-
-#define FUNCTION_PROFILER(FILE, LABELNO) \
+#undef FUNCTION_PROFILER
+#define FUNCTION_PROFILER(FILE, LABELNO) \
do { \
char buf[20]; \
ASM_GENERATE_INTERNAL_LABEL (buf, "LP", LABELNO); \
- fputs ("\taddl r16 = @ltoff(", FILE); \
+ fputs ("\talloc out0 = ar.pfs, 8, 0, 4, 0\n", FILE); \
+ if (TARGET_AUTO_PIC) \
+ fputs ("\tmovl out3 = @gprel(", FILE); \
+ else \
+ fputs ("\taddl out3 = @ltoff(", FILE); \
assemble_name (FILE, buf); \
- fputs ("), gp\n", FILE); \
- fputs ("\tmov r17 = r1;;\n", FILE); \
- fputs ("\tld8 out0 = [r16]\n", FILE); \
- fputs ("\tmov r18 = b0\n", FILE); \
- fputs ("\tbr.call.sptk.many rp = mcount;;\n", FILE); \
- fputs ("\tmov b0 = r18\n", FILE); \
- fputs ("\tmov r1 = r17;;\n", FILE); \
+ if (TARGET_AUTO_PIC) \
+ fputs (");;\n", FILE); \
+ else \
+ fputs ("), r1;;\n", FILE); \
+ fputs ("\tmov out1 = r1\n", FILE); \
+ fputs ("\tmov out2 = b0\n", FILE); \
+ fputs ("\tbr.call.sptk.many b0 = _mcount;;\n", FILE); \
} while (0)
/* A C statement or compound statement to output to FILE some assembler code to
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
index a78130a..a25844f 100644
--- a/gcc/config/ia64/linux.h
+++ b/gcc/config/ia64/linux.h
@@ -1,5 +1,10 @@
/* Definitions for ia64-linux target. */
+/* This macro is a C statement to print on `stderr' a string describing the
+ particular machine description choice. */
+
+#define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
+
/* This is for -profile to use -lc_p instead of -lc. */
#undef CC1_SPEC
#define CC1_SPEC "%{profile:-p} %{G*}"
@@ -40,27 +45,4 @@
#undef PROFILE_BEFORE_PROLOGUE
#define PROFILE_BEFORE_PROLOGUE 1
-/* A C statement or compound statement to output to FILE some assembler code to
- call the profiling subroutine `mcount'. */
-
-#undef FUNCTION_PROFILER
-#define FUNCTION_PROFILER(FILE, LABELNO) \
-do { \
- char buf[20]; \
- ASM_GENERATE_INTERNAL_LABEL (buf, "LP", LABELNO); \
- fputs ("\talloc out0 = ar.pfs, 8, 0, 4, 0\n", FILE); \
- if (TARGET_AUTO_PIC) \
- fputs ("\tmovl out3 = @gprel(", FILE); \
- else \
- fputs ("\taddl out3 = @ltoff(", FILE); \
- assemble_name (FILE, buf); \
- if (TARGET_AUTO_PIC) \
- fputs (");;\n", FILE); \
- else \
- fputs ("), r1;;\n", FILE); \
- fputs ("\tmov out1 = r1\n", FILE); \
- fputs ("\tmov out2 = b0\n", FILE); \
- fputs ("\tbr.call.sptk.many b0 = _mcount;;\n", FILE); \
-} while (0)
-
/* End of linux.h */