Re: armv7 targeting (on aarch64, via poudriere-devel): system's clang 13 rejected building devel/lllvm13

Dimitry Andric <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <91AD337B-6D40-4639-A43C-688699981167__13219.54498287$1637001746$gmane$org@FreeBSD.org>
On 15 Nov 2021, at 19:14, Mark Millard via arm <[email protected]> wrote:
> 
> There error was:
> 
> error: non-constant-expression cannot be narrowed from type 'long long' to 'std::size_t' (aka 'unsi
> gned int') in initializer list [-Wc++11-narrowing]
>  std::size_t resultBytes{size * elementBytes};
>                          ^~~~~~~~~~~~~~~~~~~
> /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.0.src/flang/runtime/misc-intrinsic.cpp:50:27: note: insert an explicit cast to silence this issue
>  std::size_t resultBytes{size * elementBytes};
>                          ^~~~~~~~~~~~~~~~~~~
>                          static_cast<size_t>( )

The flang subproject does quite a lot of mixing of size_t and uint64_t, assuming in various places that they are the same. You will also encounter similar errors when attempting to build it for e.g. i386, or other 32 bit architectures. I think it is quite a lot of work to get all of these right, and it should really be discussed upstream.

So for now, I would advise to only turn on the flang option for amd64 by default.

-Dimitry
signature.asc (application/pgp-signature, 223 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYZKpugAKCRCwXqMKLiCW
o68qAKDP8WfByS2UovTvl8L2lHFYdYuBFwCgqi2aK0EdPp2/jZ8CuDTUGX2s+Bg=
=xxGf
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.