有人在OS X上成功编译了TCC吗?
据我所知这是可能的,但是当我运行make时,出现以下错误:
$ make
gcc -o tcc tcc.c -DTCC_TARGET_I386 -O2 -g -Wall -fno-strict-aliasing -mpreferred-stack- boundary=2 -march=i386 -falign-functions=0 -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 -lm -ldl
tcc.c:1: error: CPU you selected does not support x86-64 instruction set
tcc.c:1: error: CPU you selected does not support x86-64 instruction set
tcc.c:1: error: -mpreferred-stack-boundary=2 is not between 4 and 12
make: *** [tcc] Error 1
./configure
运行正常,并提供以下输出:$ ./configure
Binary directory /usr/local/bin
TinyCC directory /usr/local/lib/tcc
Library directory /usr/local/lib
Include directory /usr/local/include
Manual directory /usr/local/man
Doc directory /usr/local/share/doc/tcc
Target root prefix
Source path /Users/aaron/Downloads/tcc-0.9.25
C compiler gcc
CPU x86
Big Endian no
gprof enabled no
cross compilers no
use libgcc no
Creating config.mak and config.h
我敢肯定这个问题很简单,但是我在OS X上编译的程序不足以引起注意...
安装TCC的主要目的是获取libtcc,这样我就可以开始尝试从Ruby生成动态代码(以防万一:-p)。
谢谢!
最佳答案
我现在将巩固我的评论。
似乎有几个问题。
tcc
支持的可执行格式与Mac OS X native 运行的格式不重叠。但是,XBinary可以解决这个问题。 (但是,我既没有找到fink软件包也没有找到MacPorts软件包,并且还没有安装它。不确定我会-这是深奥的魔术,并且在理论上确实可以做非常糟糕的事情。)嗯。 ..这也已经在:Possiblity of loading/executing ELF files on OSX上。 关于macos - 在OS X上编译TCC时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3712902/