[PATCH v3 2/3] amd64: Add to build
Joel Sherrill
joel at rtems.org
Tue Feb 11 13:29:17 UTC 2020
On Tue, Feb 11, 2020, 7:21 AM <Jan.Sommer at dlr.de> wrote:
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Sebastian Huber [mailto:sebastian.huber at embedded-brains.de]
> > Gesendet: Dienstag, 11. Februar 2020 13:22
> > An: Sommer, Jan; devel at rtems.org
> > Betreff: Re: [PATCH v3 2/3] amd64: Add to build
> >
> > On 11/02/2020 13:06, Jan Sommer wrote:
> >
> > > diff --git a/waf_libbsd.py b/waf_libbsd.py
> > > index 84f22b76..3b1f2d16 100644
> > > --- a/waf_libbsd.py
> > > +++ b/waf_libbsd.py
> > > @@ -197,6 +197,10 @@ class Builder(builder.ModuleManager):
> > > if 'cpu-include-paths' in config:
> > > cpu = bld.get_env()['RTEMS_ARCH']
> > > if cpu == "i386":
> > > + cpu = 'i386'
> > What is the purpose of this assignment?
>
> Sorry, I deleted this, but must have recovered it when preparing the
> patchset.
>
> > > + includes += ['freebsd/sys/x86/include']
> > > + if cpu == "x86_64":
> > > + cpu = 'amd64'
> > > includes += ['freebsd/sys/x86/include']
> > > for i in config['cpu-include-paths']:
> > > includes += [i.replace('@CPU@', cpu)]
> > I am not sure what this should do. Here cpu x86_64 seems to be renamed
> > to amd64? Should it be named amd64 in general?
>
> The problem is that the RTEMS_ARCH and the compiler prefix is x86_64,
> however in FreeBSD the related files are in amd64 subdirectories.
> 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.
>
> 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.
> Do you maybe have a more elegant solution?
>
The GNU target for the toolchain is x86_64 for 64 but tools. I didn't
invent that. This looks like a reasonable accommodation.
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.
This sounds like the same type of unfortunate hack required if we
integrated code that use x86 or ppc for directory names.
--joel
>
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200211/b2dc2a47/attachment.html>
More information about the devel
mailing list