Re: armv7 targeting (on aarch64, via poudriere-devel): system's clang 13 rejected building devel/lllvm13
Date: Mon, 15 Nov 2021 19:40:49 UTC
On 2021-Nov-15, at 11:35, Mark Millard <marklmi@yahoo.com> wrote:
> On 2021-Nov-15, at 10:40, Dimitry Andric <dim@FreeBSD.org> wrote:
>
>> On 15 Nov 2021, at 19:14, Mark Millard via arm <arm@freebsd.org> 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.
>
> flang was not being built:
>
> # more /usr/local/etc/poudriere.d/options/devel_llvm13/options
> # This file is auto-generated by 'make config'.
> # Options for llvm13-13.0.0
> _OPTIONS_READ=llvm13-13.0.0
> _FILE_COMPLETE_OPTIONS_LIST=BE_AMDGPU CLANG DOCS EXTRAS FLANG LIT LLD LLDB MLIR OPENMP PYCLANG BE_FREEBSD BE_NATIVE BE_STANDARD
> OPTIONS_FILE_SET+=BE_AMDGPU
> OPTIONS_FILE_SET+=CLANG
> OPTIONS_FILE_SET+=DOCS
> OPTIONS_FILE_SET+=EXTRAS
> OPTIONS_FILE_UNSET+=FLANG
> OPTIONS_FILE_SET+=LIT
> OPTIONS_FILE_SET+=LLD
> OPTIONS_FILE_SET+=LLDB
> OPTIONS_FILE_SET+=MLIR
> OPTIONS_FILE_UNSET+=OPENMP
> OPTIONS_FILE_UNSET+=PYCLANG
> OPTIONS_FILE_UNSET+=BE_FREEBSD
> OPTIONS_FILE_SET+=BE_NATIVE
> OPTIONS_FILE_UNSET+=BE_STANDARD
>
Hmm. I got that wrong, somehow the above was not used.
From the log file:
---Begin OPTIONS List---
===> The following configuration options are available for llvm13-13.0.0_2:
BE_AMDGPU=on: AMD GPU backend (required by mesa)
CLANG=on: Build clang
DOCS=on: Build and/or install documentation
EXTRAS=on: Extra clang tools
FLANG=on: Flang FORTRAN compiler
LIT=on: Install lit and FileCheck test tools
LLD=on: Install lld, the LLVM linker
LLDB=on: Install lldb, the LLVM debugger
MLIR=on: Multi-Level Intermediate Representation
PYCLANG=on: Install python bindings to libclang
====> Options available for the single BACKENDS: you have to select exactly one of them
BE_FREEBSD=off: Backends for FreeBSD architectures
BE_NATIVE=off: Backend(s) for this architecture (ARM)
BE_STANDARD=on: All non-experimental backends
===> Use 'make config' to modify these settings
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)