[PATCH] Skip check for dlopen() when compiling libstdcxx with avrlibc

Jonathan Wakely jwakely@redhat.com
Mon Sep 3 09:05:00 GMT 2018


On 02/09/18 23:36 +0300, Adrian Stratulat wrote:
>On Sun, Sep 2, 2018 at 11:00 PM Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>> On 02/09/18 22:18 +0300, Adrian Stratulat wrote:
>> >Hello,
>> >
>> >II tried compiling avr-gcc (AVR 8-bit target) with libstdcxx support,
>> >and even if I set the configure parameters to be "disable-shared" and
>> >"enable-static", the "configure" step fails because it checks for
>> >dlopen() support in avrlibc (which doesn't exist).
>>
>> Why has nobody noticed this problem before? You're not the first
>> person to build avr-gcc. Does nobody else build libstdc++ for AVR?
>
>Libstdc++ support for avr-gcc was added in 2016 [1] and wasn't
>used widely, as the avr-libc project considers libstdc++ to be
>unsupported [2].
>When the initial developer tried to get the library added to the
>ArchLinux package system, the package maintainer hit the same
>error I was seeing [3].
>Also, it seems that this corner-case of the config causes problems
>from time to time, on embedded/non-mainstream platforms ([4], [5]).

OK, that explains it, thanks.


>> >I see that in the newlib case, the failing step is skipped, so I've
>> >just added branch to the condition, to skip the same check for
>> >avrlibc.
>>
>> That seems reasonable.
>>
>> >Please double-check this patch, as it's my first commit to the GCC
>> >project, and I had to manually adjust a couple of things for the
>> >regeneration step to work out.
>>
>> Has it been tested? Does it work?
>
>For the AVR platform? Yes, I did test it and it works: compiled an
>avr-g++ instance with libstdc++ and then used a couple of features
>from C++17 (std::optional<> templates).

OK great. Unless Denis (AVR maintainer) objects I'll apply this to
trunk.




More information about the Libstdc++ mailing list