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.
>From 4b9fc3e0bf3e746c6be95c994f5ea4882dcd3e1d Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz <joze...@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 <joze...@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