diff options
author | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2013-01-14 21:48:03 -0600 |
---|---|---|
committer | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2013-01-14 21:48:03 -0600 |
commit | e7648af260c90ecf8d716d92843c6d9f0bf9b7fc (patch) | |
tree | 08b6d857dd622fb78ae1ae5c5666cf5c8c91d9d1 | |
parent | 013553cf4bb388360fbc9127608d06c6b4d96dc8 (diff) | |
download | cygwin-clang-e7648af260c90ecf8d716d92843c6d9f0bf9b7fc.tar.gz cygwin-clang-e7648af260c90ecf8d716d92843c6d9f0bf9b7fc.tar.xz cygwin-clang-e7648af260c90ecf8d716d92843c6d9f0bf9b7fc.zip |
Add patches for libtool and w32api compatibility
-rw-r--r-- | clang-3.1-cygwin-libdirs.patch | 40 | ||||
-rw-r--r-- | clang-3.1-cygwin-w32api.patch | 12 | ||||
-rw-r--r-- | cygwin-clang.spec | 9 |
3 files changed, 60 insertions, 1 deletions
diff --git a/clang-3.1-cygwin-libdirs.patch b/clang-3.1-cygwin-libdirs.patch new file mode 100644 index 0000000..991c5e7 --- /dev/null +++ b/clang-3.1-cygwin-libdirs.patch @@ -0,0 +1,40 @@ +--- origsrc/llvm-3.1.src/tools/clang/lib/Driver/Driver.cpp 2012-04-15 23:16:43.000000000 -0500 ++++ src/llvm-3.1.src/tools/clang/lib/Driver/Driver.cpp 2013-01-14 18:32:00.429180300 -0600 +@@ -1692,6 +1692,9 @@ const ToolChain &Driver::getToolChain(co + case llvm::Triple::Solaris: + TC = new toolchains::Solaris(*this, Target, Args); + break; ++ case llvm::Triple::Cygwin: ++ TC = new toolchains::Cygwin(*this, Target, Args); ++ break; + case llvm::Triple::Win32: + TC = new toolchains::Windows(*this, Target); + break; +--- origsrc/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2013-01-14 04:51:06.878456000 -0600 ++++ src/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2013-01-14 18:41:34.808617200 -0600 +@@ -2332,3 +2332,11 @@ Tool &DragonFly::SelectTool(const Compil + + return *T; + } ++ ++/// Cygwin - Cygwin tool chain for x86 ++ ++Cygwin::Cygwin(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) ++ : Generic_GCC(D, Triple, Args) { ++ getFilePaths().push_back("/usr/lib/gcc/i686-pc-cygwin/4.5.3"); ++ getFilePaths().push_back("=/usr/lib"); ++} +--- origsrc/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.h 2012-04-09 07:33:41.000000000 -0500 ++++ src/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.h 2013-01-14 18:35:26.747879400 -0600 +@@ -589,6 +589,11 @@ public: + + }; + ++class LLVM_LIBRARY_VISIBILITY Cygwin : public Generic_GCC { ++public: ++ Cygwin(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); ++}; ++ + } // end namespace toolchains + } // end namespace driver + } // end namespace clang diff --git a/clang-3.1-cygwin-w32api.patch b/clang-3.1-cygwin-w32api.patch new file mode 100644 index 0000000..3e03252 --- /dev/null +++ b/clang-3.1-cygwin-w32api.patch @@ -0,0 +1,12 @@ +http://cygwin.com/ml/cygwin/2013-01/msg00128.html + +--- origsrc/llvm-3.1.src/tools/clang/lib/Basic/Targets.cpp 2012-04-25 13:26:22.000000000 -0500 ++++ src/llvm-3.1.src/tools/clang/lib/Basic/Targets.cpp 2013-01-10 17:28:21.891693400 -0600 +@@ -2370,6 +2370,7 @@ public: + virtual void getTargetDefines(const LangOptions &Opts, + MacroBuilder &Builder) const { + X86_32TargetInfo::getTargetDefines(Opts, Builder); ++ Builder.defineMacro("_X86_"); + Builder.defineMacro("__CYGWIN__"); + Builder.defineMacro("__CYGWIN32__"); + DefineStd(Builder, "unix", Opts); diff --git a/cygwin-clang.spec b/cygwin-clang.spec index 5334197..b676acf 100644 --- a/cygwin-clang.spec +++ b/cygwin-clang.spec @@ -1,6 +1,6 @@ Name: cygwin-clang Version: 3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Clang compiler for Cygwin toolchain Group: Development/Libraries @@ -12,6 +12,8 @@ Source0: http://www.llvm.org/releases/%{version}/llvm-%{version}.src.tar.gz Source1: http://www.llvm.org/releases/%{version}/clang-%{version}.src.tar.gz Patch0: clang-3.0-cygwin-dllexport.patch Patch1: clang-3.1-cygwin-includes.patch +Patch2: clang-3.1-cygwin-w32api.patch +Patch3: clang-3.1-cygwin-libdirs.patch BuildRequires: cygwin-filesystem BuildRequires: gcc-c++ @@ -33,6 +35,8 @@ Clang C/C++/ObjC compiler for the Cygwin toolchain mv clang-%{version}.src tools/clang %patch0 -p2 %patch1 -p2 +%patch2 -p2 +%patch3 -p2 %build @@ -72,6 +76,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jan 14 2013 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 3.1-2 +- Add patches for compatibility with w32api headers and libtool. + * Fri Jul 13 2012 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 3.1-1 - Version bump. - Add patch to support dllexport/dllimport attributes. |