Building a library for RTEMS

Sambeet Panigrahi sambeet161616 at gmail.com
Sat Jul 16 23:51:32 UTC 2016


I tried archiving again with rtems-4.11-ar and it works.But I just wanted
to know doesn't RTEMS support LTO?Why the archiving did not work with
rtems-4.11-gcc-ar?

On Jul 16, 2016 5:25 AM, "Sambeet Panigrahi" <sambeet161616 at gmail.com>
wrote:

> Sir,
> I made the necessary changes
>
> First I gave the commmand:
>
> sambeet at Holmes ~/NewRockPort/x86/Build/rock/rtt_test $
> /home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/bin/i386-rtems4.11-g++
> -Wall -c displayer.cpp -Ihome/sambeet/NewRockPort/x86/Build/rock/rtt_test/
> -I/home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/i386-rtems4.11/pc586/lib/include/
>
> This file gave me the required object file
>
> sambeet at Holmes ~/NewRockPort/x86/Build/rock/rtt_test $ ls
> displayer.cpp  displayer.o  rtt_hello.hpp  rtt_test.orogen
>  rtt_testTypes.hpp
>
> Then I use the archiver
>
> sambeet at Holmes ~/NewRockPort/x86/Build/rock/rtt_test $
> /home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/bin/i386-rtems4.11-gcc-ar
> -cvq libdisplayer.a *.o
>
> But I get the output
>
> /home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/bin/i386-rtems4.11-gcc-ar:
> Cannot find plugin 'liblto_plugin.so'
>
> I found that this plugin is finds the LTO wrapper for linker time
> optimization.I found the LTO wrapper though inside gcc.I tried to disable
> linker optimization but with no success.
>
> sambeet at Holmes ~/NewRockPort/x86/Build/rock/rtt_test $
> /home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/bin/i386-rtems4.11-gcc-ar
> -cvq -fno-use-linker-plugin libdisplayer.a *.o
> /home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/bin/i386-rtems4.11-gcc-ar:
> Cannot find plugin 'liblto_plugin.so'
>
> How do I resolve this error?
>
>
>
>
> On Fri, Jul 15, 2016 at 5:11 AM, Chris Johns <chrisj at rtems.org> wrote:
>
>> On 15/07/2016 06:19, Sambeet Panigrahi wrote:
>>
>>>
>>> When I am trying to compile the above I get a link failure error:
>>>
>>> sambeet at Holmes ~/NewRockPort/x86/Build/rock/rtt_test $
>>>
>>> /home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/bin/i386-rtems4.11-g++
>>> displayer.cpp -Ihome/sambeet/NewRockPort/x86/Build/rock/rtt_test/
>>>
>>> -I/home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/i386-rtems4.11/pc586/lib/include/
>>>
>>
>> This command creates an executable. What you are seeing are the linker
>> errors because you have not provided a suitable path to the RTEMS libraries
>> for your BSP. To make a library you need to create an object file and then
>> create a library containing that file.
>>
>> How can I build my library and create an executable for i386-rtems?
>>>
>>
>> I suggest you search the net for ways to do this. A quick google gave me
>> ..
>>
>> http://www.cs.dartmouth.edu/~campbell/cs50/buildlib.html
>>
>> RTEMS is statically linked so we only use static libraries, ie .a files.
>> You need to substitute 'mygcc' and 'gcc' with 'i386-rtems4.11-g++' and 'ar'
>> with 'i386-rtems4.11-ar'.
>>
>> Chris
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160717/afec2b5b/attachment-0002.html>


More information about the users mailing list