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.
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.
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.
(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
(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?
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'.
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.
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.