<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 11, 2020, 7:21 AM <<a href="mailto:Jan.Sommer@dlr.de">Jan.Sommer@dlr.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> -----Ursprüngliche Nachricht-----<br>
> Von: Sebastian Huber [mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank" rel="noreferrer">sebastian.huber@embedded-brains.de</a>]<br>
> Gesendet: Dienstag, 11. Februar 2020 13:22<br>
> An: Sommer, Jan; <a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
> Betreff: Re: [PATCH v3 2/3] amd64: Add to build<br>
> <br>
> On 11/02/2020 13:06, Jan Sommer wrote:<br>
> <br>
> > diff --git a/waf_libbsd.py b/waf_libbsd.py<br>
> > index 84f22b76..3b1f2d16 100644<br>
> > --- a/waf_libbsd.py<br>
> > +++ b/waf_libbsd.py<br>
> > @@ -197,6 +197,10 @@ class Builder(builder.ModuleManager):<br>
> > if 'cpu-include-paths' in config:<br>
> > cpu = bld.get_env()['RTEMS_ARCH']<br>
> > if cpu == "i386":<br>
> > + cpu = 'i386'<br>
> What is the purpose of this assignment?<br>
<br>
Sorry, I deleted this, but must have recovered it when preparing the patchset.<br>
<br>
> > + includes += ['freebsd/sys/x86/include']<br>
> > + if cpu == "x86_64":<br>
> > + cpu = 'amd64'<br>
> > includes += ['freebsd/sys/x86/include']<br>
> > for i in config['cpu-include-paths']:<br>
> > includes += [i.replace('@CPU@', cpu)]<br>
> I am not sure what this should do. Here cpu x86_64 seems to be renamed<br>
> to amd64? Should it be named amd64 in general?<br>
<br>
The problem is that the RTEMS_ARCH and the compiler prefix is x86_64, however in FreeBSD the related files are in amd64 subdirectories.<br>
libbsd.py uses @CPU@ to create the architecture specific include directories which then yields sys/x86_64/include for example, but should create sys/amd64/include.<br>
<br>
Before my last patch set, cpu was overridden to x86 for i386, so I thought doing something similar saves me the trouble with the include directories here.<br>
Do you maybe have a more elegant solution?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The GNU target for the toolchain is x86_64 for 64 but tools. I didn't invent that. This looks like a reasonable accommodation.</div><div dir="auto"><br></div><div dir="auto">I want to make sure I understand. This is still the 32 bit pcx86 BSP and toolchain but it has to use the amd64 Freebsd directory for some support code in libbsd. </div><div dir="auto"><br></div><div dir="auto">This sounds like the same type of unfortunate hack required if we integrated code that use x86 or ppc for directory names. </div><div dir="auto"><br></div><div dir="auto">--joel</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div></div>