Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jan 2016 14:32:01 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Russell Haley <russ.haley@gmail.com>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Bug 205663 Clang getting Bus Errors (arm SCLTR Bit[12]==1 context): Reported fixed on llvm's trunk
Message-ID:  <CANCZdfq5yXtMQ%2Bfm7j_xAWkmnVdGsJj%2BjQEfhTiOa_0eE8_V8Q@mail.gmail.com>
In-Reply-To: <1452024493.1320.37.camel@freebsd.org>
References:  <C90F0ABA-3C59-4FE1-AAB4-99F8FF32FB24@dsl-only.net> <CANCZdfoWDg_ZX8zxqRV2-Q6teYf_Ef4f3VKB0fhb0sikcW3hUA@mail.gmail.com> <1452020032.1320.21.camel@freebsd.org> <CABx9NuSoEK%2BtoSWGnO98_noZf3N_-D4Vdmpy_gNroJdYtZKoPA@mail.gmail.com> <1452024493.1320.37.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 5, 2016 at 1:08 PM, Ian Lepore <ian@freebsd.org> wrote:

> On Tue, 2016-01-05 at 12:05 -0800, Russell Haley wrote:
> > On Tue, Jan 5, 2016 at 10:53 AM, Ian Lepore <ian@freebsd.org> wrote:
> > >
> > > On Tue, 2016-01-05 at 11:35 -0700, Warner Losh wrote:
> > > > On Tue, Jan 5, 2016 at 11:27 AM, Mark Millard <
> > > > markmi@dsl-only.net>
> > > > 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.
> >
> > Does this mean FreeBSD can't ever move to clang 3.8?
> >
> > Russ
>
> No, it means we have to figure out how we're going to fix or workaround
> the situation before clang 3.8 can get moved from its experimental
> branch into -current.  Whatever we come up with, we can make a local
> patch, and submit the change back upstream.
>

Thankfully the build system can use the clang version to detect the right
thing to do, though if we aren't careful this may break building the system
with the upstream llvm as an external compiler. But if it is already broken,
release notes will document not to try that and a locally defined flag will
drive the point home by causing an immediate error for the external
toolchain case.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfq5yXtMQ%2Bfm7j_xAWkmnVdGsJj%2BjQEfhTiOa_0eE8_V8Q>