> -----Ursprüngliche Nachricht----- > Von: Joel Sherrill [mailto:j...@rtems.org] > Gesendet: Dienstag, 11. Februar 2020 14:29 > An: Sommer, Jan > Cc: Sebastian Huber; rtems-de...@rtems.org > Betreff: Re: [PATCH v3 2/3] amd64: Add to build > > > > On Tue, Feb 11, 2020, 7:21 AM <jan.som...@dlr.de> wrote: > > > > > > -----Ursprüngliche Nachricht----- > > Von: Sebastian Huber [mailto:sebastian.hu...@embedded-brains.de] > > Gesendet: Dienstag, 11. Februar 2020 13:22 > > An: Sommer, Jan; devel@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.
Sorry for the confusion. No, this is a patch for the rtems-libbsd library for the RTEMS amd64 BSP. Of course, given that the amd64 BSP is currently in a very rudimentary state, the created binaries won't run. I just had some time over the Christmas break and followed the guide to setup a development toolchain for the amd64 BSP and played around with rtems-libbsd. So I thought it would be a waste to wait until I have forgotten everything again, hence this patch set. The previous patch set for i386 is the one which is targeted for the pcx86 BSP family and should be a bit more relevant. Figuring out the include directory situation of FreeBSD was a bit tricky a first as it collects shared files for i386 and x86_64 in "x86" subdirectories, but once this worked for i386 getting support for amd64 was then quite straight forward. For me it was also a tutorial to get familiar with rtems-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@rtems.org > http://lists.rtems.org/mailman/listinfo/devel _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel