我正在尝试编译 PHP xhprof 扩展。在一台服务器make
上成功,在另一台服务器上失败并显示“不支持内联 asm()”。相关代码是
asm volatile("rdtsc" : "=a" (__a), "=d" (__d));
两台服务器都运行具有相似配置的 Debian。
问题:我缺少什么包或者我应该在服务器之间比较哪个包版本以启用内联 asm?
供参考 make 输出
/bin/sh /usr/local/src/xhprof/extension/libtool --mode=compile cc -I. -I/usr/local/src/xhprof/extension -DPHP_ATOM_INC -I/usr/local/src/xhprof/extension/include -I/usr/local/src/xhprof/extension/main -I/usr/local/src/xhprof/extension -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -c /usr/local/src/xhprof/extension/xhprof.c -o xhprof.lo
libtool: compile: cc -I. -I/usr/local/src/xhprof/extension -DPHP_ATOM_INC -I/usr/local/src/xhprof/extension/include -I/usr/local/src/xhprof/extension/main -I/usr/local/src/xhprof/extension -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -c /usr/local/src/xhprof/extension/xhprof.c -DPIC -o .libs/xhprof.o
/usr/local/src/xhprof/extension/xhprof.c:1224: inline asm() not supported
/usr/local/src/xhprof/extension/libtool: line 1111: 23098 Segmentation fault cc -I. -I/usr/local/src/xhprof/extension -DPHP_ATOM_INC -I/usr/local/src/xhprof/extension/include -I/usr/local/src/xhprof/extension/main -I/usr/local/src/xhprof/extension -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -c /usr/local/src/xhprof/extension/xhprof.c -DPIC -o .libs/xhprof.o
make: *** [xhprof.lo] Error 1