From owner-svn-src-projects@freebsd.org Fri Aug 26 13:59:22 2016 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46E18B70CFB for ; Fri, 26 Aug 2016 13:59:22 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 151AF20B; Fri, 26 Aug 2016 13:59:22 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7QDxLqs034917; Fri, 26 Aug 2016 13:59:21 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7QDxL1t034916; Fri, 26 Aug 2016 13:59:21 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201608261359.u7QDxL1t034916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 26 Aug 2016 13:59:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r304849 - projects/mips64-clang/contrib/gcc/config/mips X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2016 13:59:22 -0000 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 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);