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
../llvm -DCMAKE_CROSSCOMPILING=True
-DLLVM_TABLEGEN=/home/rich/ellcc-release/bin/llvm-tblgen
-DCLANG_TABLEGEN=/home/rich/ellcc-release/bin/clang-tblgen -DWIN32=True
-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.
The target config file x86_64-w64-mingw32 contains:
[~/ellcc/libecc/config] dev% cat x86_64-w64-mingw32
---
based_on: ''
global:
static_default: true
compiler:
options:
- -target x86_64-ellcc-mingw
# - -no-integrated-as
c_include_dirs:
- $R/clang
- $R/mingw/include
cxx_include_dirs:
- $R/mingw/include/c++
- $R/mingw/include/c++/x86_64-w64-mingw32
- $R/mingw/include/c++/backward
assembler:
exe: $E/x86_64-w64-mingw32-as
output:
- -o $O
linker:
exe: $E/ecc-ld$X
# exe: $E/lld$X
output:
- -o $O
start:
opt_static:
- -Bstatic
opt_rdynamic:
- -export-dynamic
opt_dynamic:
- -Bdynamic
opt_shared:
- -shared
opt_notshared:
- -dynamic-linker /usr/libexec/ld.so
opt_pthread:
- -pthread
options:
- -m i386pep
static_crt1: $R/mingw/x86_64-w64-mingw32/sys-root/mingw/lib/crt2.o
dynamic_crt1: $R/lib/i386-linux-eng/Scrt1.o
crtbegin: $R/mingw/x86_64-w64-mingw32/sys-root/mingw/lib/crtbegin.o
crtend: $R/mingw/x86_64-w64-mingw32/sys-root/mingw/lib/crtend.o
library_paths:
- -L$R/mingw/gcc/x86_64-w64-mingw32/4.9.2
- -L$R/mingw/x86_64-w64-mingw32/lib
- -L$R/mingw/x86_64-w64-mingw32/sys-root/mingw/lib
- -L$R/mingw/x86_64-w64-mingw32/lib
- -L$R/mingw/x86_64-w64-mingw32/sys-root/mingw/lib
cxx_libraries:
- -lstdc++
- -lm
profile_libraries:
- -lprofile_rt
c_libraries:
- -(
- -lmingw32
- -lgcc
- -lgcc_eh
- -lmoldname
- -lmingwex
- -lmsvcrt
- -lpthread
- -ladvapi32
- -lshell32
- -luser32
- -lkernel32
- -)
...
-Rich
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public