Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#58507 - [arm-none-eabi-gcc] SVC is not permitted on this architecture

Attached to Project: Community Packages
Opened by fengch (fengch) - Wednesday, 09 May 2018, 01:21 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 09 May 2018, 04:00 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description:
我在使用arm-none-eabi-gcc 8.1.0的时候,内嵌汇编指令SVC,报错“ SVC is not permitted on this architecture”
The following is the machine turned text
When I am using arm-none-eabi-gcc 8.1.0, the assembly instruction SVC is embedded with the error "SVC is not permitted on this architecture"

Additional info:
* package version(s)
arm-none-eabi-gcc 8.1.0-1
* config and/or log files etc.
C_FLAGS = -mabi=aapcs -mthumb -mcpu=cortex-m0
/tmp/ccl840zv.s: Assembler messages:
/tmp/ccl840zv.s:31: Error: SVC is not permitted on this architecture

Steps to reproduce:
cd /tmp
echo "void main(int argc, char args[]) { __asm(\"svc 0\" : : :); }">test.c
arm-none-eabi-gcc -mabi=aapcs -mthumb -mcpu=cortex-m0 -c test.c -o test.o
This task depends upon

Comment by fengch (fengch) - Wednesday, 09 May 2018, 02:00 GMT
我查看了 diff 确信造成问题的是这个改动:
- --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
+ --with-multilib-list=rmprofile
rmprofile 对应的是 armv6s-m,armv7-m,armv7e-m,armv8-m.base,armv8-m.main,armv7 并没有需要的armv6-m
谢谢
The following machine turn

I checked diff to make sure that the problem was caused by this change:
- --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
+ --with-multilib-list=rmprofile
The corresponding rmprofile is armv6s-m, armv7-m, armv7e-m, armv8-m.base, armv8-m.main, armv7 does not need armv6-m
Thank you
Comment by Anatol Pomozov (anatolik) - Wednesday, 09 May 2018, 04:57 GMT
"svc" is an extension of arm v6 instruction set. Add "-march=armv6s-m" (note for 's' suffix in the arch name) to make gcc happy.

Here is similar discussion https://bugs.launchpad.net/gcc-arm-embedded/+bug/1449610 and it seems that GCC should work even for "armv6-m" arch. Sounds like it could be a GCC issue and worth clarifying with upstream.

Loading...