Bug 1366735
Summary: | Add support for MIPS | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michal Toman <michal.toman> | ||||
Component: | redhat-rpm-config | Assignee: | Florian Festi <ffesti> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 26 | CC: | ffesti, jakub, jonathan, pmatilai, praiskup | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | mips64 | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-02-15 09:41:19 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: |
|
No problem adding the rpmrc changes, but piling arch specific exceptions into the default gcc specs which next to nobody knows about much less properly understands to begin with makes me feel a bit uneasy. My initial feeling would be to leave the defaults alone and arrange (one way or the other) for a possibility of arch-specific override spec file(s) instead. Jakub (cc'd), thoughts/comments/guidancefrom gcc perspective would be welcome. FWIW, the rpmrc part added as of redhat-rpm-config-55-1.fc26 This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'. |
Created attachment 1190501 [details] Add-support-for-MIPS.patch Description of problem: We are trying to bring Fedora to MIPS platform and this requires adding MIPS build flags to redhat rpmrc. We also need to disable hardened ld on 32-bit MIPS. Actual results: Build fails because valgrind is required. Expected results: Build passes. Additional info: After a chat with GCC/binutils developer at Imagination Technologies, I have learned that -pie has been broken on 32-bit MIPS for several years and is unlikely to get fixed. It enables optimizations that are always unavailable without -fPIC: $ cat test.c #include <stdio.h> int main() { FILE *f = fopen("/dev/null", "w"); if (f) fclose(f); return 0; } $ gcc test.c -pie /usr/bin/ld: /tmp/ccOsCFfR.o: relocation R_MIPS_HI16 against `__gnu_local_gp' can not be used when making a shared object; recompile with -fPIC /tmp/ccOsCFfR.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status An explicit -fPIC fixes the problem but adding it to build flags breaks some static libraries. Disabling -pie is the most suitable solution I was able to find. Attaching dist-git patch. It would be nice to have this in F25 as well.