[Mingw-w64-public] clang and mingw-w64

2014-11-10 Thread David Wohlferd

Can someone who knows more about clang than I do help me out here?

snow_xmas posted a problem report to the SF forum regarding using clang with 
mingw-W64.  After a brief investigation, it became clear that the problem was 
that clang doesn't support one of the features of inline asm that gcc does.  
The hope was that the llvm people would choose to fix this, however it doesn't 
appear that's going to happen any time soon.

The checkins that introduced this problem were done over a year ago and since 
then, it has not been possible to build mingw-w64 with clang.  Because kai 
wants to continue to support clang, I have updated the code.

However, I am no clang expert, so I don't feel like I have tested this 
sufficiently.  And unfortunately, snow_xmas is no longer responding.


The code is at http://www.LimeGreenSocks.com/intrin-impl.h (full file, not a 
patch). I realize that not everyone is an inline-asm expert, but in this case 
you really don't need to be.  Building mingw-w64 with clang would be a good 
test, but I also have some test code for the various functions in intrin-impl.h 
if you want it.

Without a clang expert to verify, I'm not going to be comfortable checking this 
in.

dw

--
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://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Clang and mingw-w64

2010-10-17 Thread Ruben Van Boxem
2010/10/16 Ozkan Sezer seze...@gmail.com


 Is this with the svn version?  If yes, there is a recent update to
 system_error.h:

 http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/KillTheDoctor/system_error.h?view=log

 --
 O.S.


Wow, I missed that by a hair... Talk  about bleeding edge development :)

Ruben
--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Clang and mingw-w64

2010-10-16 Thread Ozkan Sezer
On Sat, Oct 16, 2010 at 11:00 AM, Ruben Van Boxem
vanboxem.ru...@gmail.com wrote:
 Hi,
 I have started trying to build Clang with mingw-w64 tools. The x64 build
 fails because an LLVM tool called tblgen is miscompiled, so I tried a x86
 build instead for now. This works until the utterly final step, and some
 error types are undeclared:

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:260: error:
 'EAFNOSUPPORT' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:261: error:
 'EADDRINUSE' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:262: error:
 'EADDRNOTAVAIL' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:263: error:
 'EISCONN' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:268: error:
 'EBADMSG' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:270: error:
 'ECONNABORTED' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:271: error:
 'EALREADY' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:272: error:
 'ECONNREFUSED' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:273: error:
 'ECONNRESET' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:275: error:
 'EDESTADDRREQ' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:283: error:
 'EHOSTUNREACH' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:284: error:
 'EIDRM' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:292: error:
 'EMSGSIZE' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:293: error:
 'ENETDOWN' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:294: error:
 'ENETRESET' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:295: error:
 'ENETUNREACH' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:296: error:
 'ENOBUFS' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:298: error:
 'ENOLINK' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:303: error:
 'ENOMSG' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:305: error:
 'ENOMSG' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:306: error:
 'ENOPROTOOPT' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:318: error:
 'ENOTSOCK' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:324: error:
 'ENOTCONN' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:326: error:
 'ENOTSUP' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:327: error:
 'ECANCELED' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:328: error:
 'EINPROGRESS' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:330: error:
 'EOPNOTSUPP' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:331: error:
 'EWOULDBLOCK' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:332: error:
 'EOWNERDEAD' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:334: error:
 'EPROTO' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:335: error:
 'EPROTONOSUPPORT' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:340: error:
 'ENOTRECOVERABLE' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:344: error:
 'ETIMEDOUT' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:346: error:
 'ETXTBSY' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:347: error:
 'ETIMEDOUT' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:351: error:
 'ELOOP' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:352: error:
 'EOVERFLOW' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:353: error:
 'EPROTOTYPE' was not declared in this scope

 

Re: [Mingw-w64-public] Clang and mingw-w64

