pkgsrc/lang/gcc/patches/patch-ak
tron 178cf5b627 - Add patches from NetBSD-current to fix build on i386 ELF systems.
- Install into "${LOCALBASE}/gcc-2.95.2" to avoid that e.g. "bsd.pkg.mk"
  picks up the new compiler by accident.
- Add a file "${LOCALBASE}/etc/gcc-2.95.2.mk" which makes it possible to
  use the new "gcc" like this:
  make MAKECONF=/usr/pkg/etc/gcc-2.95.2.mk
2000-09-15 23:58:47 +00:00

49 lines
1.7 KiB
Text

$NetBSD: patch-ak,v 1.1 2000/09/15 23:58:48 tron Exp $
--- ../gcc-2.95.2/gcc/config/elfos.h.orig Fri Mar 26 11:45:26 1999
+++ ../gcc-2.95.2/gcc/config/elfos.h Sat Sep 16 00:17:42 2000
@@ -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);
@@ -92,6 +93,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 +135,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 +149,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
@@ -461,6 +466,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)