Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: Version-Release number of selected component (if applicable): gcc-openrisc-linux-gnu-12.1.1-1.fc36.x86_64 How reproducible: Always Steps to Reproduce: trying to compile ex.c: ex.c: int main() { return 0; } $ openrisc-linux-gnu-gcc ex.c -o ex Actual results: $ openrisc-linux-gnu-gcc ex.c -o ex /tmp/ccVfqw7T.s: Assembler messages: /tmp/ccVfqw7T.s:7: Error: no such instruction: `l.addi r1,r1,-8' /tmp/ccVfqw7T.s:8: Error: no such instruction: `l.sw 0(r1),r2' /tmp/ccVfqw7T.s:9: Error: no such instruction: `l.addi r2,r1,8' /tmp/ccVfqw7T.s:10: Error: no such instruction: `l.sw 4(r1),r9' /tmp/ccVfqw7T.s:11: Error: no such instruction: `l.movhi r17,hi(0)' /tmp/ccVfqw7T.s:12: Error: no such instruction: `l.or r11,r17,r17' /tmp/ccVfqw7T.s:13: Error: no such instruction: `l.lwz r2,0(r1)' /tmp/ccVfqw7T.s:14: Error: no such instruction: `l.lwz r9,4(r1)' /tmp/ccVfqw7T.s:15: Error: no such instruction: `l.addi r1,r1,8' /tmp/ccVfqw7T.s:16: Error: no such instruction: `l.jr r9' /tmp/ccVfqw7T.s:17: Error: no such instruction: `l.nop' Expected results: Compilations without errors from assembler Additional info: $ openrisc-linux-gnu-gcc -print-prog-name=as as $ openrisc-linux-gnu-gcc -print-prog-name=ld /usr/bin/openrisc-linux-gnu-ld So gcc is configured to use correct ld and wrong as.
Unlikely this is a problem with the cross-gcc package, the openrisc assembler is detected correctly during the build and the openrisc target is configured the same way as any other cross-gcc and they behave correctly. Please report the issue to the upstream gcc project, I believe the problem is there.
Also reproduced in Fedora 37
Alright, I found the reason why it does not work. Target for which cross-binutils built does not match with target of cross-gcc. cross-binutils.spec: ... openrisc-*) target=or1k-linux-gnu;; ... cross-gcc.spec: ... openrisc-*) target=or1k-linux;; ... Changed target in cross-gcc.spec to or1k-linux-gnu and it fixed that for me, now it works as it should.
Created attachment 1935065 [details] Change target to match the one in cross-binutils
$ openrisc-linux-gnu-gcc --print-prog as /usr/lib/gcc/or1k-linux-gnu/12/../../../../or1k-linux-gnu/bin/as
thanks for the fix, applied in https://src.fedoraproject.org/rpms/cross-gcc/c/eabbde6402644f43fa932f829b342601fe30018a?branch=rawhide
FEDORA-2023-d8ac7cf371 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d8ac7cf371
FEDORA-2023-d8ac7cf371 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-9e8ff693d2 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-9e8ff693d2
FEDORA-2023-9e8ff693d2 has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-9e8ff693d2` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-9e8ff693d2 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-9e8ff693d2 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-EPEL-2024-009d6cd3eb (cross-gcc-14.1.1-1.el10_0.1) has been submitted as an update to Fedora EPEL 10.0. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-009d6cd3eb
FEDORA-EPEL-2024-009d6cd3eb (cross-gcc-14.1.1-1.el10_0.1) has been pushed to the Fedora EPEL 10.0 stable repository. If problem still persists, please make note of it in this bug report.