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 1377795

Summary: Add support for MIPS
Product: [Fedora] Fedora Reporter: Michal Toman <michal.toman>
Component: glibcAssignee: Florian Weimer <fweimer>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: arjun.is, codonell, dj, fweimer, jakub, law, mfabian, michal.toman, pfrankli, siddhesh
Target Milestone: ---   
Target Release: ---   
Hardware: mips64   
OS: Linux   
Whiteboard:
Fixed In Version: glibc-2.24.90-8.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-22 11:32:47 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: 1242747    
Attachments:
Description Flags
Add-support-for-MIPS.patch
none
Add-support-for-MIPS.patch none

Description Michal Toman 2016-09-20 15:29:19 UTC
Created attachment 1202949 [details]
Add-support-for-MIPS.patch

Description of problem:
We are trying to bring Fedora to MIPS platform and this requires adding MIPS support to glibc SPEC. Upstream glibc has all the necessary bits, no extra patches are required.

Actual results:
Build fails because glibc SPEC is MIPS-unaware.

Expected results:
Build passes.

Additional info:
Attaching dist-git patch. It would be nice to have this in F25 as well.

Comment 1 Michal Toman 2016-09-20 15:32:59 UTC
Created attachment 1202950 [details]
Add-support-for-MIPS.patch

Fix typo in the original patch

Comment 2 Florian Weimer 2016-09-20 15:48:04 UTC
Is there an upstream bug for this issue?

+# Without -mrelax-pic-calls ld.so segfaults when built with -O3
+BuildFlags="-march=mips64r2 -mabi=64 -mrelax-pic-calls"

Comment 3 Michal Toman 2016-09-20 16:41:58 UTC
I have discussed this with Imagination Technologies (they did actually suggest the -mrelax-pic-calls) and they are tracking it internally, investigating whether glibc itself should be fixed or whether some GCC optimization failed. For yet unknown reasons 64-bit little-endian MIPS is the only target where '__builtin_memset' does not get inlined with -O3. The issue will be taken upstream if GCC is not to blame.

The problem has already been addressed in 2002 though:
https://www.sourceware.org/ml/libc-alpha/2002-02/msg00085.html

Comment 4 Florian Weimer 2016-09-22 11:18:34 UTC
(In reply to Michal Toman from comment #3)
> I have discussed this with Imagination Technologies (they did actually
> suggest the -mrelax-pic-calls) and they are tracking it internally,
> investigating whether glibc itself should be fixed or whether some GCC
> optimization failed. For yet unknown reasons 64-bit little-endian MIPS is
> the only target where '__builtin_memset' does not get inlined with -O3. The
> issue will be taken upstream if GCC is not to blame.
> 
> The problem has already been addressed in 2002 though:
> https://www.sourceware.org/ml/libc-alpha/2002-02/msg00085.html

Okay, please file an upstream bug for this issue.  Thanks.