Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1591701

Summary: luajit on ppc64le
Product: [Fedora] Fedora Reporter: Menanteau Guy <menantea>
Component: luajitAssignee: Siddhesh Poyarekar <siddhesh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: dan, igor.raits, oliver, siddhesh
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-21 15:09:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1071880    
Attachments:
Description Flags
patch1
none
patch2
none
patch3
none
patch4
none
patch5
none
patch6
none
patch7
none
patch8
none
patch9
none
New ppc64le support patch none

Description Menanteau Guy 2018-06-15 10:17:04 UTC
Hi There, I would like to enable luajit for ppc64le to be able to run sysbench.
I found the work done by Koriakin in luajit upstream but it has not been released yet. https://github.com/LuaJIT/LuaJIT/pull/140

I tried to build luajit with these patches and it builds ok in koji f29
https://koji.fedoraproject.org/koji/taskinfo?taskID=27631561
Also I tested basic sysbench tests with it and it seems ok too.

Please could you see if you can add these patches and enable ppc64le build for luajit. Thanks  

changes done on luajit.spec:
---> add of ppc64le arch
ExclusiveArch:  %{arm} %{ix86} x86_64 %{mips} aarch64 ppc64le

---> add patches
%ifarch ppc64le
# Add ppc64le patches from koriakin
# https://github.com/LuaJIT/LuaJIT/pull/140
Patch1:         ppc64le_3d90e7e.patch
Patch2:         ppc64le_8d1fb71.patch
Patch3:         ppc64le_47ed69b.patch
Patch4:         ppc64le_89f7457.patch
Patch5:         ppc64le_1d40c34.patch
Patch6:         ppc64le_270bfa6.patch
Patch7:         ppc64le_1de5033.patch
Patch8:         ppc64le_f9b470d_ported.patch
Patch9:         ppc64le_2bf1b24.patch
%endif

---> add -p1 for patches applying
%autosetup -p1 -n LuaJIT-%{srcver}

Comment 1 Menanteau Guy 2018-06-15 10:17:52 UTC
Created attachment 1451874 [details]
patch1

Comment 2 Menanteau Guy 2018-06-15 10:18:29 UTC
Created attachment 1451875 [details]
patch2

Comment 3 Menanteau Guy 2018-06-15 10:18:52 UTC
Created attachment 1451876 [details]
patch3

Comment 4 Menanteau Guy 2018-06-15 10:19:24 UTC
Created attachment 1451877 [details]
patch4

Comment 5 Menanteau Guy 2018-06-15 10:19:55 UTC
Created attachment 1451878 [details]
patch5

Comment 6 Menanteau Guy 2018-06-15 10:20:19 UTC
Created attachment 1451879 [details]
patch6

Comment 7 Menanteau Guy 2018-06-15 10:20:43 UTC
Created attachment 1451880 [details]
patch7

Comment 8 Menanteau Guy 2018-06-15 10:21:04 UTC
Created attachment 1451881 [details]
patch8

Comment 9 Menanteau Guy 2018-06-15 10:21:29 UTC
Created attachment 1451882 [details]
patch9

Comment 10 Jan Kurik 2018-08-14 09:58:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 11 Siddhesh Poyarekar 2019-04-27 16:15:02 UTC
I attempted to rebase these patches on the latest v2.1 branch and it fails because of the ppc soft-float support that went in in 2017, that is not part of the 2.1.0-beta3 release.  Would you be able to help with the rebase?

Comment 12 Menanteau Guy 2019-04-29 09:38:53 UTC
ok let me have a look and see what I can do

Comment 13 Menanteau Guy 2019-06-11 14:51:57 UTC
Hi there, I propose a new patch based on the koriakin and Galvao work and rebased with FPU and other existing fedora patches.
For PPC, I only tested the ENDIAN LE mode (ENDIAN_LE/FPU/ELFV2).
Koji scratch test is: https://koji.fedoraproject.org/koji/taskinfo?taskID=35481640

Comment 14 Menanteau Guy 2019-06-11 14:53:15 UTC
Created attachment 1579425 [details]
New ppc64le support patch

Comment 15 Siddhesh Poyarekar 2019-06-12 16:10:25 UTC
This is great, thank you Menanteau!  The scratch build looks clean and all tests pass too, so we're good to go on this.  I'll close this bug once I've actually put the patch into Fedora and my github fork.

Comment 16 Siddhesh Poyarekar 2019-06-19 16:05:53 UTC
I've opened a PR here:

https://src.fedoraproject.org/rpms/luajit/pull-request/3

Comment 17 Siddhesh Poyarekar 2019-06-21 15:09:59 UTC
Patch is now in rawhide, thank you Menanteau!