Discussion:
Add memcpy support for SPARC
Aditya Upadhyay
2018-05-24 19:09:09 UTC
Permalink
Hi Developers,

Is this ok to add memcpy implementation from Open Solaries?

https://bitbucket.org/a3217055/illumos-gate-import/src/741592a55c4c9746705ce0fd9232f5acded43ed0/usr/src/lib/libc/sparc/gen/memcpy.s?at=default&fileviewer=file-view-default

If yes, then Could you please tell us rules about modifying the
Licance of third party code?

Thanks,
Aditya Upadhyay
Joel Sherrill
2018-05-24 19:14:28 UTC
Permalink
Post by Aditya Upadhyay
Hi Developers,
Is this ok to add memcpy implementation from Open Solaries?
https://bitbucket.org/a3217055/illumos-gate-import/src/741592a55c4c9746705ce0fd9232f5acded43ed0/usr/src/lib/libc/sparc/gen/memcpy.s?at=default&fileviewer=file-view-default
If yes, then Could you please tell us rules about modifying the
Licance of third party code?
Per earlier email with Corinna, the license should be included in the
COPYING file at the top of the tree.
Post by Aditya Upadhyay
Thanks,
Aditya Upadhyay
Eric Blake
2018-05-24 19:19:26 UTC
Permalink
Post by Aditya Upadhyay
Hi Developers,
Is this ok to add memcpy implementation from Open Solaries?
https://bitbucket.org/a3217055/illumos-gate-import/src/741592a55c4c9746705ce0fd9232f5acded43ed0/usr/src/lib/libc/sparc/gen/memcpy.s?at=default&fileviewer=file-view-default
That uses the CDDL license. Nothing else in newlib does.

