Failed to build rtems 5.1 by rsb under debian 11 with LLVM DebugInfo enabled

起飞的老杨sprhawk sprhawk at gmail.com
Sun Jul 3 04:13:34 UTC 2022


Hello there.

I found the reason.

The c++ features used inside Symbolize.h is std c++ 14, but c++ options
listed in wscript in all projects under rtems-tools has -std=c++11, which
cause it failed to build.

I manually modified the options in wscript, it all compiled

The next question is: how can I put a patch to let RSB build with
-std=c++14?

On Fri, Jul 1, 2022 at 11:19 PM 起飞的老杨sprhawk <sprhawk at gmail.com> wrote:

> For a simple a.cxx:
>
> #include <llvm/DebugInfo/Symbolize/Symbolize.h>
> #include <llvm/Support/Path.h>
> #include <llvm/ADT/SmallVector.h>
>
> int main() {
>
>   llvm::SmallVector<char, 5> results;
>   return 0;
> }
>
> compiling with: gcc -O0 -c $(llvm-config --cppflags) a.cxx
> llvm-config --cppflags output:  -I/usr/lib/llvm-11/include -D_GNU_SOURCE
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
>
> it compiled.
>
> On Fri, Jul 1, 2022 at 9:16 PM Sebastian Huber <
> sebastian.huber at embedded-brains.de> wrote:
>
>> On 01.07.22 15:13, 起飞的老杨sprhawk wrote:
>> > Yes, it is indeed.
>> >
>> > But I see in every llvm-9, llvm-11, llvm-15, they all have the same
>> > definitions
>> >
>> > 415 void ELFFile<ELFT>::getRelocationTypeName(uint32_t Type,
>> > 416                                           SmallVectorImpl<char>
>> > &Result) const {
>> > 417   if (!isMipsELF64()) {
>> > 418     StringRef Name = getRelocationTypeName(Type);
>> > 419     Result.append(Name.begin(), Name.end());
>> >
>> > So I think they may not be an error to LLVM, or it may be some
>> > incompatibility to gcc + llvm?
>>
>> What happens if you include this header file in a single source file and
>> try to build it with gcc or clang?
>>
>> --
>> embedded brains GmbH
>> Herr Sebastian HUBER
>> Dornierstr. 4
>> 82178 Puchheim
>> Germany
>> email: sebastian.huber at embedded-brains.de
>> phone: +49-89-18 94 741 - 16
>> fax:   +49-89-18 94 741 - 08
>>
>> Registergericht: Amtsgericht München
>> Registernummer: HRB 157899
>> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
>> Unsere Datenschutzerklärung finden Sie hier:
>> https://embedded-brains.de/datenschutzerklaerung/
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20220703/df604dc8/attachment.htm>


More information about the users mailing list