Cygwin's <stdint.h> defines uint32_t as "unsigned long". I think this is valid, but it causes various problems like this when building LLVM with GCC 3.4.4: .../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3440: error: call of overloaded `AddInteger(uint32_t)' is ambiguous .../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1429: error: no matching function for call to `max(long unsigned int, unsigned int&)' .../include/llvm/ADT/DenseMap.h: In member function `void llvm::DenseMapIterator<KeyT, ValueT, KeyInfoT, ValueInfoT>::AdvancePastEmptyBuckets() [with KeyT = uint32_t, ValueT llvm::Value*, KeyInfoT = llvm::DenseMapInfo<uint32_t>, ValueInfoT llvm::DenseMapInfo<llvm::Value*>]': .../include/llvm/ADT/DenseMap.h:479: instantiated from `llvm::DenseMapIterator<KeyT, ValueT, KeyInfoT, ValueInfoT>& llvm::DenseMapIterator<KeyT, ValueT, KeyInfoT, ValueInfoT>::operator++() [with KeyT = uint32_t, ValueT llvm::Value*, KeyInfoT = llvm::DenseMapInfo<uint32_t>, ValueInfoT llvm::DenseMapInfo<llvm::Value*>]' .../lib/Transforms/Scalar/GVN.cpp:757: instantiated from here .../include/llvm/ADT/DenseMap.h:488: error: `getEmptyKey' is not a member of `llvm::DenseMapInfo<uint32_t>' .../include/llvm/ADT/DenseMap.h:489: error: `getTombstoneKey' is not a member of `llvm::DenseMapInfo<uint32_t>' .../include/llvm/ADT/DenseMap.h:491: error: `isEqual' is not a member of `llvm::DenseMapInfo<uint32_t>' .../include/llvm/ADT/DenseMap.h:491: error: `isEqual' is not a member of `llvm::DenseMapInfo<uint32_t>' I've attached a patch to fix these. This allows me to build LLVM on cygwin. If there's consensus as to whether to use "uint32_t" or "unsigned" then I could try to fix this more cleanly by using that type throughout, rather than just adding casts where it causes a problem. Is this appropriate? If so, can you apply it please? Thanks, Jay. -------------- next part -------------- A non-text attachment was scrubbed... Name: unsigned.patch Type: application/octet-stream Size: 9102 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081030/fd08f7c5/attachment.obj>
> I've attached a patch to fix these. This allows me to build LLVM on cygwin.Sorry, I didn't mean to include this hunk: Index: CMakeLists.txt ==================================================================--- CMakeLists.txt (revision 58429) +++ CMakeLists.txt (working copy) @@ -31,8 +31,13 @@ ) if(WIN32) - set(LLVM_ON_WIN32 1) - set(LLVM_ON_UNIX 0) + if(CYGWIN) + set(LLVM_ON_WIN32 0) + set(LLVM_ON_UNIX 1) + else(CYGWIN) + set(LLVM_ON_WIN32 1) + set(LLVM_ON_UNIX 0) + endif(CYGWIN) set(LTDL_SHLIB_EXT ".dll") set(EXEEXT ".exe") # Maximum path length is 160 for non-unicode paths But I do need it, or something like it, in order to build with CMake on cygwin. Jay.
"Jay Foad" <jay.foad at gmail.com> writes:> Sorry, I didn't mean to include this hunk: > > Index: CMakeLists.txt > ==================================================================> --- CMakeLists.txt (revision 58429) > +++ CMakeLists.txt (working copy) > @@ -31,8 +31,13 @@ > ) > > if(WIN32) > - set(LLVM_ON_WIN32 1) > - set(LLVM_ON_UNIX 0) > + if(CYGWIN) > + set(LLVM_ON_WIN32 0) > + set(LLVM_ON_UNIX 1) > + else(CYGWIN) > + set(LLVM_ON_WIN32 1) > + set(LLVM_ON_UNIX 0) > + endif(CYGWIN) > set(LTDL_SHLIB_EXT ".dll") > set(EXEEXT ".exe") > # Maximum path length is 160 for non-unicode paths > > But I do need it, or something like it, in order to build with CMake > on cygwin.It is okay to apply this change. -- Oscar
"Jay Foad" <jay.foad at gmail.com> writes:> Sorry, I didn't mean to include this hunk:[snipped Cygwin-specific variable settings on CMakeLists.txt]> But I do need it, or something like it, in order to build with CMake > on cygwin.Just in case your patch does not pass through, I applied this hunk. Thanks! -- Oscar
On Thu, Oct 30, 2008 at 03:57:41PM +0000, Jay Foad wrote:> Cygwin's <stdint.h> defines uint32_t as "unsigned long". I think this > is valid, but it causes various problems like this when building LLVM > with GCC 3.4.4.Was fixed in later versions of cygwin as well: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/include/stdint.h.diff?r1=1.10&r2=1.7.4.1&cvsroot=src&f=h -- Julien Lerouge PGP Key Id: 0xB1964A62 PGP Fingerprint: 392D 4BAD DB8B CE7F 4E5F FA3C 62DB 4AA7 B196 4A62 PGP Public Key from: keyserver.pgp.com
I also need the attached patch when building with GCC 4.3.2 on cywing, to avoid lots of warnings like this: .../lib/Transforms/Utils/BasicInliner.cpp:55: warning: visibility attribute not supported in this configuration; ignored Jay. -------------- next part -------------- A non-text attachment was scrubbed... Name: visibility.patch Type: application/octet-stream Size: 568 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081031/eaf2bcbe/attachment.obj>
Hello, Jay> I also need the attached patch when building with GCC 4.3.2 on cywing, > to avoid lots of warnings like this:Applied, thanks! -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.