On Tue, Feb 16, 2021 at 12:59 PM Antonio Borneo <[email protected]>
wrote:

> On Tue, Feb 16, 2021 at 9:25 PM Tim Newsome <[email protected]> wrote:
> >
> > I'm working on sprucing up FreeRTOS.c, and I want to keep a map of TCB
> address to thread id. (Currently they're the same, but that doesn't work
> out so well when bit 32 is set, and gdb sends you a negative thread id into
> an int64, ...) linux.c does something similar, by implementing a linked
> list, and linear search. That's fine, but it's 2021. We shouldn't have to
> write our own linked list implementations anymore. (And indeed, list.h
> provides one.) Really I just want to use a hash map and not worry about
> anything.
> >
> > I'm looking at gnulib, which consists of a bunch of C code that you can
> just use in your GPL projects. It works by actually copying sources into
> your tree, instead of linking against some other library on the system.
> They promise the code is portable.
> >
> > Is this something I can use in OpenOCD, or should I write something less
> efficient myself?
>
> Hi Tim,
>
> I have just randomly sampled files in gnulib. The licenses are
> heterogeneous; GPL v2 and v3, LGPL, maybe more...
> OpenOCD is GPLv2 (or later), so files that are GPLv3 or GPLv2-only are
> currently incompatible.
> Have you already identified the files in gnulib that you plan to use?
>

I think I'd need:
attribute.h           gl_anyrbtree_list2.h    gl_anytree_oset.h
 gl_rbtreehash_list.c  limits.in.h   stdint.in.h
gl_anyhash1.h         gl_anytreehash_list1.h  gl_list.c
 gl_rbtreehash_list.h  Makefile.am   sys_types.in.h
gl_anyhash2.h         gl_anytreehash_list2.h  gl_list.h
 gl_rbtree_ordered.h   Makefile.in   xsize.c
gl_anyhash_primes.h   gl_anytree_list1.h      gl_oset.c
 gl_rbtree_oset.c      size_max.h    xsize.h
gl_anyrbtree_list1.h  gl_anytree_list2.h      gl_oset.h
 gl_rbtree_oset.h      stdbool.in.h

It appears those all say GPLv3 or later. However,
https://www.gnu.org/software/gnulib/manual/html_node/Gnulib-licensing.html
says that you need to look in a different place for the actual license
info.
https://git.savannah.gnu.org/cgit/gnulib.git/tree/modules/rbtreehash-list
says the license for the module I'm grabbing is "GPL." No version number,
though. :-(

So, maybe it's compatible with "GPLv2 (or later)"? Do you know the answer
to this question? I assume that GNU has a well-defined meaning for "GPL"
somewhere.

Tim


>
> Antonio
>
> >
> > (Really my preferred option would be to switch OpenOCD to use C++, then
> I can use STL and a number of other convenient features.)
> >
> > Tim
>
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to