The FSF claims CDDL and GPL are incompatible; others refute this claim
(such as
https://opensource.stackexchange.com/questions/2094/are-cddl-and-gpl-really-incompatible),
but I'm not a lawyer to say who is right. At any rate, given the
controversy, my gut feel is that you should NOT copy any CDDL code into
newlib, unless YOU provide the lawyers to back up your claim.
Post by Aditya Upadhyay
If yes, then Could you please tell us rules about modifying the
Licance of third party code?
I _do_ know that you CANNOT modify the existing license on ANY file that
you are importing from a third party, since you are not the license
holder (some permissive licenses allow you to relicense code under a
more restrictive license of your choice, which is different from
modifying the existing license - but I doubt CDDL falls into that
category). And of course, using that code without copying the license
statement is a bad idea.

So that probably means using OpenSolaris code as your base point is a
bad idea.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Joel Sherrill
2018-05-24 20:43:49 UTC
Permalink
Post by Aditya Upadhyay
Post by Aditya Upadhyay
Hi Developers,
Is this ok to add memcpy implementation from Open Solaries?
https://bitbucket.org/a3217055/illumos-gate-import/src/741592a55c4c9746705ce0fd9232f5acded43ed0/usr/src/lib/libc/sparc/gen/memcpy.s?at=default&fileviewer=file-view-default
That uses the CDDL license. Nothing else in newlib does.
The FSF claims CDDL and GPL are incompatible; others refute this claim
(such as
https://opensource.stackexchange.com/questions/2094/are-cddl-and-gpl-really-incompatible),
but I'm not a lawyer to say who is right. At any rate, given the
controversy, my gut feel is that you should NOT copy any CDDL code into
newlib, unless YOU provide the lawyers to back up your claim.
Post by Aditya Upadhyay
If yes, then Could you please tell us rules about modifying the
Licance of third party code?
I _do_ know that you CANNOT modify the existing license on ANY file that
you are importing from a third party, since you are not the license
holder (some permissive licenses allow you to relicense code under a
more restrictive license of your choice, which is different from
modifying the existing license - but I doubt CDDL falls into that
category). And of course, using that code without copying the license
statement is a bad idea.
So that probably means using OpenSolaris code as your base point is a
bad idea.
Ok. Since you and Corinna disagree, let's be safe. Do you have another
source for an acceptablely licensed SPARC V7 mem* and str*?
Post by Aditya Upadhyay
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Joel Sherrill
2018-05-24 20:49:23 UTC
Permalink
Post by Joel Sherrill
Post by Aditya Upadhyay
Post by Aditya Upadhyay
Hi Developers,
Is this ok to add memcpy implementation from Open Solaries?
https://bitbucket.org/a3217055/illumos-gate-import/src/741592a55c4c9746705ce0fd9232f5acded43ed0/usr/src/lib/libc/sparc/gen/memcpy.s?at=default&fileviewer=file-view-default
That uses the CDDL license. Nothing else in newlib does.
The FSF claims CDDL and GPL are incompatible; others refute this claim
(such as
https://opensource.stackexchange.com/questions/2094/are-cddl-and-gpl-really-incompatible),
but I'm not a lawyer to say who is right. At any rate, given the
controversy, my gut feel is that you should NOT copy any CDDL code into
newlib, unless YOU provide the lawyers to back up your claim.
Post by Aditya Upadhyay
If yes, then Could you please tell us rules about modifying the
Licance of third party code?
I _do_ know that you CANNOT modify the existing license on ANY file that
you are importing from a third party, since you are not the license
holder (some permissive licenses allow you to relicense code under a
more restrictive license of your choice, which is different from
modifying the existing license - but I doubt CDDL falls into that
category). And of course, using that code without copying the license
statement is a bad idea.
So that probably means using OpenSolaris code as your base point is a
bad idea.
Ok. Since you and Corinna disagree, let's be safe. Do you have another
source for an acceptablely licensed SPARC V7 mem* and str*?
The Attic for NetBSD has some but not the ones we want.

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/sparc/?only_with_tag=MAIN
Post by Joel Sherrill
Post by Aditya Upadhyay
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Gedare Bloom
2018-05-30 16:40:17 UTC
Permalink
Post by Joel Sherrill
Post by Aditya Upadhyay
Post by Aditya Upadhyay
Hi Developers,
Is this ok to add memcpy implementation from Open Solaries?
https://bitbucket.org/a3217055/illumos-gate-import/src/741592a55c4c9746705ce0fd9232f5acded43ed0/usr/src/lib/libc/sparc/gen/memcpy.s?at=default&fileviewer=file-view-default
That uses the CDDL license. Nothing else in newlib does.
The FSF claims CDDL and GPL are incompatible; others refute this claim
(such as
https://opensource.stackexchange.com/questions/2094/are-cddl-and-gpl-really-incompatible),
but I'm not a lawyer to say who is right. At any rate, given the
controversy, my gut feel is that you should NOT copy any CDDL code into
newlib, unless YOU provide the lawyers to back up your claim.
Regardless of the incompatibility question of CDDL with GPL, since
CDDL is not used anywhere in newlib, it would seem wise to avoid it.
(I don't trust any License that is longer than a page, regardless of
what anyone's lawyer says.)
Post by Joel Sherrill
Post by Aditya Upadhyay
Post by Aditya Upadhyay
If yes, then Could you please tell us rules about modifying the
Licance of third party code?
I _do_ know that you CANNOT modify the existing license on ANY file that
you are importing from a third party, since you are not the license
holder (some permissive licenses allow you to relicense code under a
more restrictive license of your choice, which is different from
modifying the existing license - but I doubt CDDL falls into that
category). And of course, using that code without copying the license
statement is a bad idea.
So that probably means using OpenSolaris code as your base point is a
bad idea.
Ok. Since you and Corinna disagree, let's be safe. Do you have another
source for an acceptablely licensed SPARC V7 mem* and str*?
My experience has been that netbsd has the best liberally licensed
sparc-v7 code base among general purpose OS (outside of Sun
derivatives). If you did not succeed there, you probably have to roll
your own.

Gedare
Joel Sherrill
2018-05-30 17:01:27 UTC
Permalink
Post by Aditya Upadhyay
Post by Joel Sherrill
Post by Aditya Upadhyay
Post by Aditya Upadhyay
Hi Developers,
Is this ok to add memcpy implementation from Open Solaries?
https://bitbucket.org/a3217055/illumos-gate-import/src/
741592a55c4c9746705ce0fd9232f5acded43ed0/usr/src/lib/libc/
sparc/gen/memcpy.s?at=default&fileviewer=file-view-default
Post by Joel Sherrill
Post by Aditya Upadhyay
That uses the CDDL license. Nothing else in newlib does.
The FSF claims CDDL and GPL are incompatible; others refute this claim
(such as
https://opensource.stackexchange.com/questions/
2094/are-cddl-and-gpl-really-incompatible),
Post by Joel Sherrill
Post by Aditya Upadhyay
but I'm not a lawyer to say who is right. At any rate, given the
controversy, my gut feel is that you should NOT copy any CDDL code into
newlib, unless YOU provide the lawyers to back up your claim.
Regardless of the incompatibility question of CDDL with GPL, since
CDDL is not used anywhere in newlib, it would seem wise to avoid it.
(I don't trust any License that is longer than a page, regardless of
what anyone's lawyer says.)
Post by Joel Sherrill
Post by Aditya Upadhyay
Post by Aditya Upadhyay
If yes, then Could you please tell us rules about modifying the
Licance of third party code?
I _do_ know that you CANNOT modify the existing license on ANY file that
you are importing from a third party, since you are not the license
holder (some permissive licenses allow you to relicense code under a
more restrictive license of your choice, which is different from
modifying the existing license - but I doubt CDDL falls into that
category). And of course, using that code without copying the license
statement is a bad idea.
So that probably means using OpenSolaris code as your base point is a
bad idea.
Ok. Since you and Corinna disagree, let's be safe. Do you have another
source for an acceptablely licensed SPARC V7 mem* and str*?
My experience has been that netbsd has the best liberally licensed
sparc-v7 code base among general purpose OS (outside of Sun
derivatives). If you did not succeed there, you probably have to roll
your own.
Is this the NetBSD source you would look at?

https://github.com/NetBSD/src/tree/netbsd-8/lib/libc/arch/sparc

I don't see any optimized string or memory methods. Am I missing them?


Unless someone has a source for these methods to be merged from,
I do not think it is a good investment of Salil's GSoC time to implement
SPARC
mem* and str* methods. There are other missing POSIX methods and multiple
others could go from 0 to available versus these SPARC methods which are
present but sub-optimal.

OTOH I do see the fenv.h support methods which is a good thing
for that. :)
Post by Aditya Upadhyay
Gedare
Loading...