1999-04-21 07:48:59 +00:00
|
|
|
--- gcc/config/i386/freebsd.h.orig Tue Feb 16 15:51:31 1999
|
|
|
|
+++ gcc/config/i386/freebsd.h Mon Apr 19 09:22:46 1999
|
|
|
|
@@ -21,6 +21,15 @@
|
1999-03-22 01:35:36 +00:00
|
|
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
|
1999-04-21 07:48:59 +00:00
|
|
|
+
|
|
|
|
+/* Use stabs instead of DWARF debug format. */
|
|
|
|
+#undef PREFERRED_DEBUGGING_TYPE
|
|
|
|
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
|
|
|
+#include "svr4.h"
|
1999-03-22 01:35:36 +00:00
|
|
|
+
|
|
|
|
+/* Get generic FreeBSD definitions. */
|
|
|
|
+#include <freebsd.h>
|
|
|
|
+
|
|
|
|
#undef TARGET_VERSION
|
|
|
|
#define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)");
|
|
|
|
|
1999-04-21 07:48:59 +00:00
|
|
|
@@ -113,22 +122,19 @@
|
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) \
|
|
|
|
{ \
|
|
|
|
- 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-04-21 07:48:59 +00:00
|
|
|
@@ -145,27 +151,31 @@
|
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-04-21 07:48:59 +00:00
|
|
|
-
|
|
|
|
-#undef LIB_SPEC
|
1998-10-08 21:33:02 +00:00
|
|
|
-#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-22 01:35:36 +00:00
|
|
|
-#define LIB_SPEC \
|
1998-10-08 21:33:02 +00:00
|
|
|
- "%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
|
|
|
|
- %{!ggdb:-lc} %{ggdb:-lg}}"
|
1999-04-21 07:48:59 +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 LIB_SPEC \
|
1998-10-08 21:33:02 +00:00
|
|
|
- "%{!shared: \
|
|
|
|
- %{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
|
|
|
|
- %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
|
1999-04-21 07:48:59 +00:00
|
|
|
+#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
|
1998-10-08 21:33:02 +00:00
|
|
|
|
1999-04-21 07:48:59 +00:00
|
|
|
+#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}}"
|
|
|
|
+
|
1998-10-08 21:33:02 +00:00
|
|
|
/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support
|
|
|
|
for the special GCC options -static and -shared, which allow us to
|
1999-04-21 07:48:59 +00:00
|
|
|
link things in one of these three modes by applying the appropriate
|
|
|
|
@@ -181,13 +191,23 @@
|
|
|
|
done. */
|
|
|
|
|
|
|
|
#undef LINK_SPEC
|
|
|
|
-#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
|
|
|
- %{!shared: \
|
|
|
|
- %{!ibcs: \
|
|
|
|
+#define LINK_SPEC "\
|
|
|
|
+ %{p:%e`-p' not supported; use `-pg' and gprof(1)} \
|
|
|
|
+ %{maout: %{shared:-Bshareable} \
|
|
|
|
+ %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \
|
|
|
|
+ %{pg:-Bstatic} %{Z}} \
|
|
|
|
+ %{assert*} %{R*}} \
|
|
|
|
+ %{!maout: \
|
|
|
|
+ -m elf_i386 \
|
|
|
|
+ %{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:-static}}}"
|
|
|
|
+ %{rdynamic: -export-dynamic} \
|
|
|
|
+ %{!dynamic-linker: -dynamic-linker /usr/libexec/ld-elf.so.1}} \
|
|
|
|
+ %{static:-Bstatic}}}"
|
|
|
|
|
|
|
|
/* Get perform_* macros to build libgcc.a. */
|
|
|
|
|
|
|
|
@@ -204,3 +224,15 @@
|
|
|
|
else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
+
|
|
|
|
+#undef STARTFILE_SPEC
|
|
|
|
+#define STARTFILE_SPEC "\
|
|
|
|
+ %{maout: %{shared:c++rt0.o%s} \
|
|
|
|
+ %{!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}}"
|
|
|
|
+
|
|
|
|
+#undef ENDFILE_SPEC
|
|
|
|
+#define ENDFILE_SPEC \
|
|
|
|
+ "%{!maout: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}"
|