Problem on Mac : “Can't find a register in class BREG while reloading asm”

江枫思渺然 提交于 2019-12-06 02:49:16

问题


I tried to port some code onto Mac OS X.

The program uses the "ttmath" library, a header big-num header library. This library works fine on both windows and linux, but when I try to compile and run it on a Mac, the following error message always shows up :

"can't find a register in class 'BREG' while reloading 'asm'".

I found some documents say that this problem is due to the old version of GCC compiler (build 5488), but this message still shows up after I updated GCC.

currently my GCC version is :

i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)

and the OS is: Mac OS X version 10.5.8

I can't find any useful information about how to solve this problem, is there anyone can help me? Thanks a lot!


回答1:


Thanks for DeadMG! This problem is due to the PIC-safe option.

I added "-mdynamic-no-pic" and "-fno-pic" when I compile the code, and it works fine now :)



来源:https://stackoverflow.com/questions/4010069/problem-on-mac-cant-find-a-register-in-class-breg-while-reloading-asm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!