<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 5, 2018 at 4:27 PM, Amaan Cheval <span dir="ltr"><<a href="mailto:amaan.cheval@gmail.com" target="_blank">amaan.cheval@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi! Thanks for the guidance, both of you! I think we're quite close<br>
now to integrating gnu-efi in and finally having the stub port boot as<br>
a UEFI application image. All the test exe's generated on my local<br>
tree are now dynamic libraries, so both Newlib and crtbeginS/crtendS<br>
issues have been resolved (see point 2 below for the relevant WIP<br>
patches).<br>
<br>
Here's what I've done:<br>
<br>
- Updated amd64.cfg as Joel instructed earlier - here I put "-shared"<br>
in LDFLAGS instead of CPU_CFLAGS because of configure trying to use<br>
CPU_CFLAGS in general, running into unresolved symbols coming from<br>
GCC's stub crt0.c, and falling down. Putting it in LDFLAGS lets me<br>
work around this, but I'd appreciate a thumbs-up on this being okay:<br>
<br>
<a href="https://github.com/AmaanC/rtems-gsoc18/commit/547ef85a7f176046b2cb06a34b1e312c4986e97f#diff-c64f46c71f828120e08bc4c8667f0525R18" rel="noreferrer" target="_blank">https://github.com/AmaanC/<wbr>rtems-gsoc18/commit/<wbr>547ef85a7f176046b2cb06a34b1e31<wbr>2c4986e97f#diff-<wbr>c64f46c71f828120e08bc4c8667f05<wbr>25R18</a><br>
<br></blockquote><div><br></div><div>This looks like the other BSPs.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- Updated GCC as follows, building on top of Joel's WIP patch to<br>
minimize bsp_specs:<br>
<br>
<a href="https://github.com/AmaanC/gcc/pull/1" rel="noreferrer" target="_blank">https://github.com/AmaanC/gcc/<wbr>pull/1</a></blockquote><div><br></div><div>This doesn't have much code to review either. I think it is OK.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
I made it a PR on my fork so viewing it commit-wise or as a whole diff<br>
is easier for you to review. I'll look into how to make and use<br>
multilib variants next.<br>
<br>
Let me know what you think (about the LDFLAGS workaround, and the<br>
approach for the GCC patch so far).<br></blockquote><div><br></div><div>The amd64.cfg file looks like I would expect. Not really a hack. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
On Mon, Jun 4, 2018 at 6:42 PM, Joel Sherrill <<a href="mailto:joel@rtems.org">joel@rtems.org</a>> wrote:<br>
><br>
><br>
> On Mon, Jun 4, 2018 at 5:44 AM, Sebastian Huber<br>
> <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-<wbr>brains.de</a>> wrote:<br>
>><br>
>><br>
>><br>
>> ----- Am 4. Jun 2018 um 12:20 schrieb Amaan Cheval <a href="mailto:amaan.cheval@gmail.com">amaan.cheval@gmail.com</a>:<br>
>><br>
>> > That's a good idea. That way based on the multilib variant, Newlib would<br>
>> > be<br>
>> > compiled using fPIC, yes?<br>
>><br>
>> Yes.<br>
><br>
><br>
> This would be desirable for the i386 as well. Having the RTEMS libraries as<br>
> dynamic libraries would be more natural under Deos.<br>
><br>
> Just a statement. Not a requirement on the GSoC project.<br>
>><br>
>><br>
>> ><br>
>> > Then I could simply figure out how to solve the crtbegin and crtend<br>
>> > dilemma<br>
>> > (which I believe should be easier), and use those to have a<br>
>> > dynamic/shared<br>
>> > RTEMS kernel + user application.<br>
>><br>
>> These files will be compiled with -fPIC as well.<br>
><br>
><br>
><br>
>><br>
>><br>
>> ><br>
>> > If that sounds right, I'll look into that first. Not familiar with the<br>
>> > GCC<br>
>> > source yet, but it should be doable.<br>
>><br>
>> Sorry, I have no idea how the x86_64 configuration of GCC works for RTEMS.<br>
>><br>
>> ><br>
>> ><br>
>> > On Mon, Jun 4, 2018, 3:43 PM Sebastian Huber <<br>
>> > <a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-<wbr>brains.de</a>> wrote:<br>
>> ><br>
>> >> Hello Amaan,<br>
>> >><br>
>> >> can't you add a new multilib variant which includes -fPIC to the GCC<br>
>> >> configuration for RTEMS?<br>
>> ______________________________<wbr>_________________<br>
>> devel mailing list<br>
>> <a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
>> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/devel</a><br>
><br>
><br>
</div></div></blockquote></div><br></div></div>