svn commit: r304849 - projects/mips64-clang/contrib/gcc/config/mips
Sean Bruno
sbruno at FreeBSD.org
Fri Aug 26 13:59:22 UTC 2016
Author: sbruno
Date: Fri Aug 26 13:59:21 2016
New Revision: 304849
URL: https://svnweb.freebsd.org/changeset/base/304849
Log:
Fixup build with llvm/clang:
https://reviews.llvm.org/D23497 and the attached FreeBSD patch work together
to fix this problem and should be sufficient so long as you don't have
-save-temps or -via-file-asm in your compiler flags. The LLVM patch makes the
.local directive work properly when assembling an ELF while the FreeBSD patch
ensures the assembler never sees a forward-declared local label by declaring
them in advance with .local. However, the LLVM patch currently breaks if you
use -save-temps or -via-file-asm since MCAsmStreamer's implementation of .local
doesn't do anything to the MCSymbol and only emits a .local directive. This
causes the assembler to interpret it as an external symbol and emit the wrong
jal expansion.
Submitted by: Daniel Sanders <Daniel.Sanders at imgtec.com>
Modified:
projects/mips64-clang/contrib/gcc/config/mips/mips.h
Modified: projects/mips64-clang/contrib/gcc/config/mips/mips.h
==============================================================================
--- projects/mips64-clang/contrib/gcc/config/mips/mips.h Fri Aug 26 12:37:36 2016 (r304848)
+++ projects/mips64-clang/contrib/gcc/config/mips/mips.h Fri Aug 26 13:59:21 2016 (r304849)
@@ -2718,6 +2718,7 @@ while (0)
nop\n\
1: .cpload $31\n\
.set reorder\n\
+ .local " USER_LABEL_PREFIX #FUNC "\n\
jal " USER_LABEL_PREFIX #FUNC "\n\
" TEXT_SECTION_ASM_OP);
#endif /* Switch to #elif when we're no longer limited by K&R C. */
@@ -2729,6 +2730,7 @@ while (0)
bal 1f\n\
nop\n\
1: .set reorder\n\
+ .local " USER_LABEL_PREFIX #FUNC "\n\
.cpsetup $31, $2, 1b\n\
jal " USER_LABEL_PREFIX #FUNC "\n\
" TEXT_SECTION_ASM_OP);
More information about the svn-src-projects
mailing list