tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: clang/llvm on aarch64



On Wed, 2019-08-28 at 14:23 +0100, Robert Swindells wrote:
> On 8/28/19, Michał Górny <mgorny%gentoo.org@localhost> wrote:
> > On Wed, 2019-08-28 at 02:40 +0100, Robert Swindells wrote:
> > > I wrote:
> > > > It looks like clang++ on aarch64 is broken too, but in a different way.
> > > > 
> > > > Static constructors don't get called. I do have a small test application
> > > > that demonstrates this.
> > > 
> > > This looks to be caused by clang/llvm putting the references to the
> > > constructor in the .ctors section instead of the .init_array section as
> > > required by the ABI.
> > > 
> > > There is code in clang to select this and a web search turns up some
> > > patches from 2014 to enable it for all AARCH64 ELF platforms but the
> > > source tree seems to have changed a lot since then.
> > 
> > I see the following for Generic_ELF thingy:
> > 
> >  if (DriverArgs.hasFlag(options::OPT_fuse_init_array,
> >                         options::OPT_fno_use_init_array, UseInitArrayDefault))
> >    CC1Args.push_back("-fuse-init-array");
> > 
> > NetBSD should be using that.  Could you verify with 'clang -v' whether
> > it's being passed to cc1?
> 
> % clang -v
> clang version 8.0.1 (tags/RELEASE_801/final)
> Target: aarch64-unknown-netbsd9.99
> Thread model: posix
> InstalledDir: /usr/pkg/bin

I'm sorry for not being precise.  I meant compiling and linking
an actual program with '-v' (== verbose).


-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: This is a digitally signed message part



Home | Main Index | Thread Index | Old Index