From owner-svn-src-head@FreeBSD.ORG Sat Mar 22 09:23:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C352AFD; Sat, 22 Mar 2014 09:23:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0048C89D; Sat, 22 Mar 2014 09:23:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2M9NDHq022434; Sat, 22 Mar 2014 09:23:13 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2M9NDs8022432; Sat, 22 Mar 2014 09:23:13 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201403220923.s2M9NDs8022432@svn.freebsd.org> From: Andrew Turner Date: Sat, 22 Mar 2014 09:23:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263619 - head/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 09:23:14 -0000 Author: andrew Date: Sat Mar 22 09:23:13 2014 New Revision: 263619 URL: http://svnweb.freebsd.org/changeset/base/263619 Log: Pull in r201662 from upstream clang trunk: Add FreeBSD ARM EABI hard-float support Patch by Andrew Turner. Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Sat Mar 22 03:36:07 2014 (r263618) +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Sat Mar 22 09:23:13 2014 (r263619) @@ -2034,6 +2034,7 @@ Tool *FreeBSD::buildLinker() const { bool FreeBSD::UseSjLjExceptions() const { // FreeBSD uses SjLj exceptions on ARM oabi. switch (getTriple().getEnvironment()) { + case llvm::Triple::GNUEABIHF: case llvm::Triple::GNUEABI: case llvm::Triple::EABI: return false; Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sat Mar 22 03:36:07 2014 (r263618) +++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sat Mar 22 09:23:13 2014 (r263619) @@ -737,8 +737,15 @@ static StringRef getARMFloatABI(const Dr } case llvm::Triple::FreeBSD: - // FreeBSD defaults to soft float - FloatABI = "soft"; + switch(Triple.getEnvironment()) { + case llvm::Triple::GNUEABIHF: + FloatABI = "hard"; + break; + default: + // FreeBSD defaults to soft float + FloatABI = "soft"; + break; + } break; default: @@ -5776,8 +5783,18 @@ void freebsd::Assemble::ConstructJob(Com } } else if (getToolChain().getArch() == llvm::Triple::arm || getToolChain().getArch() == llvm::Triple::thumb) { - CmdArgs.push_back("-mfpu=softvfp"); + const Driver &D = getToolChain().getDriver(); + llvm::Triple Triple = getToolChain().getTriple(); + StringRef FloatABI = getARMFloatABI(D, Args, Triple); + + if (FloatABI == "hard") { + CmdArgs.push_back("-mfpu=vfp"); + } else { + CmdArgs.push_back("-mfpu=softvfp"); + } + switch(getToolChain().getTriple().getEnvironment()) { + case llvm::Triple::GNUEABIHF: case llvm::Triple::GNUEABI: case llvm::Triple::EABI: CmdArgs.push_back("-meabi=5");