* [PATCH] gmp: redefine a function
@ 2014-07-28 11:01 rongqing.li
2014-07-28 17:25 ` Khem Raj
0 siblings, 1 reply; 6+ messages in thread
From: rongqing.li @ 2014-07-28 11:01 UTC (permalink / raw)
To: openembedded-core
From: Roy Li <rongqing.li@windriver.com>
redefine a function to make it be able to work on mips64 64BIT ABI
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
.../gmp/gmp-4.2.1/reimplement_umul_ppmm.patch | 39 ++++++++++++++++++++
meta/recipes-support/gmp/gmp_4.2.1.bb | 1 +
2 files changed, 40 insertions(+)
create mode 100644 meta/recipes-support/gmp/gmp-4.2.1/reimplement_umul_ppmm.patch
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/reimplement_umul_ppmm.patch b/meta/recipes-support/gmp/gmp-4.2.1/reimplement_umul_ppmm.patch
new file mode 100644
index 0000000..739d88a
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp-4.2.1/reimplement_umul_ppmm.patch
@@ -0,0 +1,39 @@
+[PATCH] reimplement umul_ppmm to make it be able to building on mips64 64bit ABI
+
+Upstream-Status: Pending[This version was not maintained by upstream, larger versions have been fixed]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ longlong.h | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/longlong.h b/longlong.h
+index b53fbee..faa845a 100644
+--- a/longlong.h
++++ b/longlong.h
+@@ -1024,10 +1024,20 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ((UWtype *, UWtype, UWtype, UWtype));
+ #endif /* __mips */
+
+ #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
+-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
++#if __GMP_GNUC_PREREQ (4,4)
++#define umul_ppmm(w1, w0, u, v) \
++ do { \
++ typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \
++ __ll_UTItype __ll = (__ll_UTItype)(u) * (v); \
++ w1 = __ll >> 64; \
++ w0 = __ll; \
++ } while (0)
++#endif
++#if !defined (umul_ppmm) && __GMP_GNUC_PREREQ (2,7)
+ #define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
+-#else
++#endif
++#if !defined (umul_ppmm)
+ #define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("dmultu %2,%3\n\tmflo %0\n\tmfhi %1" \
+ : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
+--
+1.9.1
+
diff --git a/meta/recipes-support/gmp/gmp_4.2.1.bb b/meta/recipes-support/gmp/gmp_4.2.1.bb
index 69ad0ca..216ee41 100644
--- a/meta/recipes-support/gmp/gmp_4.2.1.bb
+++ b/meta/recipes-support/gmp/gmp_4.2.1.bb
@@ -12,6 +12,7 @@ PR = "r2"
SRC_URI = "${GNU_MIRROR}/gmp/${BP}.tar.bz2 \
file://disable-stdc.patch \
file://gmp_fix_for_automake-1.12.patch \
+ file://reimplement_umul_ppmm.patch \
"
SRC_URI[md5sum] = "091c56e0e1cca6b09b17b69d47ef18e3"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] gmp: redefine a function
2014-07-28 11:01 [PATCH] gmp: redefine a function rongqing.li
@ 2014-07-28 17:25 ` Khem Raj
2014-07-29 0:36 ` Rongqing Li
0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2014-07-28 17:25 UTC (permalink / raw)
To: rongqing.li@windriver.com; +Cc: Patches and discussions about the oe-core layer
On Mon, Jul 28, 2014 at 4:01 AM, <rongqing.li@windriver.com> wrote:
> +[PATCH] reimplement umul_ppmm to make it be able to building on mips64 64bit ABI
> +
> +Upstream-Status: Pending[This version was not maintained by upstream, larger versions have been fixed]
> +
if you mean newer release have been fixed then this patch should be
marked 'Backport'
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gmp: redefine a function
2014-07-28 17:25 ` Khem Raj
@ 2014-07-29 0:36 ` Rongqing Li
2014-07-29 0:43 ` Khem Raj
0 siblings, 1 reply; 6+ messages in thread
From: Rongqing Li @ 2014-07-29 0:36 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
On 07/29/2014 01:25 AM, Khem Raj wrote:
> On Mon, Jul 28, 2014 at 4:01 AM, <rongqing.li@windriver.com> wrote:
>> +[PATCH] reimplement umul_ppmm to make it be able to building on mips64 64bit ABI
>> +
>> +Upstream-Status: Pending[This version was not maintained by upstream, larger versions have been fixed]
>> +
>
> if you mean newer release have been fixed then this patch should be
> marked 'Backport'
>
newer releases are GPLv3, we can not backport patch from them
-R
>
--
Best Reagrds,
Roy | RongQing Li
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gmp: redefine a function
2014-07-29 0:36 ` Rongqing Li
@ 2014-07-29 0:43 ` Khem Raj
2014-07-29 0:53 ` Rongqing Li
0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2014-07-29 0:43 UTC (permalink / raw)
To: Rongqing Li; +Cc: Patches and discussions about the oe-core layer
On Mon, Jul 28, 2014 at 5:36 PM, Rongqing Li <rongqing.li@windriver.com> wrote:
>
>
> On 07/29/2014 01:25 AM, Khem Raj wrote:
>>
>> On Mon, Jul 28, 2014 at 4:01 AM, <rongqing.li@windriver.com> wrote:
>>>
>>> +[PATCH] reimplement umul_ppmm to make it be able to building on mips64
>>> 64bit ABI
>>> +
>>> +Upstream-Status: Pending[This version was not maintained by upstream,
>>> larger versions have been fixed]
>>> +
>>
>>
>> if you mean newer release have been fixed then this patch should be
>> marked 'Backport'
>>
>
>
> newer releases are GPLv3, we can not backport patch from them
I see. So you did a clean room implementation then ? if not then
you could request the original patch author to release it under GPLv2
license for back portability
>
> -R
>
>>
>
> --
> Best Reagrds,
> Roy | RongQing Li
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gmp: redefine a function
2014-07-29 0:43 ` Khem Raj
@ 2014-07-29 0:53 ` Rongqing Li
2014-07-29 0:55 ` Khem Raj
0 siblings, 1 reply; 6+ messages in thread
From: Rongqing Li @ 2014-07-29 0:53 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
On 07/29/2014 08:43 AM, Khem Raj wrote:
> On Mon, Jul 28, 2014 at 5:36 PM, Rongqing Li <rongqing.li@windriver.com> wrote:
>>
>>
>> On 07/29/2014 01:25 AM, Khem Raj wrote:
>>>
>>> On Mon, Jul 28, 2014 at 4:01 AM, <rongqing.li@windriver.com> wrote:
>>>>
>>>> +[PATCH] reimplement umul_ppmm to make it be able to building on mips64
>>>> 64bit ABI
>>>> +
>>>> +Upstream-Status: Pending[This version was not maintained by upstream,
>>>> larger versions have been fixed]
>>>> +
>>>
>>>
>>> if you mean newer release have been fixed then this patch should be
>>> marked 'Backport'
>>>
>>
>>
>> newer releases are GPLv3, we can not backport patch from them
>
> I see. So you did a clean room implementation then ? if not then
> you could request the original patch author to release it under GPLv2
> license for back portability
>
Ok, I will ask;
But If the author do not like to release it under GPLv2, what should I do?
-Roy
>>
>> -R
>>
>>>
>>
>> --
>> Best Reagrds,
>> Roy | RongQing Li
>
>
--
Best Reagrds,
Roy | RongQing Li
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-29 0:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-28 11:01 [PATCH] gmp: redefine a function rongqing.li
2014-07-28 17:25 ` Khem Raj
2014-07-29 0:36 ` Rongqing Li
2014-07-29 0:43 ` Khem Raj
2014-07-29 0:53 ` Rongqing Li
2014-07-29 0:55 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.