From owner-freebsd-toolchain@freebsd.org Tue Jan 5 04:43:12 2016 Return-Path: Delivered-To: freebsd-toolchain@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 98C4EA62F28 for ; Tue, 5 Jan 2016 04:43:12 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-3.reflexion.net [208.70.210.3]) (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 4E1791C61 for ; Tue, 5 Jan 2016 04:43:11 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 7796 invoked from network); 5 Jan 2016 04:36:29 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 5 Jan 2016 04:36:29 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Mon, 04 Jan 2016 23:36:37 -0500 (EST) Received: (qmail 31264 invoked from network); 5 Jan 2016 04:36:37 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 5 Jan 2016 04:36:37 -0000 X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id D3B821C43BC; Mon, 4 Jan 2016 20:36:23 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: 11.0-CURRENT Bug 205904 "unresolvable R_ARM_MOVW_ABS_NC relocation" vs. forced -fPIC use Message-Id: <8079E6B2-DC53-4BFA-9129-8A88A1A1F044@dsl-only.net> Date: Mon, 4 Jan 2016 20:36:29 -0800 To: freebsd-arm , FreeBSD Toolchain Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 04:43:12 -0000 I had in Bug 205904 reported that trying "portmaster -DK = textproc/expat2" in a -march=3Darmv7-a -mcpu=3Dcortex-a7 context (on an = rpi2b) gets (for -r293129 and its /usr/bin/ tools): > unresolvable R_ARM_MOVW_ABS_NC relocation against symbol = `malloc@@FBSD_1.0' in an attempted link operation. I've now added a comment saying in part: > Investigating the issue I had the portmaster activity use the = /usr/local/arm-gnueabi-freebsd/bin/ tools instead (via /etc/make.conf = changes) and in that context the message is different but it was still = an error: >=20 >> relocation R_ARM_MOVW_ABS_NC against `malloc' can not be used when = making a shared object; recompile with -fPIC >=20 >=20 > Trying again with -fPIC does let the portmaster command complete in = this /usr/local/arm-gnueabi-freebsd/bin/ based tool context. >=20 >=20 > Going back and trying -fPIC in the /usr/bin/ based tools context also = lets the portmaster command complete. (That context without -fPIC did = not directly indicate to try -fPIC in its messages.) >=20 >=20 > So maybe part of the issue is having compiler arguments like -fPIC = show up in commands for contexts like -march=3Darmv7-a -mcpu=3Dcortex-a7 = without manual intervention in each case. For ports: some parts of a = more complicated port might need[] such and other parts might not. I used /etc/make.conf to force -fPIC being present. I started this investigation to try some things after Ian Lepore's = -r292964 for the /usr/bin/ binutils. I picked on textproc/expat2 = initially as something fairly simple and limited to C. (clang++ has = problems under SCTLR bit[1]=3D=3D1 [alignment required] on arm that make = clang++ Bus Error during most C++ compiles). =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-freebsd-toolchain@freebsd.org Tue Jan 5 18:28:02 2016 Return-Path: Delivered-To: freebsd-toolchain@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 0A326A63C3C for ; Tue, 5 Jan 2016 18:28:02 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-3.reflexion.net [208.70.210.3]) (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 9ABD21BA0 for ; Tue, 5 Jan 2016 18:28:00 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 693 invoked from network); 5 Jan 2016 18:27:58 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 5 Jan 2016 18:27:58 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Tue, 05 Jan 2016 13:28:01 -0500 (EST) Received: (qmail 15272 invoked from network); 5 Jan 2016 18:28:00 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 5 Jan 2016 18:28:00 -0000 X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 6846D1C43C1; Tue, 5 Jan 2016 10:27:55 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Bug 205663 Clang getting Bus Errors (arm SCLTR Bit[12]==1 context): Reported fixed on llvm's trunk Message-Id: Date: Tue, 5 Jan 2016 10:27:57 -0800 To: freebsd-arm , FreeBSD Toolchain Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 18:28:02 -0000 llvm.org's Bugzilla reports that clang trunk has been fixed and clang = 3.8 will contain the fixes: James Molloy changed bug 25958=20 What Removed Added Status NEW RESOLVED Resolution --- FIXED Comment # 8 on bug 25958 from James Molloy Hi Mark, Thanks for your detailed investigation. I can confirm that this is fixed = on trunk and therefore will be fixed for LLVM 3.8. The fixes were done for SPARC, which requires strict accesses much as = ARM does with SCTLR=3D1. There was a sequence of commits by James Knight that fixed these, but an example is http://reviews.llvm.org/rL242554 . The fixes were in a similar vein to yours, but required changes in fewer = places and there were a few more sticky issues to solve too. I'll CC James here = in case he wants to comment on the current state of the clang codebase for self-hosting in a strict alignment environment. Cheers, James =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-freebsd-toolchain@freebsd.org Tue Jan 5 18:35:25 2016 Return-Path: Delivered-To: freebsd-toolchain@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 EEEABA63ED0 for ; Tue, 5 Jan 2016 18:35:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-x22f.google.com (mail-qg0-x22f.google.com [IPv6:2607:f8b0:400d:c04::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA0C21F4E for ; Tue, 5 Jan 2016 18:35:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qg0-x22f.google.com with SMTP id e32so194772791qgf.3 for ; Tue, 05 Jan 2016 10:35:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=oKvJcldLCCVKnESqryNOwjQrO+vyASxY+IS6WHQwV3E=; b=HLNbRo+EJBHIkJ0jaQwiDavasHxVX3nJjbmeJGbU76QKwOvQ9hQPk+AvLhpkUIGHi4 +djBY3zipwd+SeFbkMjUltfNCgvfUsBcuwWSsEcdbqfINkHnkgd3b724i9/NmuUpZJdh YQaGIq4xKUlybF8yIWPbpUFj4VXagnoBMEzruob/MnDD+ZTbXL9/b/OonYN1QjQ8sAMM cRfkwEQZzhcH7G188eFhltMW/iikRlxuUkXIydX4zLyRAkqJkbol1t+znVRADWArDYsN 96sixznDLBidHE4VrqDBjZzC+PoKQsaHeDXtO+KEqcyGBwzPSBrdSKexhGRnJjFOiT3G 97EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=oKvJcldLCCVKnESqryNOwjQrO+vyASxY+IS6WHQwV3E=; b=B69F/St6FcBhmhKF2OntsaTESu5iDrmFZfrH/rXjQ9DLicfXtgp15YHy3yhlT2/J6y 8ILD3qwhtCmnGJ42YbMlYEXsTB6hk6HzazqYiwa5fusqvLUvHFz//XVMBP4g9EiE89N5 G/jXnfvWdNhVr7EeClMNTBniD7HthSO/6dRsq3ZnrqjkscapIxSoJN6OLKlWdgNQFuSS W0V3nysHGTepO8F5Mcedb0ZO+x4sqgPn8tvv0DB/eh0bNCSp7r4+7hjHgeONikNPly9/ mdt7wLAgruMDRveq5mj0xQaycvV+IbJ3QumR5jVvJGRtjTpVh1QWW9iaP555EYiejYW+ luuA== X-Gm-Message-State: ALoCoQm67X0ZvkW8J+qRETjRl+JGvZBI+VxLLNx/HvSsgraMQKt9fkxHTkC8gCZ+U2VEVG3hJNJD+bDMRCWLLiYkshrWSQUhyg== MIME-Version: 1.0 X-Received: by 10.140.29.131 with SMTP id b3mr122845095qgb.50.1452018924736; Tue, 05 Jan 2016 10:35:24 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.140.27.181 with HTTP; Tue, 5 Jan 2016 10:35:24 -0800 (PST) X-Originating-IP: [2601:280:4900:3700:a188:e7cd:b123:bb4b] In-Reply-To: References: Date: Tue, 5 Jan 2016 11:35:24 -0700 X-Google-Sender-Auth: opw3NVvca96uyZp4jqc0kLO1BlM Message-ID: Subject: Re: Bug 205663 Clang getting Bus Errors (arm SCLTR Bit[12]==1 context): Reported fixed on llvm's trunk From: Warner Losh To: Mark Millard Cc: freebsd-arm , FreeBSD Toolchain Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 18:35:26 -0000 On Tue, Jan 5, 2016 at 11:27 AM, Mark Millard wrote: > llvm.org's Bugzilla reports that clang trunk has been fixed and clang 3.8 > will contain the fixes: > > James Molloy changed bug 25958 > What Removed Added > Status NEW RESOLVED > Resolution --- FIXED > Comment # 8 on bug 25958 from James Molloy > Hi Mark, > > Thanks for your detailed investigation. I can confirm that this is fixed on > trunk and therefore will be fixed for LLVM 3.8. > > The fixes were done for SPARC, which requires strict accesses much as ARM > does > with SCTLR=1. > > There was a sequence of commits by James Knight that fixed these, but an > example is http://reviews.llvm.org/rL242554 . > > The fixes were in a similar vein to yours, but required changes in fewer > places > and there were a few more sticky issues to solve too. I'll CC James here in > case he wants to comment on the current state of the clang codebase for > self-hosting in a strict alignment environment. > > Cheers, > > James > There's a projects/clang-380-import that you might want to try... Warner From owner-freebsd-toolchain@freebsd.org Tue Jan 5 18:54:01 2016 Return-Path: Delivered-To: freebsd-toolchain@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 11A63A624E2 for ; Tue, 5 Jan 2016 18:54:01 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 E951C1861 for ; Tue, 5 Jan 2016 18:54:00 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Tue, 5 Jan 2016 18:54:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id u05IrqIF001652; Tue, 5 Jan 2016 11:53:52 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1452020032.1320.21.camel@freebsd.org> Subject: Re: Bug 205663 Clang getting Bus Errors (arm SCLTR Bit[12]==1 context): Reported fixed on llvm's trunk From: Ian Lepore To: Warner Losh , Mark Millard Cc: freebsd-arm , FreeBSD Toolchain Date: Tue, 05 Jan 2016 11:53:52 -0700 In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 18:54:01 -0000 On Tue, 2016-01-05 at 11:35 -0700, Warner Losh wrote: > On Tue, Jan 5, 2016 at 11:27 AM, Mark Millard > wrote: > > > llvm.org's Bugzilla reports that clang trunk has been fixed and > > clang 3.8 > > will contain the fixes: > > > > James Molloy changed bug 25958 > > What Removed Added > > Status NEW RESOLVED > > Resolution --- FIXED > > Comment # 8 on bug 25958 from James Molloy > > Hi Mark, > > > > Thanks for your detailed investigation. I can confirm that this is > > fixed on > > trunk and therefore will be fixed for LLVM 3.8. > > > > The fixes were done for SPARC, which requires strict accesses much > > as ARM > > does > > with SCTLR=1. > > > > There was a sequence of commits by James Knight that fixed these, > > but an > > example is http://reviews.llvm.org/rL242554 . > > > > The fixes were in a similar vein to yours, but required changes in > > fewer > > places > > and there were a few more sticky issues to solve too. I'll CC James > > here in > > case he wants to comment on the current state of the clang codebase > > for > > self-hosting in a strict alignment environment. > > > > Cheers, > > > > James > > > > There's a projects/clang-380-import that you might want to try... It's a non-starter for us, because unfortunately they appear to have removed support for the -arm-use-movt=0 command line option, so now we can't build ubldr or kernel modules. -- Ian From owner-freebsd-toolchain@freebsd.org Tue Jan 5 18:56:31 2016 Return-Path: Delivered-To: freebsd-toolchain@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 BA18BA62611 for ; Tue, 5 Jan 2016 18:56:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 9ED3319A0 for ; Tue, 5 Jan 2016 18:56:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Tue, 5 Jan 2016 18:56:54 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id u05IuO3r001660; Tue, 5 Jan 2016 11:56:24 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1452020184.1320.24.camel@freebsd.org> Subject: Re: 11.0-CURRENT Bug 205904 "unresolvable R_ARM_MOVW_ABS_NC relocation" vs. forced -fPIC use From: Ian Lepore To: Mark Millard , freebsd-arm , FreeBSD Toolchain Date: Tue, 05 Jan 2016 11:56:24 -0700 In-Reply-To: <8079E6B2-DC53-4BFA-9129-8A88A1A1F044@dsl-only.net> References: <8079E6B2-DC53-4BFA-9129-8A88A1A1F044@dsl-only.net> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 18:56:31 -0000 On Mon, 2016-01-04 at 20:36 -0800, Mark Millard wrote: > I had in Bug 205904 reported that trying "portmaster -DK > textproc/expat2" in a -march=armv7-a -mcpu=cortex-a7 context (on an > rpi2b) gets (for -r293129 and its /usr/bin/ tools): > > > unresolvable R_ARM_MOVW_ABS_NC relocation against symbol > > `malloc@@FBSD_1.0' > > in an attempted link operation. > > I've now added a comment saying in part: > > > Investigating the issue I had the portmaster activity use the > > /usr/local/arm-gnueabi-freebsd/bin/ tools instead (via > > /etc/make.conf changes) and in that context the message is > > different but it was still an error: > > > > > relocation R_ARM_MOVW_ABS_NC against `malloc' can not be used > > > when making a shared object; recompile with -fPIC > > > > > > Trying again with -fPIC does let the portmaster command complete in > > this /usr/local/arm-gnueabi-freebsd/bin/ based tool context. > > > > > > Going back and trying -fPIC in the /usr/bin/ based tools context > > also lets the portmaster command complete. (That context without > > -fPIC did not directly indicate to try -fPIC in its messages.) > > > > > > So maybe part of the issue is having compiler arguments like -fPIC > > show up in commands for contexts like -march=armv7-a -mcpu=cortex > > -a7 without manual intervention in each case. For ports: some parts > > of a more complicated port might need[] such and other parts might > > not. > > I used /etc/make.conf to force -fPIC being present. > > I started this investigation to try some things after Ian Lepore's > -r292964 for the /usr/bin/ binutils. I picked on textproc/expat2 > initially as something fairly simple and limited to C. (clang++ has > problems under SCTLR bit[1]==1 [alignment required] on arm that make > clang++ Bus Error during most C++ compiles). > > === > Mark Millard > markmi at dsl-only.net All of this is a complex way of saying "there is a bug in the expat2 port" (that being that it tries to build a shared library from object files that were compiled without -fpic). Adding -fpic via make.conf is absolutely not a fix or even a marginally viable workaround. -- Ian From owner-freebsd-toolchain@freebsd.org Wed Jan 6 17:55:30 2016 Return-Path: Delivered-To: freebsd-toolchain@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 33C72A64C2F for ; Wed, 6 Jan 2016 17:55:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 23DA61AEC for ; Wed, 6 Jan 2016 17:55:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u06HtRFS062576 for ; Wed, 6 Jan 2016 17:55:30 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 192320] Use of thread_local produces linking errors on system version of clang++ Date: Wed, 06 Jan 2016 17:55:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: h2+fbsdports@fsfe.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2016 17:55:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D192320 Hannes Hauswedell changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |h2+fbsdports@fsfe.org --- Comment #8 from Hannes Hauswedell --- Indeed, a fix would be great! Thank you. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-toolchain@freebsd.org Thu Jan 7 22:55:47 2016 Return-Path: Delivered-To: freebsd-toolchain@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 99E87A67F68; Thu, 7 Jan 2016 22:55:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6000D1022; Thu, 7 Jan 2016 22:55:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::c926:fd33:940f:2642] (unknown [IPv6:2001:7b8:3a7:0:c926:fd33:940f:2642]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A8E9E284F8; Thu, 7 Jan 2016 23:55:43 +0100 (CET) Subject: Re: Bug 205663 Clang getting Bus Errors (arm SCLTR Bit[12]==1 context): Reported fixed on llvm's trunk Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D9B94D6D-4A49-489D-9A1D-BB675D92C3F5"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.6b2 (ebbf3ef) From: Dimitry Andric In-Reply-To: <1452020032.1320.21.camel@freebsd.org> Date: Thu, 7 Jan 2016 23:57:10 +0100 Cc: Warner Losh , Mark Millard , freebsd-arm , FreeBSD Toolchain Message-Id: <7EE8F65E-7485-4FA9-A136-F22090DB107F@FreeBSD.org> References: <1452020032.1320.21.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3112) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2016 22:55:47 -0000 --Apple-Mail=_D9B94D6D-4A49-489D-9A1D-BB675D92C3F5 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 05 Jan 2016, at 19:53, Ian Lepore wrote: > > On Tue, 2016-01-05 at 11:35 -0700, Warner Losh wrote: ... >> There's a projects/clang-380-import that you might want to try... > > It's a non-starter for us, because unfortunately they appear to have > removed support for the -arm-use-movt=0 command line option, so now we > can't build ubldr or kernel modules. FYI, I have added a -mno-movt option for this purpose upstream, and imported a newer snapshot into the clang380-import branch. As of r293384, it now uses the new option spelling for modules, if your clang is 3.8.0 or higher. -Dimitry --Apple-Mail=_D9B94D6D-4A49-489D-9A1D-BB675D92C3F5 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.29 iEYEARECAAYFAlaO7U0ACgkQsF6jCi4glqOukACgy+ELaYHVsDmlcHxGindP23eG jDcAn2W7uBH3FQXDtIdeoXhM2IyKHz/0 =I/iS -----END PGP SIGNATURE----- --Apple-Mail=_D9B94D6D-4A49-489D-9A1D-BB675D92C3F5-- From owner-freebsd-toolchain@freebsd.org Fri Jan 8 00:27:40 2016 Return-Path: Delivered-To: freebsd-toolchain@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 751D7A654AA for ; Fri, 8 Jan 2016 00:27:40 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 4F5871E10 for ; Fri, 8 Jan 2016 00:27:39 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Fri, 8 Jan 2016 00:28:14 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id u080RaEs005430; Thu, 7 Jan 2016 17:27:36 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1452212856.1215.28.camel@freebsd.org> Subject: Re: Bug 205663 Clang getting Bus Errors (arm SCLTR Bit[12]==1 context): Reported fixed on llvm's trunk From: Ian Lepore To: Dimitry Andric Cc: freebsd-arm , FreeBSD Toolchain , Mark Millard Date: Thu, 07 Jan 2016 17:27:36 -0700 In-Reply-To: <7EE8F65E-7485-4FA9-A136-F22090DB107F@FreeBSD.org> References: <1452020032.1320.21.camel@freebsd.org> <7EE8F65E-7485-4FA9-A136-F22090DB107F@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2016 00:27:40 -0000 On Thu, 2016-01-07 at 23:57 +0100, Dimitry Andric wrote: > On 05 Jan 2016, at 19:53, Ian Lepore wrote: > > > > On Tue, 2016-01-05 at 11:35 -0700, Warner Losh wrote: > ... > > > There's a projects/clang-380-import that you might want to try... > > > > It's a non-starter for us, because unfortunately they appear to > > have > > removed support for the -arm-use-movt=0 command line option, so now > > we > > can't build ubldr or kernel modules. > > FYI, I have added a -mno-movt option for this purpose upstream, and > imported a newer snapshot into the clang380-import branch. As of > r293384, it now uses the new option spelling for modules, if your > clang > is 3.8.0 or higher. > > -Dimitry > I've updated to that and I'm still getting this error: cc1_main.o: In function `ForcePassLinking': [...]/src/usr.bin/clang/clang/../../../contrib/llvm/include/llvm/LinkAllPasses.h:194: undefined reference to `llvm::sys::RunningOnValgrind()' c++: error: linker command failed with exit code 1 (use -v to see invocation) --- clang.full --- *** [clang.full] Error code 1 I can apparently make it go away just by commenting out the line it complains about, so I'm forging ahead with that for now to see if I can do more testing. -- Ian From owner-freebsd-toolchain@freebsd.org Sat Jan 9 03:46:15 2016 Return-Path: Delivered-To: freebsd-toolchain@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 B6705A680CB for ; Sat, 9 Jan 2016 03:46:15 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-3.reflexion.net [208.70.210.3]) (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 71E171BCF for ; Sat, 9 Jan 2016 03:46:14 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 22983 invoked from network); 9 Jan 2016 03:46:08 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 9 Jan 2016 03:46:08 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Fri, 08 Jan 2016 22:46:05 -0500 (EST) Received: (qmail 15542 invoked from network); 9 Jan 2016 03:46:05 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 9 Jan 2016 03:46:05 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 116551C43CA; Fri, 8 Jan 2016 19:46:01 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: Bug 205663 Clang getting Bus Errors (arm SCLTR Bit[12]==1 context): Reported fixed on llvm's trunk From: Mark Millard In-Reply-To: <7EE8F65E-7485-4FA9-A136-F22090DB107F@FreeBSD.org> Date: Fri, 8 Jan 2016 19:46:06 -0800 Cc: Ian Lepore , Warner Losh , freebsd-arm , FreeBSD Toolchain Content-Transfer-Encoding: quoted-printable Message-Id: <92264003-CF0E-4624-A28A-8AFB7C663BFB@dsl-only.net> References: <1452020032.1320.21.camel@freebsd.org> <7EE8F65E-7485-4FA9-A136-F22090DB107F@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2016 03:46:15 -0000 On 2016-Jan-7, at 2:57 PM, Dimitry Andric wrote: >=20 > On 05 Jan 2016, at 19:53, Ian Lepore wrote: >>=20 >> On Tue, 2016-01-05 at 11:35 -0700, Warner Losh wrote: > ... >>> There's a projects/clang-380-import that you might want to try... >>=20 >> It's a non-starter for us, because unfortunately they appear to have >> removed support for the -arm-use-movt=3D0 command line option, so now = we >> can't build ubldr or kernel modules. >=20 > FYI, I have added a -mno-movt option for this purpose upstream, and > imported a newer snapshot into the clang380-import branch. As of > r293384, it now uses the new option spelling for modules, if your = clang > is 3.8.0 or higher. >=20 > -Dimitry I've not been able to get to the point of running clang++ 3.8 on the = rpi2 yet: R_ARM_CALL and R_ARM_JUMP24 relocation truncations during the = cross build's buildworld interfere. I've no clue just what you expect the status of things to be so this = note is just an FYI on what happened when I tried to cross build from an = amd64 context targetting an armv6 context, also using "-march=3Darmv7a = -mcpu=3Dcortex-a7 -mno-unaligned-access". Yesterday I cloned an amd64 virtual box virtual machine that I run = FreeBSD 11.0-CURRENT in and updated the cloned copy's /usr/src/ to = base/projects/clang380-import -r293417. buildworld, buildkernel and the = installs for amd64 went fine. Then today I updated /usr/src to -r293430 and attempted buildworld = buildkernel targeting armv6 with "-march=3Darmv7a -mcpu=3Dcortex-a7 = -mno-unaligned-access". I ended up with: > --- all_subdir_clang --- > clang++: error: linker command failed with exit code 1 (use -v to see = invocation) > *** [clang.full] Error code 1 Looking in the script output I find relocation truncation notices for = R_ARM_CALL and R_ARM_JUMP24 usage: > --- all_subdir_usr.bin --- > /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/crt1.o: In function = `__start': . . . > --- all_subdir_usr.bin --- > /usr/src/lib/csu/arm/crt1.c:(.text+0xc4): relocation truncated to fit: = R_ARM_CALL against symbol `atexit' defined in .text section in = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/libc.a(atexit.o) . . . > --- all_subdir_usr.bin --- > /usr/src/lib/csu/arm/crt1.c:(.text+0xcc): relocation truncated to fit: = R_ARM_CALL against symbol `_init_tls' defined in .text section in = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/libc.a(tls.o) > /usr/src/lib/csu/arm/crt1.c:(.text+0xe0): relocation truncated to fit: = R_ARM_CALL against symbol `atexit' defined in .text section in = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/libc.a(atexit.o) > /usr/src/lib/csu/arm/crt1.c:(.text+0x19c): relocation truncated to = fit: R_ARM_JUMP24 against symbol `exit' defined in .text section in = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/libc.a(exit.o) > /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/crt1.o: In function = `finalizer': > /usr/src/lib/csu/arm/crt1.c:(.text+0x1f8): relocation truncated to = fit: R_ARM_JUMP24 against symbol `_fini' defined in .fini section in = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/crti.o . . . > --- all_subdir_usr.bin --- > cc1_main.o: In function `cc1_main(llvm::ArrayRef, char = const*, void*)': . . . > --- all_subdir_usr.bin --- > = /usr/src/usr.bin/clang/clang/../../../contrib/llvm/tools/clang/tools/drive= r/cc1_main.cpp:68: relocation truncated to fit: R_ARM_CALL against = symbol `operator new(unsigned int)' defined in .text section in = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/libc++.a(new.o) . . . > --- all_subdir_usr.bin --- > cc1_main.o: In function `std::__1::__allocate(unsigned int)': > /usr/obj/clang/arm.armv6/usr/src/tmp/usr/include/c++/v1/new:168: = relocation truncated to fit: R_ARM_CALL against symbol `operator = new(unsigned int)' defined in .text section in = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/libc++.a(new.o) . . . > --- all_subdir_usr.bin --- > cc1_main.o: In function `~shared_ptr': > /usr/obj/clang/arm.armv6/usr/src/tmp/usr/include/c++/v1/memory:4567: = relocation truncated to fit: R_ARM_CALL against symbol = `std::__1::__shared_weak_count::__release_shared()' defined in .text = section in = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/libc++.a(memory.o) > cc1_main.o: In function `cc1_main(llvm::ArrayRef, char = const*, void*)': > = /usr/src/usr.bin/clang/clang/../../../contrib/llvm/tools/clang/tools/drive= r/cc1_main.cpp:69: relocation truncated to fit: R_ARM_CALL against = symbol `operator new(unsigned int)' defined in .text section in = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/libc++.a(new.o) > cc1_main.o: In function `shared_ptr': > /usr/obj/clang/arm.armv6/usr/src/tmp/usr/include/c++/v1/memory:4254: = relocation truncated to fit: R_ARM_CALL against symbol = `std::__1::__shared_weak_count::__add_shared()' defined in .text section = in /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/libc++.a(memory.o) > cc1_main.o: In function = `_ZN4llvm11make_uniqueIN5clang28ObjectFilePCHContainerWriterEJEEENSt3__19e= nable_ifIXntsr3std8is_arrayIT_EE5valueENS3_10unique_ptrIS5_NS3_14default_d= eleteIS5_EEEEE4typeEDpOT0_': > = /usr/src/usr.bin/clang/clang/../../../contrib/llvm/include/llvm/ADT/STLExt= ras.h:405: additional relocation overflows omitted from the output I have -v in the command line options. I later show the link command and = -v output (with lots of paths omitted). First I show my src.conf = content: > TO_TYPE=3Darmv6 > TOOLS_TO_TYPE=3Darm-gnueabi > # > KERNCONF=3DRPI2-NODBG > TARGET=3Darm > .if ${.MAKE.LEVEL} =3D=3D 0 > TARGET_ARCH=3D${TO_TYPE} > .export TARGET_ARCH > .endif > # > WITH_FAST_DEPEND=3D > WITH_LIBCPLUSPLUS=3D > WITH_BINTOOLS_BOOTSTRAP=3D > WITH_CLANG=3D > WITH_CLANG_IS_CC=3D > WITH_CLANG_FULL=3D > WITH_LLDB=3D > WITH_CLANG_EXTRAS=3D > WITH_BOOT=3D > # > WITHOUT_LIB32=3D > WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=3D > WITHOUT_CLANG_BOOTSTRAP=3D > WITHOUT_GCC_BOOTSTRAP=3D > WITHOUT_GCC=3D > WITHOUT_GNUCXX=3D > # > NO_WERROR=3D > MALLOC_PRODUCTION=3D > # > WITH_DEBUG=3D > WITH_DEBUG_FILES=3D > # > .if ${.MAKE.LEVEL} =3D=3D 0 > XCC=3D/usr/bin/clang -v -target ${TO_TYPE}--freebsd11.0-gnueabi = -march=3Darmv7a -mcpu=3Dcortex-a7 -mno-unaligned-access > XCXX=3D/usr/bin/clang++ -v -target ${TO_TYPE}--freebsd11.0-gnueabi = -march=3Darmv7a -mcpu=3Dcortex-a7 -mno-unaligned-access > XCPP=3D/usr/bin/clang-cpp -v -target ${TO_TYPE}--freebsd11.0-gnueabi = -march=3Darmv7a -mcpu=3Dcortex-a7 -mno-unaligned-access > .export XCC > .export XCXX > .export XCPP > .endif > # > .if ${.MAKE.LEVEL} =3D=3D 0 > CC=3D/usr/bin/clang -v > CXX=3D/usr/bin/clang++ -v > CPP=3D/usr/bin/clang-cpp -v > .export CC > .export CXX > .export CPP > .endif As for the link command: > --- clang.full --- > /usr/bin/clang++ -v -target armv6--freebsd11.0-gnueabi -march=3Darmv7a = -mcpu=3Dcortex-a7 -mno-unaligned-access -target = armv6-gnueabi-freebsd11.0 --sysroot=3D/usr/obj/clang/arm.armv6/usr/src/tmp= -B/usr/obj/clang/arm.armv6/usr/src/tmp/usr/bin = --sysroot=3D/usr/obj/clang/arm.armv6/usr/src/tmp = -B/usr/obj/clang/arm.armv6/usr/src/tmp/usr/bin -O -pipe = -mfloat-abi=3Dsoftfp = -I/usr/src/usr.bin/clang/clang/../../../contrib/llvm/include = -I/usr/src/usr.bin/clang/clang/../../../contrib/llvm/tools/clang/include = -I/usr/src/usr.bin/clang/clang/../../../contrib/llvm/tools/clang/tools/dri= ver -I. = -I/usr/src/usr.bin/clang/clang/../../../contrib/llvm/../../lib/clang/inclu= de -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS = -D__STDC_CONSTANT_MACROS -DCLANG_ENABLE_ARCMT = -DCLANG_ENABLE_STATIC_ANALYZER -fno-strict-aliasing = -DLLVM_DEFAULT_TARGET_TRIPLE=3D\"armv6-gnueabi-freebsd11.0\" = -DLLVM_HOST_TRIPLE=3D\"armv6-unknown-freebsd11.0\" = -DDEFAULT_SYSROOT=3D\"\" -g -Qunused-arguments -std=3Dc++11 = -fno-exceptions -fno-rtti -stdlib=3Dlibc++ -Wno-c++11-extensions = -static -o clang.full cc1_main.o cc1as_main.o driver.o = /usr/obj/clang/arm.armv6/usr/src/usr.bin/clang/clang/../../../lib/clang/li= bclangfrontendtool/libclangfrontendtool.a . . . > = /usr/obj/clang/arm.armv6/usr/src/usr.bin/clang/clang/../../../lib/clang/li= bllvmsupport/libllvmsupport.a -lz -lncursesw -lpthread > FreeBSD clang version 3.8.0 (trunk 256945) (based on LLVM 3.8.0svn) > Target: armv6--freebsd11.0-gnueabi > Thread model: posix > InstalledDir: /usr/bin > "/usr/obj/clang/arm.armv6/usr/src/tmp/usr/bin/ld" = --sysroot=3D/usr/obj/clang/arm.armv6/usr/src/tmp -Bstatic -o clang.full = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/crt1.o=20 . . . > = /usr/obj/clang/arm.armv6/usr/src/usr.bin/clang/clang/../../../lib/clang/li= bllvmsupport/libllvmsupport.a -lz -lncursesw -lpthread -lc++ -lm -lgcc = -lgcc_eh -lc -lgcc -lgcc_eh = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/crtend.o = /usr/obj/clang/arm.armv6/usr/src/tmp/usr/lib/crtn.o =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-freebsd-toolchain@freebsd.org Sat Jan 9 14:02:22 2016 Return-Path: Delivered-To: freebsd-toolchain@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 30E3EA69ECE; Sat, 9 Jan 2016 14:02:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE6D215AC; Sat, 9 Jan 2016 14:02:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::c159:5a2a:f018:fee2] (unknown [IPv6:2001:7b8:3a7:0:c159:5a2a:f018:fee2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1301C2AC75; Sat, 9 Jan 2016 15:02:17 +0100 (CET) Subject: Re: Bug 205663 Clang getting Bus Errors (arm SCLTR Bit[12]==1 context): Reported fixed on llvm's trunk Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: multipart/signed; boundary="Apple-Mail=_90C86694-02E7-437A-A3BE-1414D618B40A"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.6b2 (ebbf3ef) From: Dimitry Andric In-Reply-To: <92264003-CF0E-4624-A28A-8AFB7C663BFB@dsl-only.net> Date: Sat, 9 Jan 2016 15:03:37 +0100 Cc: freebsd-arm , FreeBSD Toolchain , Ian Lepore Message-Id: <39774562-F76E-41E9-85E7-ABE257B013D6@FreeBSD.org> References: <1452020032.1320.21.camel@freebsd.org> <7EE8F65E-7485-4FA9-A136-F22090DB107F@FreeBSD.org> <92264003-CF0E-4624-A28A-8AFB7C663BFB@dsl-only.net> To: Mark Millard X-Mailer: Apple Mail (2.3112) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2016 14:02:22 -0000 --Apple-Mail=_90C86694-02E7-437A-A3BE-1414D618B40A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 09 Jan 2016, at 04:46, Mark Millard wrote: >=20 > On 2016-Jan-7, at 2:57 PM, Dimitry Andric wrote: ... >> FYI, I have added a -mno-movt option for this purpose upstream, and >> imported a newer snapshot into the clang380-import branch. As of >> r293384, it now uses the new option spelling for modules, if your = clang >> is 3.8.0 or higher. >>=20 >> -Dimitry >=20 > I've not been able to get to the point of running clang++ 3.8 on the = rpi2 yet: R_ARM_CALL and R_ARM_JUMP24 relocation truncations during the = cross build's buildworld interfere. Yes, this is caused by too large call distances. In other words, the clang executable is getting to big to link. Apparently we need to do some tricks with -mlongcall to fix this. As I am no arm expert, I welcome any patch submissions. :-) -Dimitry --Apple-Mail=_90C86694-02E7-437A-A3BE-1414D618B40A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.29 iEYEARECAAYFAlaRE00ACgkQsF6jCi4glqMbYQCghsC0QH3MmmrUFHqWtJ9jZXQW beoAoOEceiIGWKwjXg/52vnJMYh9cyfs =dait -----END PGP SIGNATURE----- --Apple-Mail=_90C86694-02E7-437A-A3BE-1414D618B40A-- From owner-freebsd-toolchain@freebsd.org Sat Jan 9 18:55:59 2016 Return-Path: Delivered-To: freebsd-toolchain@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 2BF12A69163 for ; Sat, 9 Jan 2016 18:55:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 028DA1A95 for ; Sat, 9 Jan 2016 18:55:58 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sat, 9 Jan 2016 18:56:30 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id u09Itoee004893; Sat, 9 Jan 2016 11:55:50 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1452365750.1523.9.camel@freebsd.org> Subject: Re: Bug 205663 Clang getting Bus Errors (arm SCLTR Bit[12]==1 context): Reported fixed on llvm's trunk From: Ian Lepore To: Dimitry Andric , Mark Millard Cc: freebsd-arm , FreeBSD Toolchain Date: Sat, 09 Jan 2016 11:55:50 -0700 In-Reply-To: <39774562-F76E-41E9-85E7-ABE257B013D6@FreeBSD.org> References: <1452020032.1320.21.camel@freebsd.org> <7EE8F65E-7485-4FA9-A136-F22090DB107F@FreeBSD.org> <92264003-CF0E-4624-A28A-8AFB7C663BFB@dsl-only.net> <39774562-F76E-41E9-85E7-ABE257B013D6@FreeBSD.org> Content-Type: multipart/mixed; boundary="=-l6GbdNs55QDkue5/IPHe" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2016 18:55:59 -0000 --=-l6GbdNs55QDkue5/IPHe Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Sat, 2016-01-09 at 15:03 +0100, Dimitry Andric wrote: > On 09 Jan 2016, at 04:46, Mark Millard wrote: > > > > On 2016-Jan-7, at 2:57 PM, Dimitry Andric > > wrote: > ... > > > FYI, I have added a -mno-movt option for this purpose upstream, > > > and > > > imported a newer snapshot into the clang380-import branch. As of > > > r293384, it now uses the new option spelling for modules, if your > > > clang > > > is 3.8.0 or higher. > > > > > > -Dimitry > > > > I've not been able to get to the point of running clang++ 3.8 on > > the rpi2 yet: R_ARM_CALL and R_ARM_JUMP24 relocation truncations > > during the cross build's buildworld interfere. > > Yes, this is caused by too large call distances. In other words, the > clang executable is getting to big to link. Apparently we need to do > some tricks with -mlongcall to fix this. As I am no arm expert, I > welcome any patch submissions. :-) > > -Dimitry > Here's the patch I got from Andy for the clang380 branch, modified with Warner's suggestion to use MACHINE_CPUARCH instead of MACHINE. With this I can get a working arm world that will build a runnable helloworld.c (and .cc) on a dreamplug. (I.e., it appears clang 3.8.0 fixes the problem we had with clang 3.7.x where it wouldn't run at all on armv4/5 systems). I have not tried compling anything complex yet. -- Ian --=-l6GbdNs55QDkue5/IPHe Content-Disposition: inline; filename="arm_clang_longcall.diff" Content-Type: text/x-patch; name="arm_clang_longcall.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: lib/clang/clang.lib.mk =================================================================== --- lib/clang/clang.lib.mk (revision 293584) +++ lib/clang/clang.lib.mk (working copy) @@ -6,4 +6,8 @@ LLVM_SRCS= ${.CURDIR}/../../../contrib/llvm INTERNALLIB= +.if ${MACHINE_CPUARCH} == "arm" +STATIC_CXXFLAGS+=-mlong-calls +.endif + .include Index: lib/csu/arm/Makefile =================================================================== --- lib/csu/arm/Makefile (revision 293584) +++ lib/csu/arm/Makefile (working copy) @@ -23,7 +23,7 @@ CLEANFILES+= crt1.s gcrt1.s Scrt1.s # directly compiled to .o files. crt1.s: crt1.c - ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c + ${CC} ${CFLAGS} -mlong-calls -S -o ${.TARGET} ${.CURDIR}/crt1.c sed ${SED_FIX_NOTE} ${.TARGET} crt1.o: crt1.s @@ -30,7 +30,7 @@ crt1.o: crt1.s ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c - ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c + ${CC} ${CFLAGS} -mlong-calls -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed ${SED_FIX_NOTE} ${.TARGET} gcrt1.o: gcrt1.s Index: usr.bin/clang/clang/Makefile =================================================================== --- usr.bin/clang/clang/Makefile (revision 293584) +++ usr.bin/clang/clang/Makefile (working copy) @@ -11,7 +11,11 @@ SRCS= cc1_main.cpp \ .if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= yes + +.if ${MACHINE_CPUARCH} == "arm" +CFLAGS+=-mlong-calls .endif +.endif LINKS= ${BINDIR}/clang ${BINDIR}/clang++ \ ${BINDIR}/clang ${BINDIR}/clang-cpp --=-l6GbdNs55QDkue5/IPHe--