Re: [kvm-unit-tests PATCH v2 3/4] configure: Support cross compiling with clang

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

 



On Wed, Sep 11, 2024 at 10:24:34AM GMT, Nicholas Piggin wrote:
> On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote:
> > When a user specifies the compiler with --cc assume it's already
> > fully named, even if the user also specifies a cross-prefix. This
> > allows clang to be selected for the compiler, which doesn't use
> > prefixes, but also still provide a cross prefix for binutils. If
> > a user needs a prefix on the compiler that they specify with --cc,
> > then they'll just have to specify it with the prefix prepended.
> 
> Makes sense.
> 
> > Also ensure user provided cflags are used when testing the compiler,
> > since the flags may drastically change behavior, such as the --target
> > flag for clang.
> 
> Could be a separate patch but no big deal.
> 
> >
> > With these changes it's possible to cross compile for riscv with
> > clang after configuring with
> >
> >  ./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' \
> >              --cross-prefix=riscv64-linux-gnu-
> 
> Nice. Perhaps add a recipe to README?

Sure.

> 
> Reviewed-by: Nicholas Piggin <npiggin@xxxxxxxxx>

Thanks,
drew




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux