1999-03-16 19:40:26 -05:00
|
|
|
--- gcc/config/i386/freebsd.h.orig Mon Mar 1 14:47:32 1999
|
1999-03-21 20:35:36 -05:00
|
|
|
+++ gcc/config/i386/freebsd.h Sun Mar 21 16:58:39 1999
|
|
|
|
@@ -21,19 +21,13 @@
|
|
|
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
|
|
|
|
+
|
|
|
|
+/* Get generic FreeBSD definitions. */
|
|
|
|
+#include <freebsd.h>
|
|
|
|
+
|
|
|
|
#undef TARGET_VERSION
|
|
|
|
#define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)");
|
|
|
|
|
|
|
|
-/* The svr4 ABI for the i386 says that records and unions are returned
|
|
|
|
- in memory. */
|
|
|
|
-/* On FreeBSD, we do not. */
|
|
|
|
-#undef DEFAULT_PCC_STRUCT_RETURN
|
|
|
|
-#define DEFAULT_PCC_STRUCT_RETURN 0
|
|
|
|
-
|
|
|
|
-/* This gets defined in tm.h->linux.h->svr4.h, and keeps us from using
|
|
|
|
- libraries compiled with the native cc, so undef it. */
|
|
|
|
-#undef NO_DOLLAR_IN_LABEL
|
|
|
|
-
|
|
|
|
/* This is how to output an element of a case-vector that is relative.
|
|
|
|
This is only used for PIC code. See comments by the `casesi' insn in
|
|
|
|
i386.md for an explanation of the expression this outputs. */
|
|
|
|
@@ -113,22 +107,19 @@
|
1998-10-08 17:33:02 -04: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) \
|
|
|
|
{ \
|
|
|
|
- fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
|
|
|
|
- LPREFIX, (LABELNO)); \
|
|
|
|
- fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
|
|
|
|
+ fprintf (FILE, "\tcall *.mcount@GOT(%%ebx)\n"); \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
- fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \
|
|
|
|
- fprintf (FILE, "\tcall mcount\n"); \
|
|
|
|
+ fprintf (FILE, "\tcall .mcount\n"); \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
1999-03-21 20:35:36 -05:00
|
|
|
@@ -145,26 +136,16 @@
|
|
|
|
#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)"
|
|
|
|
+#define CPP_PREDEFINES "-Di386 -D__ELF__ -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES
|
|
|
|
|
|
|
|
#undef CPP_SPEC
|
|
|
|
-#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
|
|
|
|
+#define CPP_SPEC \
|
|
|
|
+ "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{m486:-D__i486__}"
|
|
|
|
+ /* %{pthread:-D_REENTRANT} */
|
1998-10-08 17:33:02 -04:00
|
|
|
|
|
|
|
#undef LIB_SPEC
|
|
|
|
-#if 1
|
|
|
|
-/* We no longer link with libc_p.a or libg.a by default. If you
|
|
|
|
- * want to profile or debug the C library, please add
|
|
|
|
- * -lc_p or -ggdb to LDFLAGS at the link time, respectively.
|
|
|
|
- */
|
1999-03-21 20:35:36 -05:00
|
|
|
-#define LIB_SPEC \
|
1998-10-08 17:33:02 -04:00
|
|
|
- "%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
|
|
|
|
- %{!ggdb:-lc} %{ggdb:-lg}}"
|
|
|
|
-#else
|
1999-03-21 20:35:36 -05:00
|
|
|
#define LIB_SPEC \
|
1998-10-08 17:33:02 -04:00
|
|
|
- "%{!shared: \
|
|
|
|
- %{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
|
|
|
|
- %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
|
|
|
|
-#endif
|
1999-03-21 20:35:36 -05:00
|
|
|
+ "%{!shared:%{!pg:%{!pthread:%{!kthread:-lc}%{kthread:-lpthread -lc}}%{pthread:-lc_r}}%{pg:%{!pthread:%{!kthread:-lc_p}%{kthread:-lpthread_p -lc_p}}%{pthread:-lc_r_p}}}"
|
1998-10-08 17:33:02 -04:00
|
|
|
|
|
|
|
/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support
|
|
|
|
for the special GCC options -static and -shared, which allow us to
|