-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support other arch rather than x86, remove x86 spcified arguments for gc... #98
base: master
Are you sure you want to change the base?
Conversation
支持交叉编译曾考虑过,但是还没有开始搞。可能需要系统化地支持和改动。比如-m64改为-arch=x86_64之类的。我先看看你的修改吧。 |
这个应该不算交叉编译, 只是在非x86平台上编译native程序, 我是在我的一个小的arm开发板上编译 |
明白了,-arch是不是x86_64和i386视为独立的两个比较好? |
可能需要引入不同arch下编译参数的可配置化。比如 |
你的这个需求挺有意思,我review后,争取尽早merge到master。 |
好的^_^ |
gtalk:chen3feng
|
def _arch(self): | ||
"""Platform arch name.""" | ||
arch = platform.machine() | ||
if arch in ['i386', 'i686', 'x86_64']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得x86_64应该从i386中独立出来
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里我是这样分的:
arch分x86 arm等, bits分32 64.
所以x86_64是x86 64bit, i386是x86 32bit.
x86上能支持到cmpxchg -32 -64等, 不用再判断等于i386或x86_64,
你觉得怎么样好点?
reviewed |
统一用platform.machine()获得arch如何? |
这样对于非x86平台好像不好判断是32位或者64, 也可以目前假定非x86都是32位 |
如果要实现支持多平台,就得淡化位数的概念,用arch取代,比如 |
恩 我看行 |
gcc不支持-m32的原因是我是在arm上执行的gcc, -m32 -m64 -mcx16等都是x86架构专有的参数.
现在通过platform.architecture()来获取位数,并且参考platform.machine()来判断架构. 如果不是x86则不对CC, CXX, CPP, LD加入-mXX及-mcx16等参数, 并且不对AS加入-32或-64
测试之前好像有8个不通过, 不太熟悉代码, 没修.. 把新加代码break的一个测试改了改