1999-06-21 18:17:56 +00:00
|
|
|
--- gcc/config/i386/freebsd.h.orig Mon Jun 14 17:58:11 1999
|
|
|
|
+++ gcc/config/i386/freebsd.h Mon Jun 21 05:18:57 1999
|
|
|
|
@@ -135,23 +135,16 @@
|
1998-10-08 21:33:02 +00:00
|
|
|
: ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \
|
|
|
|
: (-1))
|
|
|
|
|
|
|
|
-/* Output assembler code to FILE to increment profiler label # LABELNO
|
|
|
|
- for profiling a function entry. */
|
|
|
|
+/* Tell final.c that we don't need a label passed to mcount. */
|
|
|
|
+#define NO_PROFILE_DATA
|
|
|
|
|
|
|
|
#undef FUNCTION_PROFILER
|
|
|
|
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
|
|
|
{ \
|
|
|
|
if (flag_pic) \
|
1999-06-21 18:17:56 +00:00
|
|
|
- { \
|
1998-10-08 21:33:02 +00:00
|
|
|
- fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
|
|
|
|
- LPREFIX, (LABELNO)); \
|
|
|
|
- fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
|
1999-06-21 18:17:56 +00:00
|
|
|
- } \
|
1998-10-08 21:33:02 +00:00
|
|
|
+ fprintf (FILE, "\tcall *.mcount@GOT(%%ebx)\n"); \
|
|
|
|
else \
|
1999-06-21 18:17:56 +00:00
|
|
|
- { \
|
1998-10-08 21:33:02 +00:00
|
|
|
- fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \
|
|
|
|
- fprintf (FILE, "\tcall mcount\n"); \
|
1999-06-21 18:17:56 +00:00
|
|
|
- } \
|
1998-10-08 21:33:02 +00:00
|
|
|
+ fprintf (FILE, "\tcall .mcount\n"); \
|
|
|
|
}
|
|
|
|
|
1999-06-21 18:17:56 +00:00
|
|
|
#undef SIZE_TYPE
|
|
|
|
@@ -170,10 +163,30 @@
|
1999-03-22 01:35:36 +00:00
|
|
|
#define WCHAR_TYPE_SIZE BITS_PER_WORD
|
|
|
|
|
|
|
|
#undef CPP_PREDEFINES
|
|
|
|
-#define CPP_PREDEFINES "-Di386 -Dunix -D__ELF__ -D__FreeBSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
|
1999-04-21 07:48:59 +00:00
|
|
|
+#define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES
|
1999-03-22 01:35:36 +00:00
|
|
|
|
|
|
|
#undef CPP_SPEC
|
|
|
|
-#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
|
1999-06-15 07:31:21 +00:00
|
|
|
+#if TARGET_CPU_DEFAULT == 2
|
|
|
|
+#define CPP_SPEC "\
|
|
|
|
+ %{!maout: -D__ELF__} \
|
|
|
|
+ %{munderscores: -D__UNDERSCORES__} \
|
|
|
|
+ %{maout: %{!mno-underscores: -D__UNDERSCORES__}} \
|
|
|
|
+ %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__}"
|
|
|
|
+#else
|
|
|
|
+#define CPP_SPEC "\
|
|
|
|
+ %{!maout: -D__ELF__} \
|
|
|
|
+ %{munderscores: -D__UNDERSCORES__} \
|
|
|
|
+ %{maout: %{!mno-underscores: -D__UNDERSCORES__}} \
|
|
|
|
+ %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{m486:-D__i486__}"
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#undef CC1_SPEC
|
|
|
|
+#define CC1_SPEC "\
|
|
|
|
+ %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
|
|
|
|
+ %{maout: %{!mno-underscores: %{!munderscores: -munderscores }}}"
|
|
|
|
+
|
|
|
|
+#undef ASM_SPEC
|
|
|
|
+#define ASM_SPEC "%{v*: -v} %{maout: %{fpic:-k} %{fPIC:-k}}"
|
|
|
|
|
|
|
|
/* 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
|
1999-06-21 18:17:56 +00:00
|
|
|
@@ -194,11 +207,11 @@
|
|
|
|
|
|
|
|
#undef STARTFILE_SPEC
|
|
|
|
#define STARTFILE_SPEC \
|
1998-10-08 21:33:02 +00:00
|
|
|
- "%{!shared: \
|
1999-06-21 18:17:56 +00:00
|
|
|
- %{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}"
|
|
|
|
+ "%{maout: %{shared:c++rt0.o%s} \
|
1999-04-21 07:48:59 +00:00
|
|
|
+ %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}} \
|
|
|
|
+ %{!maout: %{!shared: \
|
|
|
|
+ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
|
|
|
|
+ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
|
1999-06-21 18:17:56 +00:00
|
|
|
|
|
|
|
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
|
|
|
|
the magical crtend.o file (see crtstuff.c) which provides part of
|
|
|
|
@@ -208,7 +221,7 @@
|
|
|
|
|
|
|
|
#undef ENDFILE_SPEC
|
|
|
|
#define ENDFILE_SPEC \
|
|
|
|
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
1999-04-21 07:48:59 +00:00
|
|
|
+ "%{!maout: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}"
|
1999-06-21 18:17:56 +00:00
|
|
|
|
|
|
|
/* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate
|
|
|
|
libc, depending on whether we're doing profiling or need threads support.
|
|
|
|
@@ -247,7 +260,7 @@
|
|
|
|
%{!static: \
|
|
|
|
%{rdynamic:-export-dynamic} \
|
|
|
|
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld-elf.so.1}} \
|
|
|
|
- %{static:-Bstatic}}} \
|
|
|
|
+ %{static:-Bstatic}} \
|
|
|
|
%{symbolic:-Bsymbolic}"
|
|
|
|
|
|
|
|
/* A C statement to output to the stdio stream FILE an assembler
|