summaryrefslogtreecommitdiff
path: root/lang/gcc30/files/patch-af
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>1998-10-08 21:33:02 +0000
committerJohn Polstra <jdp@FreeBSD.org>1998-10-08 21:33:02 +0000
commit71e64d35d1945c6fe5b34a508464ecb4fe67c97a (patch)
tree5ed597ae91fff10a35e6521c2091ab56661367d4 /lang/gcc30/files/patch-af
parentCosmetic changes (diff)
Make profiling work.
Notes
Notes: svn path=/head/; revision=13754
Diffstat (limited to 'lang/gcc30/files/patch-af')
-rw-r--r--lang/gcc30/files/patch-af51
1 files changed, 51 insertions, 0 deletions
diff --git a/lang/gcc30/files/patch-af b/lang/gcc30/files/patch-af
new file mode 100644
index 000000000000..ccd446725773
--- /dev/null
+++ b/lang/gcc30/files/patch-af
@@ -0,0 +1,51 @@
+--- gcc/config/i386/freebsd-elf.h.orig Mon Jul 13 15:38:36 1998
++++ gcc/config/i386/freebsd-elf.h Wed Oct 7 22:18:02 1998
+@@ -108,22 +108,19 @@
+ : ((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"); \
+ } \
+ }
+
+@@ -146,20 +143,8 @@
+ #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
+
+ #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.
+- */
+ #define LIB_SPEC \
+- "%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
+- %{!ggdb:-lc} %{ggdb:-lg}}"
+-#else
+-#define LIB_SPEC \
+- "%{!shared: \
+- %{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
+- %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
+-#endif
++ "%{!shared: %{p:-lc_p} %{pg:-lc_p} %{!p:%{!pg:-lc}}}"
+
+ /* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support
+ for the special GCC options -static and -shared, which allow us to