[ANNOUNCEMENT] Updated: llvm/clang-3.4.2-1

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Jul 23 17:06:00 GMT 2014


On Jul 23 18:37, Angelo Graziosi wrote:
> Sorry,
> 
> Yaakov Selkowitz wrote:
> >This is an update to the latest upstream release, and the first release
> >for x86_64.  PLEASE NOTE that clang will NOT work as a native code
> >compiler for x86_64 at this time, but should still work as a code
> >analyzer and LLVM bytecode compiler; PTC.
> 
> That explains why I get
> 
> $ cat t.c
> #include <stdio.h>
> 
> int main()
> {
>   printf("Hello, World!/n");
>   return 0;
> }
> 
> $ clang t.c
> /tmp/t-12d75f.o:fake:(.text+0x15): rilocazione adattata per troncamento:
> R_X86_64_32 contro ".rdata"
> collect2: error: ld returned 1 exit status
> clang: error: linker (via gcc) command failed with exit code 1 (use -v to
> see invocation)

This looks pretty much like a problem with the code model.  Cygwin
The default for native Windows applications is the small code model,
accessing all code and data via 32 bit code-relative instructions
and jump trampolines where necessary.

When we worked on x86_64 Cygwin, we realized that we need to change GCC
to support another model, otherwise we would see the above kind of build
error a lot for otherwise perfectly correct POSIX code.  Therefore my
collegue Kai Tietz provided GCC with implementations of a medium and
large code model with different types of relative and absolute
addressing.  64 bit Cygwin applications use the medium code model by
default.

Having said that, I assume the problem here is that clang doesn't
support anything other than the small code model.  This needs some
serious patching, I guess.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140723/44f696df/attachment.sig>


More information about the Cygwin mailing list