[MSP430] Fix -fleading-underscore having no effect
diff mbox series

Message ID f05920b2-1981-e657-29c9-9cff1c7cbc68@mittosystems.com
State New
Headers show
Series
  • [MSP430] Fix -fleading-underscore having no effect
Related show

Commit Message

Jozef Lawrynowicz May 28, 2018, 12:54 p.m. UTC
Fix -fleading-underscore having no effect for msp430-elf by prepending
user_label_prefix to name when outputting assembly labels.

Successfully regtested the GCC testsuite for msp430-elf, and this fixed
unwind-1.c from dg.exp.

If the patch is acceptable, I would appreciate if someone would commit it for
me, as I don't have write access.

Comments

Jeff Law May 30, 2018, 11:34 p.m. UTC | #1
On 05/28/2018 06:54 AM, Jozef Lawrynowicz wrote:
> Fix -fleading-underscore having no effect for msp430-elf by prepending
> user_label_prefix to name when outputting assembly labels.
> 
> Successfully regtested the GCC testsuite for msp430-elf, and this fixed
> unwind-1.c from dg.exp.
> 
> If the patch is acceptable, I would appreciate if someone would commit it for
> 
> me, as I don't have write access.
> 
> 
> 0001-MSP430-Fix-fleading-underscore-having-no-effect.patch
> 
> 
> From 4b9fc3e0bf3e746c6be95c994f5ea4882dcd3e1d Mon Sep 17 00:00:00 2001
> From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
> Date: Wed, 23 May 2018 21:52:24 +0100
> Subject: [PATCH] MSP430: Fix -fleading-underscore having no effect
> 
> 2018-05-28  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
> 
> 	* gcc/config/msp430/msp430.c (msp430_output_labelref): Prepend
> 	user_label_prefix to name.
Thanks.  Installed on the trunk.

jeff

Patch
diff mbox series

From 4b9fc3e0bf3e746c6be95c994f5ea4882dcd3e1d Mon Sep 17 00:00:00 2001
From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
Date: Wed, 23 May 2018 21:52:24 +0100
Subject: [PATCH] MSP430: Fix -fleading-underscore having no effect

2018-05-28  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* gcc/config/msp430/msp430.c (msp430_output_labelref): Prepend
	user_label_prefix to name.

---
 gcc/config/msp430/msp430.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
index adde597..8c8e676 100644
--- a/gcc/config/msp430/msp430.c
+++ b/gcc/config/msp430/msp430.c
@@ -3416,6 +3416,9 @@  msp430_output_labelref (FILE *file, const char *name)
 	}
     }
 
+  if (user_label_prefix[0] != 0)
+    fputs (user_label_prefix, file);
+
   fputs (name, file);
 }
 
-- 
2.7.4