Richard Pennington <r...@pennware.com> writes: > On 02/17/2016 04:21 PM, Óscar Fuentes wrote: >> Showing the cmake invocation you used for configuring the build would >> help. If you use a Toolchain-*.cmake file for describing the >> cross-tools to cmake, please show that too. >> > I don't use a tool chain file. I run cmake like this: > > CC=/home/rich/ellcc-release/bin/ecc -target x86_64-w64-mingw32 > CXX=/home/rich/ellcc-release/bin/ecc++ -target x86_64-w64-mingw32 cmake
Are you missing some quotes around the values of the CC and CXX variable assignments? How does the shell knows where the var assignment ends and the cmake command begins? > ../llvm -DCMAKE_CROSSCOMPILING=True Users are not supposed to set this variabe themselves. > -DLLVM_TABLEGEN=/home/rich/ellcc-release/bin/llvm-tblgen > -DCLANG_TABLEGEN=/home/rich/ellcc-release/bin/clang-tblgen > -DWIN32=True The -DWIN32=True looks suspicious. You shouldn't need that. > -DCMAKE_AR=/home/rich/ellcc-release/bin/ecc-ar > -DCMAKE_RANLIB=/home/rich/ellcc-release/bin/ecc-ranlib > -DCMAKE_C_FLAGS=-DELLCC_ARG0=\"x86_64-w64-mingw32\" > -DCMAKE_CXX_FLAGS=-DELLCC_ARG0=\"x86_64-w64-mingw32\" > -DLLVM_ENABLE_PIC=False -DCMAKE_BUILD_TYPE:STRING=Release > -DCMAKE_INSTALL_PREFIX=/home/rich/ellcc-release/install-x86_64-w64-mingw32 > > /home/rich/ellcc-release/bin/ecc++ is my Linux version of clang. Apparently you are wrapping the MinGW-64 toolset with your own application. At this point I can't help you any further, except suggesting to try the cross-compilation with a tool chain file that points to the MinGW-w64 toolset. Here is a very old one of mine, which was what I used when I wrote the LLVM/Clang CMake build system. Hope it still works. You need to adjust paths and names to your install. # the name of the target operating system SET(CMAKE_SYSTEM_NAME Windows) SET(MPATH /home/oscar/dev/other/mingw-cross-env-2.8/usr/i386-mingw32msvc) # which compilers to use for C and C++ SET(CMAKE_C_COMPILER ${MPATH}/../bin/i386-mingw32msvc-gcc) SET(CMAKE_CXX_COMPILER ${MPATH}/../bin/i386-mingw32msvc-g++) # here is the target environment located SET(CMAKE_FIND_ROOT_PATH ${MPATH}) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public