X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <4B4F908D.2060709@x-ray.at> Date: Thu, 14 Jan 2010 22:45:49 +0100 From: Reini Urban User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20100104 SeaMonkey/2.0.2 MIME-Version: 1.0 To: cfe-dev AT cs DOT uiuc DOT edu CC: cygwin AT cygwin DOT com Subject: cygwin updates (was: dladdr and Dl_info) References: <3ab31ceedb33b3519257e07931dbdaf5 AT mail DOT smartmobili DOT com> <4B4F7C90 DOT 4030509 AT x-ray DOT at> <4B4F82B1 DOT 3080605 AT users DOT sourceforge DOT net> In-Reply-To: <4B4F82B1.3080605@users.sourceforge.net> Content-Type: multipart/mixed; boundary="------------080106020304010904030904" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------080106020304010904030904 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Yaakov (Cygwin/X) schrieb: > On 14/01/2010 14:20, Reini Urban wrote: >> >> I have a working cygwin llvm and llvm-gcc, >> but had no time to produce a proper package yet. >> Attached are my cygport files and my local config. >> No patches were needed. >> >> But I haven't bothered to build clang yet, >> just the Clang llvmc plugin and llvm-gcc, >> which I thought is harder to build and gives us more gcc compatibility. > > Here's what I have so far for llvm/clang 2.6; the .cygport may be > missing something, it's been a few weeks since I've looked at it. On the cygwin mailinglist we came to some required clang patches. http://cygwin.com/ml/cygwin/2010-01/msg00587.html Sorry, untested, as I got unrelated linker errors. 2010-01-14 Reini Urban * tools/CIndex/CIndexer.cpp: dlladdr workaround and path conversion * lib/Frontend/InitHeaderSearch.cpp: refactored 2009-11-24 Yaakov Selkowitz * tools/driver/driver.cpp, lib/Frontend/InitHeaderSearch.cpp, lib/Headers/stddef.h: various Cygwin gcc 4.3 updates -- Reini Urban --------------080106020304010904030904 Content-Type: text/x-patch; name="cygwin-4.3.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cygwin-4.3.patch" 2010-01-14 Reini Urban * tools/CIndex/CIndexer.cpp: dlladdr workaround and path conversion * lib/Frontend/InitHeaderSearch.cpp: refactored 2009-11-24 Yaakov Selkowitz * tools/driver/driver.cpp, lib/Frontend/InitHeaderSearch.cpp, lib/Headers/stddef.h: various Cygwin gcc 4.3 updates Index: tools/CIndex/CIndexer.cpp =================================================================== --- tools/CIndex/CIndexer.cpp (revision 93449) +++ tools/CIndex/CIndexer.cpp (working copy) @@ -31,8 +31,11 @@ #include #include -#ifdef LLVM_ON_WIN32 +#if defined(LLVM_ON_WIN32) || defined(__CYGWIN__) #include +# ifdef __CYGWIN__ +# include +# endif #else #include #endif @@ -46,14 +49,19 @@ return ClangPath; // Find the location where this library lives (libCIndex.dylib). -#ifdef LLVM_ON_WIN32 +#if defined(LLVM_ON_WIN32) || defined(__CYGWIN__) MEMORY_BASIC_INFORMATION mbi; char path[MAX_PATH]; VirtualQuery((void *)(uintptr_t)clang_createTranslationUnit, &mbi, sizeof(mbi)); GetModuleFileNameA((HINSTANCE)mbi.AllocationBase, path, MAX_PATH); - +#ifdef __CYGWIN__ + char posix_path[MAX_PATH]; + cygwin_conv_path(CCP_WIN_A_TO_POSIX | CCP_RELATIVE, path, posix_path, MAX_PATH); + llvm::sys::Path CIndexPath(posix_path); +#else llvm::sys::Path CIndexPath(path); +#endif CIndexPath.eraseComponent(); CIndexPath.appendComponent("clang"); Index: tools/driver/driver.cpp =================================================================== --- tools/driver/driver.cpp (revision 93449) +++ tools/driver/driver.cpp (working copy) @@ -214,7 +214,13 @@ #endif Driver TheDriver(Path.getBasename(), Path.getDirname(), llvm::sys::getHostTriple(), - "a.out", IsProduction, Diags); +#if defined(__CYGWIN__) + "a.exe", +#else + "a.out", +#endif + IsProduction, + Diags); // Check for ".*++" or ".*++-[^-]*" to determine if we are a C++ // compiler. This matches things like "c++", "clang++", and "clang++-1.1". Index: lib/Frontend/InitHeaderSearch.cpp =================================================================== --- lib/Frontend/InitHeaderSearch.cpp (revision 93449) +++ lib/Frontend/InitHeaderSearch.cpp (working copy) @@ -430,6 +430,18 @@ case llvm::Triple::MinGW32: AddPath("c:/mingw/include", System, true, false, false); break; + case llvm::Triple::Cygwin: + // Cygwin GCC version 4 + AddPath("/usr/lib/gcc/i686-pc-cygwin/4.3.4/include", + System, true, false, false); + // Cygwin GCC version 4 + AddPath("/usr/local/include", System, false, false, false); + AddPath("/usr/include", System, false, false, false); + AddPath("/usr/include/w32api", System, false, false, false); + // Cygwin GCC version 3.4 + AddPath("/lib/gcc/i686-pc-cygwin/3.4.4/include", + System, true, false, false); + break; default: break; } @@ -454,8 +466,14 @@ // FIXME: temporary hack: hard-coded paths. switch (os) { case llvm::Triple::Cygwin: - AddPath("/lib/gcc/i686-pc-cygwin/3.4.4/include", - System, true, false, false); + // Cygwin GCC version 4 + AddPath("/usr/lib/gcc/i686-pc-cygwin/4.3.4/include/c++", + System, true, false, false); + AddPath("/usr/lib/gcc/i686-pc-cygwin/4.3.4/include/c++/i686-pc-cygwin", + System, true, false, false); + AddPath("/usr/lib/gcc/i686-pc-cygwin/4.3.4/include/c++/backward", + System, true, false, false); + // Cygwin GCC version 3.4 AddPath("/lib/gcc/i686-pc-cygwin/3.4.4/include/c++", System, true, false, false); break; Index: lib/Headers/stddef.h =================================================================== --- lib/Headers/stddef.h (revision 93449) +++ lib/Headers/stddef.h (working copy) @@ -30,6 +30,7 @@ typedef __typeof__(sizeof(int)) size_t; #ifndef __cplusplus typedef __typeof__(*L"") wchar_t; +typedef __typeof__(sizeof(*L"")) wint_t; #endif #ifdef __cplusplus --------------080106020304010904030904 Content-Type: text/plain; charset=us-ascii -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple --------------080106020304010904030904--