Description of problem: I don't know whether this is really a gcc or binutils issue, but I think gcc shouldn't pass args to gas that it will reject. (This is on the Fedora s390x login system, which appears to have up-to-date packages.) [loveshack@lfedora2 ~]$ echo >x.c 'int main() {return 0;}' [loveshack@lfedora2 ~]$ gcc -march=native x.c Assembler messages: Error: invalid switch -march=z15 Error: unrecognized option -march=z15 [loveshack@lfedora2 ~]$ rpm -q gcc binutils gcc-9.3.1-2.fc31.s390x binutils-2.32-31.fc31.s390x
This is something that differs between targets significantly, some targets perform assembler checks at configure time and don't allow options, instruction sets or even individual instructions if assembler doesn't support them, in others it will emit them and let the users choose what options to pass to gcc and what not given their assemblers (don't use too new ISAs if their assembler is too old). Both solutions have advantages and disadvantages, there is no clear winner.
(In reply to Dave Love from comment #0) > I don't know whether this is really a gcc or binutils issue, but I think gcc > shouldn't pass args to gas that it will reject. The problem here is that the 2.32 binutils used by Fedora 31 does not support the z15 extensions to the s390 architecture, which is why the option is being rejected. The extension is supported by the 2.34 binutils used by Fedora 32 (and of course later versions too). The simplest fix for the problem would be to patch gcc (for F31) to reject the -march=z15 option. A more complicated fix would be to backport support for the z15 extensions to the F31 binutils. I am not sure which is the best choice. Is z15 support something that has been promised for F31 ?
(In reply to Nick Clifton from comment #2) > (In reply to Dave Love from comment #0) > > > I don't know whether this is really a gcc or binutils issue, but I think gcc > > shouldn't pass args to gas that it will reject. > > The problem here is that the 2.32 binutils used by Fedora 31 does not > support the z15 > extensions to the s390 architecture, which is why the option is being > rejected. I think the support is there, the instructions are just called arch13. So maybe the backport isn't too hard? > Is z15 support something that has been promised for F31 ? I think it's a bug that -march=native stops working after a hardware upgrade. -- Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
Hi Florian, (In reply to Florian Weimer from comment #3) > I think the support is there, the instructions are just called arch13. So > maybe the backport isn't too hard? Ha! I had not spotted that. Thanks for pointing it out. Yes a patch should be very simple. Testing it now. Cheers Nick
Ok, I have applied the patch and built a new binutils. I am now starting a Bodhi update to get the new build pushed out.
FEDORA-2020-9c524230d8 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9c524230d8
FEDORA-2020-9c524230d8 has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9c524230d8` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9c524230d8 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-9c524230d8 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.