RTEMS Release Snapshot: 5.0.0-m1912 (05 Dec 2019)

Michael Davidsaver mdavidsaver at gmail.com
Wed Dec 18 02:34:31 UTC 2019


On 12/16/19 10:31 PM, Sebastian Huber wrote:
> 
> Which packages did you install?

The entry point is "llvm-dev".

> aptitude search llvm|grep ^i
> i A libllvm6.0 - Modular compiler and toolchain technologies, runtime library
> i A libllvm7 - Modular compiler and toolchain technologies, runtime library
> i A libllvm7:i386 - Modular compiler and toolchain technologies, runtime library
> i A llvm - Low-Level Virtual Machine (LLVM)
> i A llvm-7 - Modular compiler and toolchain technologies
> i A llvm-7-dev - Modular compiler and toolchain technologies, libraries and headers
> i A llvm-7-runtime - Modular compiler and toolchain technologies, IR interpreter
> i  llvm-dev - Low-Level Virtual Machine (LLVM), libraries and headers
> i A llvm-runtime - Low-Level Virtual Machine (LLVM), bytecode interpreter



> $ llvm-config --version
> 7.0.1
> $ llvm-config --cxxflags
> -I/usr/lib/llvm-7/include  -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> $ llvm-config --ldflags
> -L/usr/lib/llvm-7/lib
> $ llvm-config --libs
> -lLLVM-7


> It seems you have the header files, but no library was found. Maybe we should only build the LLVM dependent features if both everything is present.

"/usr/lib/llvm-7/lib/libLLVM.so" exists (also "libLLVM-7.so"),
so presumably the -L search path isn't correct.


> It seems to be a bit more complicated:
> 
> https://lowlevelbits.org/building-an-llvm-based-tool.-lessons-learned/

This is an understatement.  I did at one point explore using LLVM.
The advice I found at the time was to use the static libraries
which I remember as a nightmare of interdependencies.
I'm not even slightly surprised to see missing symbols w/ LLVM.
llvm-config certainly helps with this.  It's a pity I didn't find out
about '--start-group' until later.

> $ ls -1 /usr/lib/llvm-7/lib/lib*|wc -l
> 234

(full disclosure, I also have libclang-dev installed)

> Please have a look at:
> 
> https://lists.rtems.org/pipermail/devel/2019-December/056517.html

This looks like the right idea, though I'm not sure how to test it.
I guess it will be in the next snapshot?


More information about the users mailing list