AW: [PATCH v3 2/3] amd64: Add to build

Jan.Sommer at dlr.de Jan.Sommer at dlr.de
Tue Feb 11 13:21:12 UTC 2020



> -----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?




More information about the devel mailing list