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 1323813 - Add initial support for MIPS
Summary: Add initial support for MIPS
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 25
Hardware: mips64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: MIPS
TreeView+ depends on / blocked
 
Reported: 2016-04-04 19:13 UTC by Michal Toman
Modified: 2017-12-12 10:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:52:25 UTC


Attachments (Terms of Use)
GCC-Add-support-for-MIPS.patch (deleted)
2016-04-04 19:13 UTC, Michal Toman
no flags Details | Diff

Description Michal Toman 2016-04-04 19:13:25 UTC
Created attachment 1143419 [details]
GCC-Add-support-for-MIPS.patch

We are trying to bring Fedora to MIPS platform and this requires patching gcc to build properly on MIPS. There is still some work to do but an inital support can be added. To have a starting point I am attaching a patch that I have used a few days ago to build a working gcc package (on both 32 and 64 bits). Not really having a deep understanding of GCC I am not sure about the following:

1) I was unable to make multilib work. Tried to set %multilib_32_arch and --with-arch_32 but it did not help, the 64-bit flags were used even for 32-bit builds. --enable-multilib also enables 3 ABIs (o32, n32 and n64) and we do not plan to support n32 (we do not even have a working glibc) so this obviously fails.

2) MIPS does not support GNU build-ids. I am not sure what practical consequences this could have in Fedora but there you go.

3) Ada/gnat needs to be bootstrapped.

4) I am not sure whether libasan, libubsan and libitm should be built or not but simply adding %{mips} to enable them is not enough.

Please do comment, I will be happy to do more testing or prepare patches if you can point me in the right direction.

Comment 1 David Howells 2016-05-05 07:20:24 UTC
I'm just synching cross-gcc with gcc-6.1.1.  I'm wondering why --with-linker-hash-style=gnu is not used in the MIPS case.  To this point it hasn't been a problem for cross-gcc.

Comment 2 Michal Toman 2016-05-05 08:00:34 UTC
It does not work on MIPS. I've seen patches posted but they did not make it upstream yet.

$ echo "int main() { return 0; }" > test.c

$ gcc test.c -Wl,--hash-style=gnu
/usr/bin/ld: .gnu.hash is incompatible with the MIPS ABI
collect2: error: ld returned 1 exit status

$ gcc --version
gcc (GCC) 6.1.1 20160427 (Red Hat 6.1.1-1)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ld --version
GNU ld version 2.26.20160125
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

Comment 3 David Howells 2016-05-05 08:29:02 UTC
(In reply to Michal Toman from comment #2)
> It does not work on MIPS. I've seen patches posted but they did not make it
> upstream yet.
> 
> $ echo "int main() { return 0; }" > test.c
> 
> $ gcc test.c -Wl,--hash-style=gnu
> /usr/bin/ld: .gnu.hash is incompatible with the MIPS ABI
> collect2: error: ld returned 1 exit status

Ah, okay.  I see this too with cross-gcc:

warthog1>mips64-linux-gnu-gcc test.c
/usr/bin/mips64-linux-gnu-ld: .gnu.hash is incompatible with the MIPS ABI

Comment 4 David Howells 2016-05-06 09:24:02 UTC
(In reply to Michal Toman from comment #2)
> It does not work on MIPS. I've seen patches posted but they did not make it
> upstream yet.

Do you have a BZ for this or a URL for the patches?

Comment 5 Jan Kurik 2016-07-26 04:21:48 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 6 Fedora End Of Life 2017-11-16 15:45:37 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2017-12-12 10:52:25 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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