From owner-svn-src-all@freebsd.org Tue Feb 6 17:01:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64881EE9068; Tue, 6 Feb 2018 17:01:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E012573BAD; Tue, 6 Feb 2018 17:01:10 +0000 (UTC) (envelope-from jhb@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAFCA1AB23; Tue, 6 Feb 2018 17:01:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w16H1Aaj079604; Tue, 6 Feb 2018 17:01:10 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w16H1Akh079603; Tue, 6 Feb 2018 17:01:10 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201802061701.w16H1Akh079603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 6 Feb 2018 17:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328939 - head/contrib/gcc/config/mips X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/contrib/gcc/config/mips X-SVN-Commit-Revision: 328939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2018 17:01:11 -0000 Author: jhb Date: Tue Feb 6 17:01:10 2018 New Revision: 328939 URL: https://svnweb.freebsd.org/changeset/base/328939 Log: Use a workaround to compile the crt init functions correctly with clang. The MIPS assembly parser treats forward-declared local symbols as global symbols. This results in CALL16 relocations being used against local (private) symbols which then fail to resolve when linking binaries. Add .local to force the init and fini functions to be treated as local as a workaround. Submitted by: sbruno Sponsored by: DARPA / AFRL Modified: head/contrib/gcc/config/mips/mips.h Modified: head/contrib/gcc/config/mips/mips.h ============================================================================== --- head/contrib/gcc/config/mips/mips.h Tue Feb 6 16:02:33 2018 (r328938) +++ head/contrib/gcc/config/mips/mips.h Tue Feb 6 17:01:10 2018 (r328939) @@ -2721,6 +2721,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. */ @@ -2733,6 +2734,7 @@ while (0) nop\n\ 1: .set reorder\n\ .cpsetup $31, $2, 1b\n\ + .local " USER_LABEL_PREFIX #FUNC "\n\ jal " USER_LABEL_PREFIX #FUNC "\n\ " TEXT_SECTION_ASM_OP); #endif