Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: netbsd-10, merging device-streams (xstreamtodev, rdbinfo)



Hi,

I went ahead and tried building the toolchain from
https://github.com/bebbo/amiga-gcc with netbsd-9.3, amd64.

The GNU Makefile does something like this (de-makified):
gcc .repos | sed -e 's/[[:blank:]]\+/ /g' |cut -d' ' -f2

To extract fields from that file, which is copied there from
default-repos earlier in the Makefile.

This file happens to mix spaces and tabs, and use multiple spaces in a
row. GNU cut behaviour is different from netbsd, as GNU seems to treat
multiple spaces as one space, and tabs as one space as well.

After editing default-repos to deal with this, it can start building.
It'll get as far as this:

/home/rvalles/work/amiga-gcc/projects/binutils/bfd/amigaos.c:4031:37:
warning: unused parameter 'ht' [-Wunused-parameter]
 amiga_purge (struct bfd_hash_table *ht, asection * sec, bool print)
                                     ^~
  CC       amigaoslink.lo
  CC       aout-amiga.lo
/home/rvalles/work/amiga-gcc/projects/binutils/bfd/aout-amiga.c:51:8:
error: unknown type name 'PTR'
 extern PTR alloca PARAMS ((size_t));
        ^~~
/home/rvalles/work/amiga-gcc/projects/binutils/bfd/aout-amiga.c:51:12:
error: conflicting types for 'alloca'
 extern PTR alloca PARAMS ((size_t));
            ^~~~~~
In file included from
/home/rvalles/work/amiga-gcc/projects/binutils/bfd/sysdep.h:40:0,
                 from
/home/rvalles/work/amiga-gcc/projects/binutils/bfd/aout-amiga.c:21:
/usr/include/stdlib.h:268:7: note: previous declaration of 'alloca' was here
 void *alloca(size_t);
       ^~~~~~
gmake[4]: *** [Makefile:1761: aout-amiga.lo] Error 1
make binutils bfd...failed

This is likely to do with our host gcc being older than expected.

Roc

On Mon, 20 Mar 2023 at 12:21, Roc Vallès <vallesroc%gmail.com@localhost> wrote:
>
> Hi David,
>
> Sent twice because I forgot to reply to all. My bad.
>
> On Sun, 19 Mar 2023 at 23:45, David Brownlee <abs%netbsd.org@localhost> wrote:
> > Does that seem reasonable?
>
> Yes. I imagine the reason only rdbinfo and xstreamtodev binaries were
> included before has to do with the install guide referencing exactly
> these two.
>
> > On a related note - could the README.md be updated to include a brief
> > note on each executable and what it does, plus a link back to your
> > github?
>
> This is no issue. I'll get this done in the repo shortly. Then it
> should be OK to just copy it over.
>
> > - Would anyone be interested in putting together a pkgsrc entry for
> > the tools to build device-streams? It would be nice to be able to
> > rebuild from any pkgsrc supporting box
>
> It would be nice to have. I do not know how hard this would be.
>
> Trying to run bebbo's script for preparing crossdev toolchain on
> netbsd would be a starting point. (I have only ever used Linux for
> AmigaOS crossdev)
>
> I might give it a try soon, on my previous x86 box (core2quad), where
> I have my x86 netbsd setup (which is 9.3 or a 10 snapshot, I haven't
> turned that machine on for months now).
>
>  Expectation is for it to blow up but it needs to be attempted regardless.
>
> > - Would you be interested in dual licencing your changes under GPL and
> > BSD (I would need to Christian E. Hopps also, but wanted to ask here
> > first). I'm toying with the idea of adding a full copy of the actual
> > source properly in the NetBSD tree and it's generally encouraged to
> > have things available as BSD licence. (Note a "No" answer will result
> > in an "OK", rather than waving of hands and decrying that the world is
> > ending :)
>
> I am OK with GPL+BSD licensing my changes.
>
> > Once again, thanks for the work!
>
> Thank you again for looking into this.
>
> - Roc


Home | Main Index | Thread Index | Old Index