Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1366735 - Add support for MIPS
Summary: Add support for MIPS
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
Version: 26
Hardware: mips64
OS: Unspecified
Target Milestone: ---
Assignee: Florian Festi
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: MIPS
TreeView+ depends on / blocked
Reported: 2016-08-12 16:18 UTC by Michal Toman
Modified: 2018-02-15 09:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-02-15 09:41:19 UTC

Attachments (Terms of Use)
Add-support-for-MIPS.patch (deleted)
2016-08-12 16:18 UTC, Michal Toman
no flags Details | Diff

Description Michal Toman 2016-08-12 16:18:40 UTC
Created attachment 1190501 [details]

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.

Comment 1 Panu Matilainen 2016-11-08 13:41:32 UTC
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.

Comment 2 Panu Matilainen 2016-11-08 14:44:56 UTC
FWIW, the rpmrc part added as of redhat-rpm-config-55-1.fc26

Comment 3 Fedora End Of Life 2017-02-28 10:06:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Note You need to log in before you can comment on or make changes to this bug.