Sickboy
Müßiggänger
Hallo allerseits,
unter FreeBSD 11 (amd64) möchte ich 32-bit executables bauen. Leider klappt das Linken nicht:
Selbes Problem mit GCC 8. Weiß jemand Rat?
unter FreeBSD 11 (amd64) möchte ich 32-bit executables bauen. Leider klappt das Linken nicht:
Code:
$ cmake -DCMAKE_CXX_COMPILER=clang++50 -DCMAKE_C_COMPILER=clang50 -DCMAKE_C_FLAGS="-m32 -B/usr/lib32" -DCMAKE_CXX_FLAGS="-m32 -B/usr/lib32" -DCMAKE_EXE_LINKER_FLAGS="-m32 -B/usr/lib32" ../
-- The C compiler identification is Clang 5.0.0
-- The CXX compiler identification is Clang 5.0.0
-- Check for working C compiler: /usr/local/bin/clang50
-- Check for working C compiler: /usr/local/bin/clang50 -- broken
CMake Error at /usr/local/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"/usr/local/bin/clang50"
is not able to compile a simple test program.
It fails with the following output:
[...]
Linking C executable cmTC_75ff8
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_75ff8.dir/link.txt --verbose=1
/usr/local/bin/clang50 -m32 -B/usr/lib32 CMakeFiles/cmTC_75ff8.dir/testCCompiler.c.o -o cmTC_75ff8
/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)