Many thanks for your help. I already read a lot of your useful posts and 
comments. I will try to apply your patch on my local clang build.

On 20.10.2014 16:31, Ruben Van Boxem wrote:
> 2014-10-20 16:19 GMT+02:00 Óscar Fuentes <[email protected] 
> <mailto:[email protected]>>:
> > Barnaby Jones
> > <[email protected] 
> <mailto:[email protected]>>
> > writes:
> >
> > The problems are self-evident:
> >
> >> and  CMakeError.log -->
> >>
> >> Determining if the C compiler works failed with the following output:
> >> Change Dir:
> >> 
> /home/barnaby/Dokumente/sourceProjects/gnustep/libobjc2/build/CMakeFiles/CMakeTmp
> >>
> >> Run Build Command:"/usr/bin/make" "cmTryCompileExec427134963/fast"
> >> /usr/bin/make -f CMakeFiles/cmTryCompileExec427134963.dir/build.make
> >> CMakeFiles/cmTryCompileExec427134963.dir/build
> >> make[1]: Entering directory
> >> 
> '/home/barnaby/Dokumente/sourceProjects/gnustep/libobjc2/build/CMakeFiles/CMakeTmp'
> >> /usr/bin/cmake -E cmake_progress_report
> >> 
> /home/barnaby/Dokumente/sourceProjects/gnustep/libobjc2/build/CMakeFiles/CMakeTmp/CMakeFiles
> >> 1
> >> Building C object
> >> CMakeFiles/cmTryCompileExec427134963.dir/testCCompiler.c.obj
> >> /usr/local/bin/clang  -D__MINGW64__  -o
> >> CMakeFiles/cmTryCompileExec427134963.dir/testCCompiler.c.obj -c
> >> 
> /home/barnaby/Dokumente/sourceProjects/gnustep/libobjc2/build/CMakeFiles/CMakeTmp/testCCompiler.c
> >
> > This is invoking clang with default target (no "--target=" option set.)
> > It is not cross-compiling.
> >
> >> Linking C executable cmTryCompileExec427134963.exe
> >> /usr/bin/cmake -E cmake_link_script
> >> CMakeFiles/cmTryCompileExec427134963.dir/link.txt --verbose=1
> >> /usr/bin/cmake -E remove -f
> >> CMakeFiles/cmTryCompileExec427134963.dir/objects.a
> >> /usr/bin/ar cr CMakeFiles/cmTryCompileExec427134963.dir/objects.a
> >> @CMakeFiles/cmTryCompileExec427134963.dir/objects1.rsp
> >> /usr/local/bin/clang       -Wl,--whole-archive
> >> CMakeFiles/cmTryCompileExec427134963.dir/objects.a
> >> -Wl,--no-whole-archive  -o cmTryCompileExec427134963.exe
> >> -Wl,--out-implib,libcmTryCompileExec427134963.dll.a
> >> -Wl,--major-image-version,0,--minor-image-version,0
> >
> > Same here.
> >
> >> /usr/bin/ld: unrecognized option '--out-implib'
> >
> > Unsurprisingly, the platform's linker is used. You need to arrange
> > things to invoke mingw-w64 cross-compiler. Possibly fixing the previous
> > problem also fixes this.
> >
> > As stated, the problem is not related to MinGW-w64, it is about how you
> > configure the CMake/Clang combo for cross-compiling.
>
> I beg to differ, and it is quite related to using MinGW-w64. It's just 
> not about GCC.
>
> Currently, Clang as-is cannot cross-compile to the MinGW-w64 targets.
>
> There is a patch that has not landed yet which adds MinGW-w64 support:
> http://reviews.llvm.org/D5268
>
> It should work and looks in 
> /usr/{i686,x86_64}-w64-mingw32/{include,lib} for headers/libraries. 
> Unfortunately, I don't know the exact target names for Clang's 
> --target option.
>
> Reading here 
> <http://clang.llvm.org/docs/CrossCompilation.html#target-triple> it 
> seems like x86-w64-win32-gnu or x86_64-w64-win32-gnu should work.
>
> Cheers,
>
> Ruben
>
> >
> >
> > 
> ------------------------------------------------------------------------------
> > Comprehensive Server Monitoring with Site24x7.
> > Monitor 10 servers for $9/Month.
> > Get alerted through email, SMS, voice calls or mobile push 
> notifications.
> > Take corrective actions from your mobile device.
> > http://p.sf.net/sfu/Zoho
> > _______________________________________________
> > Mingw-w64-public mailing list
> > [email protected] 
> <mailto:[email protected]>
> > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
>
>
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to