Hi Raymond, On 6/20/25 21:08, Raymond Mao wrote: > Hi Tom, > > On Fri, 20 Jun 2025 at 15:00, Tom Rini <tr...@konsulko.com> wrote: >> >> On Fri, Jun 20, 2025 at 02:00:09PM -0400, Raymond Mao wrote: >>> Hi Tom, >>> >>> On Fri, 20 Jun 2025 at 13:20, Tom Rini <tr...@konsulko.com> wrote: >>>> >>>> On Fri, Jun 20, 2025 at 08:10:08AM -0700, Raymond Mao wrote: >>>>> Introduce the implementation of udivti3 and udivmodti4 from LLVM >>>>> compiler-rt builtins for building MbedTLS bignum module via Clang. >>>>> >>>>> Signed-off-by: Raymond Mao <raymond....@linaro.org> >>>>> --- >>>>> lib/mbedtls/port/compiler-rt/LICENSE.TXT | 311 ++++++++++++++++++ >>>>> lib/mbedtls/port/compiler-rt/README.txt | 11 + >>>>> .../compiler-rt/lib/builtins/int_endianness.h | 114 +++++++ >>>>> .../port/compiler-rt/lib/builtins/int_lib.h | 171 ++++++++++ >>>>> .../port/compiler-rt/lib/builtins/int_types.h | 276 ++++++++++++++++ >>>>> .../port/compiler-rt/lib/builtins/int_util.h | 47 +++ >>>>> .../compiler-rt/lib/builtins/udivmodti4.c | 158 +++++++++ >>>>> .../port/compiler-rt/lib/builtins/udivti3.c | 23 ++ >>>>> 8 files changed, 1111 insertions(+) >>>>> create mode 100644 lib/mbedtls/port/compiler-rt/LICENSE.TXT >>>>> create mode 100644 lib/mbedtls/port/compiler-rt/README.txt >>>>> create mode 100644 >>>>> lib/mbedtls/port/compiler-rt/lib/builtins/int_endianness.h >>>>> create mode 100644 lib/mbedtls/port/compiler-rt/lib/builtins/int_lib.h >>>>> create mode 100644 lib/mbedtls/port/compiler-rt/lib/builtins/int_types.h >>>>> create mode 100644 lib/mbedtls/port/compiler-rt/lib/builtins/int_util.h >>>>> create mode 100644 lib/mbedtls/port/compiler-rt/lib/builtins/udivmodti4.c >>>>> create mode 100644 lib/mbedtls/port/compiler-rt/lib/builtins/udivti3.c >>>>> >>>>> diff --git a/lib/mbedtls/port/compiler-rt/LICENSE.TXT >>>>> b/lib/mbedtls/port/compiler-rt/LICENSE.TXT >>>>> new file mode 100644 >>>>> index 00000000000..5a79a1b9d5c >>>>> --- /dev/null >>>>> +++ b/lib/mbedtls/port/compiler-rt/LICENSE.TXT >>>>> @@ -0,0 +1,311 @@ >>>>> +============================================================================== >>>>> +The LLVM Project is under the Apache License v2.0 with LLVM Exceptions: >>>>> +============================================================================== >>>>> + >>>>> + Apache License >>>>> + Version 2.0, January 2004 >>>>> + http://www.apache.org/licenses/ >>>> >>>> I don't know that this is compatible for us. Looking at >>>> https://www.apache.org/licenses/GPL-compatibility.html it talks about >>>> how you can use it with GPLv3 (which we are *NOT*) but not GPLv2. >>>> >>> My bad didn't realize Apache 2.0 is not compatible with GPLv2... >>> I am not sure but it seems that this incompatibility does not even >>> allow static linking into a GPLv2 project. >>> Then, how to make it possible to use LLVM? Can we upgrade to GPLv2+? >> >> However the linux kernel people do it, we can do it too. And perhaps >> that's part of what's motivating LLVM to be able to disable these >> intrinsics that we don't actually need? >> > OP-TEE did the same thing, it is GPLv2 too.
No. optee_os is (mostly) BSD-2-Clause. Only the test suite (optee_test) is GPLv2. I too did not realize that Apache 2.0 was not compatible with GPLv2. Otherwise I would not have suggested this option for U-Boot. Sorry about that. Regards, -- Jerome -- Jerome > > Raymond > > >> -- >> Tom