summaryrefslogtreecommitdiff
path: root/lang/gcc/patches/patch-be
blob: 749844eded109c3840af16f7ade4c946b1575ec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
$NetBSD: patch-be,v 1.1 2002/01/03 20:40:45 tron Exp $

--- ../gcc-2.95.3/gcc/config/elfos.h.orig	Wed Apr 12 03:22:51 2000
+++ ../gcc-2.95.3/gcc/config/elfos.h	Thu Jan  3 20:37:54 2002
@@ -48,6 +48,7 @@
 
 /* Output #ident as a .ident.  */
 
+#undef ASM_OUTPUT_IDENT
 #define ASM_OUTPUT_IDENT(FILE, NAME) \
   fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
 
@@ -57,7 +58,9 @@
 
 /* Writing `int' for a bitfield forces int alignment for the structure.  */
 
+#ifndef PCC_BITFIELD_TYPE_MATTERS
 #define PCC_BITFIELD_TYPE_MATTERS 1
+#endif
 
 /* Implicit library calls should use memcpy, not bcopy, etc.  */
 
@@ -92,6 +95,10 @@
 #undef SET_ASM_OP
 #define SET_ASM_OP	".set"
 
+/* We want local labels to start with period if made with asm_fprintf. */
+#undef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX "."
+
 /* This is how to begin an assembly language file.  Most svr4 assemblers want
    at least a .file directive to come first, and some want to see a .version
    directive come right after that.  Here we just establish a default
@@ -130,7 +137,7 @@
 #undef ASM_OUTPUT_INTERNAL_LABEL
 #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM)			\
 do {									\
-  fprintf (FILE, ".%s%d:\n", PREFIX, NUM);				\
+  fprintf (FILE, "%s%s%d:\n", LOCAL_LABEL_PREFIX, PREFIX, NUM);		\
 } while (0)
 
 /* This is how to store into the string LABEL
@@ -144,7 +151,7 @@
 #undef ASM_GENERATE_INTERNAL_LABEL
 #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM)			\
 do {									\
-  sprintf (LABEL, "*.%s%d", PREFIX, NUM);				\
+  sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM);		\
 } while (0)
 
 /* Output the label which precedes a jumptable.  Note that for all svr4
@@ -462,6 +469,7 @@
 
 /* This is how we tell the assembler that a symbol is weak.  */
 
+#undef ASM_WEAKEN_LABEL
 #define ASM_WEAKEN_LABEL(FILE,NAME) \
   do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
        fputc ('\n', FILE); } while (0)