2010-10-16 Thread Kai Tietz
2010/10/16 Ruben Van Boxem vanboxem.ru...@gmail.com:
 Hi,
 I have started trying to build Clang with mingw-w64 tools. The x64 build
 fails because an LLVM tool called tblgen is miscompiled, so I tried a x86
 build instead for now. This works until the utterly final step, and some
 error types are undeclared:

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:260: error:
 'EAFNOSUPPORT' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:261: error:
 'EADDRINUSE' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:262: error:
 'EADDRNOTAVAIL' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:263: error:
 'EISCONN' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:268: error:
 'EBADMSG' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:270: error:
 'ECONNABORTED' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:271: error:
 'EALREADY' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:272: error:
 'ECONNREFUSED' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:273: error:
 'ECONNRESET' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:275: error:
 'EDESTADDRREQ' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:283: error:
 'EHOSTUNREACH' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:284: error:
 'EIDRM' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:292: error:
 'EMSGSIZE' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:293: error:
 'ENETDOWN' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:294: error:
 'ENETRESET' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:295: error:
 'ENETUNREACH' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:296: error:
 'ENOBUFS' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:298: error:
 'ENOLINK' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:303: error:
 'ENOMSG' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:305: error:
 'ENOMSG' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:306: error:
 'ENOPROTOOPT' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:318: error:
 'ENOTSOCK' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:324: error:
 'ENOTCONN' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:326: error:
 'ENOTSUP' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:327: error:
 'ECANCELED' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:328: error:
 'EINPROGRESS' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:330: error:
 'EOPNOTSUPP' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:331: error:
 'EWOULDBLOCK' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:332: error:
 'EOWNERDEAD' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:334: error:
 'EPROTO' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:335: error:
 'EPROTONOSUPPORT' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:340: error:
 'ENOTRECOVERABLE' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:344: error:
 'ETIMEDOUT' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:346: error:
 'ETXTBSY' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:347: error:
 'ETIMEDOUT' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:351: error:
 'ELOOP' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:352: error:
 'EOVERFLOW' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:353: error:
 'EPROTOTYPE' was not declared in this scope

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h: In
 function 

Re: [Mingw-w64-public] Clang and mingw-w64

2010-10-16 Thread K. Frank
Hi Kai -

A minor question about error numbers...

On Sat, Oct 16, 2010 at 4:11 AM, Kai Tietz ktiet...@googlemail.com wrote:
 2010/10/16 Ruben Van Boxem vanboxem.ru...@gmail.com:
 Hi,
 I have started trying to build Clang with mingw-w64 tools. The x64 build
 fails because an LLVM tool called tblgen is miscompiled, so I tried a x86
 build instead for now. This works until the utterly final step, and some
 error types are undeclared:

 M:\Development\Source\LLVM\utils\KillTheDoctor\/system_error.h:260: error:
 'EAFNOSUPPORT' was not declared in this scope
 ...
 I found most (if not all) of them
 in include\c++\4.4.5\x86_64-w64-mingw32\bits\error_constants.h, but they are
 cmmented out... How should I proceed?
 Thanks,
 Ruben
 ...

 Well, those symbols you are seeing are in fact POSIX error numbers,
 which aren't present for native win32. So you have two chances here.
 First define those error-numbers (see here errno.h). The other variant
 is to modify Clang/LLVM in a way not to use those error-numbers. The
 latter is the correct way to solve it, the first is more a hack and
 can lead to other issues.

I had one instance of a similar issuer with std::thread.  mutex (the mutex
header file) uses the value operation_not_permitted.  Because this has a
definition in error_constants.h that is commented out:

   //operation_not_permitted = EPERM,

I assumed that it was perfectly appropriate and safe to fix the problem by
uncommenting the line in question, thus defining operation_not_permitted.

(Note, my problem is not fully analogous to Ruben's: for me, EPERM is
defined, just not operation_not_permitted.)

I hadn't realized that defining these error constants could cause issues.
Is my current solution good and safe, or should I do something else?
(In my case, it's just two lines in mutex that use just one constant, so
just about any solution could be easily implemented.)

Thanks.

 Regards,
 Kai
 --
 |  (\_/) This is Bunny.

(Ho, Bunny!  World domination ist nicht gestattet!)


K. Frank

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public