我有一个64位版本的llvm gcc,但我希望能够同时构建32位和64位二进制文件。这有旗帜吗?我试着传递-m32 (它适用于常规gcc),但我得到了如下错误消息:
[jay@andesite]$ llvm-gcc -m32 test.c -o test
Warning: Generation of 64-bit code for a 32-bit processor requested.
Warning: 64-bit processors all have at least SSE2.
/tmp/cchzYo9t.s: Assembler messages:
/tmp/cchzYo9t.s
/usr/bin/ld: i386:x86-64 architecture of input file `build/gengenrtl.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `build/errors.o' is incompatible with i386 output
/usr/bin/ld: build/gengenrtl.o: file class ELFCLASS64 incompatible with ELFCLASS32
/u
我想在64位Ubuntu (16.04)中将程序编译为32位和静态链接的可执行文件。这使得它可以很容易地分发到一个自己制作的存档中,而不必担心依赖等等。三年前,我就这样建造了它,并记下了如何做到这一点:
# get source and build-deps, then run:
./configure CFLAGS="-m32" LDFLAGS="-m32 -static"
make
现在,我修改了源代码(添加了额外的选项),但是重建失败了,因为对Gpm_***函数的引用没有定义。这和我的修改无关。连接阶段:
gcc -o dialog dialog.o -L
我正在为Eclipse中的自动工具插件和我下载的一些C++项目而苦苦挣扎。
我的目标是在arm处理器上进行交叉编译,因此该项目已经配置为使用自动工具,但是当我尝试交叉编译时,我遇到了以下问题
In file included from /usr/include/c++/4.6/bits/stl_algo.h:61:0,
from /usr/include/c++/4.6/algorithm:63,
from dtntracepath.cpp:17:
/usr/include/c++/4.6/cstdlib:119:11: er