From 4040d82d1b07b94c671f843d361be57f675f612a Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 25 Jan 2013 18:30:43 +0100 Subject: [PATCH 01/10] Rebuilt for GCC 4.8.0 --- llvm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 4f7693f..d199345 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,7 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version -%global gcc_version 4.7.2 +%global gcc_version 4.8.0 %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 13%{?dist} +Release: 14%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -561,6 +561,9 @@ exit 0 %endif %changelog +* Fri Jan 25 2013 Kalev Lember - 3.1-14 +- Rebuilt for GCC 4.8.0 + * Wed Jan 23 2013 Jens Petersen - 3.1-13 - fix some docs pod markup errors to build with new perl-Pod-Parser From 74f5b79ee79f9744802f5cb5191e77710dfde80e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 31 Jan 2013 16:56:20 +0900 Subject: [PATCH 02/10] move lvm-config manpage to devel subpackage (#855882) --- llvm.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index d199345..31dfb9f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -483,6 +483,7 @@ exit 0 %exclude %{_mandir}/man1/clang.1.* %endif %doc %{_mandir}/man1/*.1.* +%exclude %{_mandir}/man1/llvm-config.1.* %files devel %defattr(-,root,root,-) @@ -490,6 +491,7 @@ exit 0 %{_includedir}/%{name} %{_includedir}/%{name}-c %{_libdir}/%{name}/*.a +%doc %{_mandir}/man1/llvm-config.1.* %files libs %defattr(-,root,root,-) @@ -561,6 +563,9 @@ exit 0 %endif %changelog +* Thu Jan 31 2013 Jens Petersen - 3.1-15 +- move lvm-config manpage to devel subpackage (#855882) + * Fri Jan 25 2013 Kalev Lember - 3.1-14 - Rebuilt for GCC 4.8.0 From 30312b57973947f8cce0fb48194f7e60bbba9d74 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 31 Jan 2013 18:02:29 +0900 Subject: [PATCH 03/10] pod2man moved to perl-podlators in F19 --- llvm.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm.spec b/llvm.spec index 31dfb9f..365db29 100644 --- a/llvm.spec +++ b/llvm.spec @@ -86,6 +86,8 @@ BuildRequires: dejagnu tcl-devel python %if %{with doxygen} BuildRequires: doxygen graphviz %endif +# pod2man moved to perl-podlators in F19 +BuildRequires: %{_bindir}/pod2man Requires: llvm-libs%{?_isa} = %{version}-%{release} %description @@ -565,6 +567,7 @@ exit 0 %changelog * Thu Jan 31 2013 Jens Petersen - 3.1-15 - move lvm-config manpage to devel subpackage (#855882) +- pod2man moved to perl-podlators in F19 * Fri Jan 25 2013 Kalev Lember - 3.1-14 - Rebuilt for GCC 4.8.0 From a185901e955b539aaf2f08a48a563fad06dc79cc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 6 Feb 2013 10:12:22 +0900 Subject: [PATCH 04/10] configure gcc arch include dir again with --with-c-include-dirs (#893817) (was in F16 but dropped during F17 development in 3.0-0.1.rc3) - BR gcc and gcc-c++ with gcc_version --- llvm.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/llvm.spec b/llvm.spec index 365db29..f403772 100644 --- a/llvm.spec +++ b/llvm.spec @@ -36,7 +36,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.1 -Release: 15%{?dist} +Release: 16%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -69,7 +69,8 @@ Patch800: llvm-3.1-docs-pod-markup-fixes.patch BuildRequires: bison BuildRequires: chrpath BuildRequires: flex -BuildRequires: gcc-c++ >= 3.4 +BuildRequires: gcc = %{gcc_version} +BuildRequires: gcc-c++ = %{gcc_version} BuildRequires: groff BuildRequires: libffi-devel BuildRequires: libtool-ltdl-devel @@ -315,7 +316,8 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ --enable-debug-runtime \ --enable-jit \ --enable-libffi \ - --enable-shared + --enable-shared \ + --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) # FIXME file this # configure does not properly specify libdir @@ -565,6 +567,11 @@ exit 0 %endif %changelog +* Mon Feb 4 2013 Jens Petersen - 3.1-16 +- bring back configuration for gcc arch include dir (#893817) + which was dropped in 3.0-0.1.rc3 +- BR gcc and gcc-c++ with gcc_version + * Thu Jan 31 2013 Jens Petersen - 3.1-15 - move lvm-config manpage to devel subpackage (#855882) - pod2man moved to perl-podlators in F19 From b8204c16e049b4844a05f91206f42e5c40db07c9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 8 Feb 2013 18:41:26 +0900 Subject: [PATCH 05/10] acknowledge Yury Zaytsev for his help with #893817 --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index f403772..49d7a9f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -568,7 +568,7 @@ exit 0 %changelog * Mon Feb 4 2013 Jens Petersen - 3.1-16 -- bring back configuration for gcc arch include dir (#893817) +- bring back configuration for gcc arch include dir (Yury Zaytsev, #893817) which was dropped in 3.0-0.1.rc3 - BR gcc and gcc-c++ with gcc_version From 2f5517cd536b010c7640e7af791e45093714c2cc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 13 Feb 2013 20:52:19 +0900 Subject: [PATCH 06/10] update to 3.2 with R600 patchset from tstellar's git repo - llvm-fix-ghc.patch is upstream - llvm-3.1-docs-pod-markup-fixes.patch no longer needed - add llvm-3.2-clang-driver-secondary-arch-triplets.patch (#803433) - build with gcc/g++ even if clang is installed - use gcc -dumpversion again to set gcc_version - llvm-config.1 manpage is no longer --- .gitignore | 3 + 0001-Add-r600-TargetInfo.patch | 100 ---------------- ...-r600-Add-some-intrinsic-definitions.patch | 64 ---------- ...bal_size-and-get_local_size-intrinsi.patch | 27 ----- 0002-r600-Add-some-target-builtins.patch | 111 ------------------ ...obal_size-and-read_local_size-builti.patch | 31 ----- ...clang-driver-secondary-arch-triplets.patch | 26 ++++ llvm.spec | 60 ++++------ sources | 5 +- 9 files changed, 57 insertions(+), 370 deletions(-) delete mode 100644 0001-Add-r600-TargetInfo.patch delete mode 100644 0001-r600-Add-some-intrinsic-definitions.patch delete mode 100644 0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch delete mode 100644 0002-r600-Add-some-target-builtins.patch delete mode 100644 0003-r600-Add-read_global_size-and-read_local_size-builti.patch create mode 100644 llvm-3.2-clang-driver-secondary-arch-triplets.patch diff --git a/.gitignore b/.gitignore index 04b6431..2c6da01 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ /clang-3.0.tar.gz /clang-3.1.src.tar.gz /llvm-3.1.src.tar.gz +/llvm-3.2-R600-tstellar-git-b53ed46.patch.gz +/llvm-3.2.src.tar.gz +/clang-3.2.src.tar.gz diff --git a/0001-Add-r600-TargetInfo.patch b/0001-Add-r600-TargetInfo.patch deleted file mode 100644 index 929b5d3..0000000 --- a/0001-Add-r600-TargetInfo.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 70cae83ffd093f183dec07c464db3c0bb6b92c10 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Fri, 2 Mar 2012 10:54:52 -0500 -Subject: [PATCH 1/3] Add r600 TargetInfo - ---- - lib/Basic/Targets.cpp | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 70 insertions(+), 0 deletions(-) - -diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp -index 85dfd78..64dc01c 100644 ---- a/lib/Basic/Targets.cpp -+++ b/lib/Basic/Targets.cpp -@@ -1068,6 +1068,73 @@ namespace { - } - - namespace { -+ -+class AMDGPUTargetInfo : public TargetInfo { -+public: -+ -+ AMDGPUTargetInfo(const std::string& triple) : TargetInfo(triple) { } -+ -+ virtual const char * getClobbers() const { -+ return ""; -+ } -+ -+ virtual void getGCCRegNames(const char * const *&Names, -+ unsigned &numNames) const { -+ Names = NULL; -+ numNames = 0; -+ } -+ -+ virtual void getGCCRegAliases(const GCCRegAlias *&Aliases, -+ unsigned &NumAliases) const { -+ Aliases = NULL; -+ NumAliases = 0; -+ } -+ -+ virtual bool validateAsmConstraint(const char *&Name, -+ TargetInfo::ConstraintInfo &info) const { -+ return true; -+ } -+ -+ virtual void getTargetBuiltins(const Builtin::Info *&Records, -+ unsigned &NumRecords) const { -+ Records = NULL; -+ NumRecords = 0; -+ } -+}; -+ -+ -+static const unsigned R600AddrSpaceMap[] = { -+ 1, // opencl_global -+ 3, // opencl_local -+ 2 // opencl_constant -+}; -+ -+class R600TargetInfo : public AMDGPUTargetInfo { -+public: -+ R600TargetInfo(const std::string& triple) : AMDGPUTargetInfo(triple) { -+ DescriptionString = -+ "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16" -+ "-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:32:32" -+ "-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64" -+ "-v96:128:128-v128:128:128-v192:256:256-v256:256:256" -+ "-v512:512:512-v1024:1024:1024-v2048:2048:2048" -+ "-n8:16:32:64"; -+ AddrSpaceMap = &R600AddrSpaceMap; -+ } -+ -+ virtual void getTargetDefines(const LangOptions &Opts, -+ MacroBuilder &Builder) const { -+ Builder.defineMacro("__R600__"); -+ } -+ -+ virtual const char * getVAListDeclaration() const { -+ return ""; -+ } -+}; -+ -+} // end anonymous namespace -+ -+namespace { - // MBlaze abstract base class - class MBlazeTargetInfo : public TargetInfo { - static const char * const GCCRegNames[]; -@@ -3963,6 +4030,9 @@ static TargetInfo *AllocateTarget(const std::string &T) { - case llvm::Triple::mblaze: - return new MBlazeTargetInfo(T); - -+ case llvm::Triple::r600: -+ return new R600TargetInfo(T); -+ - case llvm::Triple::sparc: - switch (os) { - case llvm::Triple::Linux: --- -1.7.7.6 - diff --git a/0001-r600-Add-some-intrinsic-definitions.patch b/0001-r600-Add-some-intrinsic-definitions.patch deleted file mode 100644 index 9d99c9c..0000000 --- a/0001-r600-Add-some-intrinsic-definitions.patch +++ /dev/null @@ -1,64 +0,0 @@ -From e25389b66b5ced3a2b5461077dcc9a505d334e3d Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Tue, 13 Mar 2012 14:12:21 -0400 -Subject: [PATCH 1/2] r600: Add some intrinsic definitions - ---- - include/llvm/Intrinsics.td | 1 + - include/llvm/IntrinsicsR600.td | 35 +++++++++++++++++++++++++++++++++++ - 2 files changed, 36 insertions(+), 0 deletions(-) - create mode 100644 include/llvm/IntrinsicsR600.td - -diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td -index 069f907..e90dd85 100644 ---- a/include/llvm/Intrinsics.td -+++ b/include/llvm/Intrinsics.td -@@ -441,3 +441,4 @@ include "llvm/IntrinsicsCellSPU.td" - include "llvm/IntrinsicsXCore.td" - include "llvm/IntrinsicsPTX.td" - include "llvm/IntrinsicsHexagon.td" -+include "llvm/IntrinsicsR600.td" -diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td -new file mode 100644 -index 0000000..789fecb ---- /dev/null -+++ b/include/llvm/IntrinsicsR600.td -@@ -0,0 +1,35 @@ -+//===- IntrinsicsR600.td - Defines R600 intrinsics ---------*- tablegen -*-===// -+// -+// The LLVM Compiler Infrastructure -+// -+// This file is distributed under the University of Illinois Open Source -+// License. See LICENSE.TXT for details. -+// -+//===----------------------------------------------------------------------===// -+// -+// This file defines all of the R600-specific intrinsics. -+// -+//===----------------------------------------------------------------------===// -+// -+// Authors: Tom Stellard -+// -+ -+let TargetPrefix = "r600" in { -+ -+class R600ReadPreloadRegisterIntrinsic -+ : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, -+ GCCBuiltin; -+ -+multiclass R600ReadPreloadRegisterIntrinsic_xyz { -+ def _x : R600ReadPreloadRegisterIntrinsic; -+ def _y : R600ReadPreloadRegisterIntrinsic; -+ def _z : R600ReadPreloadRegisterIntrinsic; -+} -+ -+defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz < -+ "__builtin_r600_read_ngroups">; -+defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz < -+ "__builtin_r600_read_tgid">; -+defm int_r600_read_tidig : R600ReadPreloadRegisterIntrinsic_xyz < -+ "__builtin_r600_read_tidig">; -+} // End TargetPrefix = "r600" --- -1.7.7.6 - diff --git a/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch b/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch deleted file mode 100644 index db176dd..0000000 --- a/0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 17667fa3450470f7c89fc2ba4631d908cf510749 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Wed, 14 Mar 2012 11:19:35 -0400 -Subject: [PATCH 2/2] r600: Add get_global_size and get_local_size intrinsics - ---- - include/llvm/IntrinsicsR600.td | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/include/llvm/IntrinsicsR600.td b/include/llvm/IntrinsicsR600.td -index 789fecb..0473acb 100644 ---- a/include/llvm/IntrinsicsR600.td -+++ b/include/llvm/IntrinsicsR600.td -@@ -26,6 +26,10 @@ multiclass R600ReadPreloadRegisterIntrinsic_xyz { - def _z : R600ReadPreloadRegisterIntrinsic; - } - -+defm int_r600_read_global_size : R600ReadPreloadRegisterIntrinsic_xyz < -+ "__builtin_r600_read_global_size">; -+defm int_r600_read_local_size : R600ReadPreloadRegisterIntrinsic_xyz < -+ "__builtin_r600_read_local_size">; - defm int_r600_read_ngroups : R600ReadPreloadRegisterIntrinsic_xyz < - "__builtin_r600_read_ngroups">; - defm int_r600_read_tgid : R600ReadPreloadRegisterIntrinsic_xyz < --- -1.7.7.6 - diff --git a/0002-r600-Add-some-target-builtins.patch b/0002-r600-Add-some-target-builtins.patch deleted file mode 100644 index 0003a8d..0000000 --- a/0002-r600-Add-some-target-builtins.patch +++ /dev/null @@ -1,111 +0,0 @@ -From a014573ad193775b2301e39275a1ca0ac3bb5847 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Tue, 13 Mar 2012 13:54:51 -0400 -Subject: [PATCH 2/3] r600: Add some target builtins - ---- - include/clang/Basic/BuiltinsR600.def | 32 ++++++++++++++++++++++++++++++++ - include/clang/Basic/TargetBuiltins.h | 10 ++++++++++ - lib/Basic/Targets.cpp | 12 ++++++++++-- - 3 files changed, 52 insertions(+), 2 deletions(-) - create mode 100644 include/clang/Basic/BuiltinsR600.def - -diff --git a/include/clang/Basic/BuiltinsR600.def b/include/clang/Basic/BuiltinsR600.def -new file mode 100644 -index 0000000..ce1f30e ---- /dev/null -+++ b/include/clang/Basic/BuiltinsR600.def -@@ -0,0 +1,32 @@ -+//===--- BuiltinsR600.def - R600 Builtin function database -- --*- C++ -*-===// -+// -+// The LLVM Compiler Infrastructure -+// -+// This file is distributed under the University of Illinois Open Source -+// License. See LICENSE.TXT for details. -+// -+//===----------------------------------------------------------------------===// -+// -+// This file defines the R600-specific builtin function database. Users of -+// this file must define the BUILTIN macro to make use of this information. -+// -+//===----------------------------------------------------------------------===// -+// -+// Authors: Tom Stellard -+// -+ -+// The format of this database matches clang/Basic/Builtins.def. -+ -+BUILTIN(__builtin_r600_read_ngroups_x, "z", "nc") -+BUILTIN(__builtin_r600_read_ngroups_y, "z", "nc") -+BUILTIN(__builtin_r600_read_ngroups_z, "z", "nc") -+ -+BUILTIN(__builtin_r600_read_tidig_x, "z", "nc") -+BUILTIN(__builtin_r600_read_tidig_y, "z", "nc") -+BUILTIN(__builtin_r600_read_tidig_z, "z", "nc") -+ -+BUILTIN(__builtin_r600_read_tgid_x, "z", "nc") -+BUILTIN(__builtin_r600_read_tgid_y, "z", "nc") -+BUILTIN(__builtin_r600_read_tgid_z, "z", "nc") -+ -+#undef BUILTIN -diff --git a/include/clang/Basic/TargetBuiltins.h b/include/clang/Basic/TargetBuiltins.h -index 7c04bf7..3460cd5 100644 ---- a/include/clang/Basic/TargetBuiltins.h -+++ b/include/clang/Basic/TargetBuiltins.h -@@ -45,6 +45,16 @@ namespace clang { - }; - } - -+ /// R600 builtins -+ namespace R600 { -+ enum { -+ LastTIBuiltin = clang::Builtin::FirstTSBuiltin-1, -+#define BUILTIN(ID, TYPE, ATTRS) BI##ID, -+#include "clang/Basic/BuiltinsR600.def" -+ LastTSBuiltin -+ }; -+ } -+ - - /// X86 builtins - namespace X86 { -diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp -index 64dc01c..03f1a18 100644 ---- a/lib/Basic/Targets.cpp -+++ b/lib/Basic/Targets.cpp -@@ -1070,6 +1070,7 @@ namespace { - namespace { - - class AMDGPUTargetInfo : public TargetInfo { -+ static const Builtin::Info BuiltinInfo[]; - public: - - AMDGPUTargetInfo(const std::string& triple) : TargetInfo(triple) { } -@@ -1097,8 +1098,8 @@ public: - - virtual void getTargetBuiltins(const Builtin::Info *&Records, - unsigned &NumRecords) const { -- Records = NULL; -- NumRecords = 0; -+ Records = BuiltinInfo; -+ NumRecords = clang::R600::LastTSBuiltin-Builtin::FirstTSBuiltin; - } - }; - -@@ -1132,6 +1133,13 @@ public: - } - }; - -+const Builtin::Info AMDGPUTargetInfo::BuiltinInfo[] = { -+#define BUILTIN(ID, TYPE, ATTRS) { #ID, TYPE, ATTRS, 0, ALL_LANGUAGES }, -+#define LIBBUILTIN(ID, TYPE, ATTRS, HEADER) { #ID, TYPE, ATTRS, HEADER,\ -+ ALL_LANGUAGES }, -+#include "clang/Basic/BuiltinsR600.def" -+}; -+ - } // end anonymous namespace - - namespace { --- -1.7.7.6 - diff --git a/0003-r600-Add-read_global_size-and-read_local_size-builti.patch b/0003-r600-Add-read_global_size-and-read_local_size-builti.patch deleted file mode 100644 index e0c2d3b..0000000 --- a/0003-r600-Add-read_global_size-and-read_local_size-builti.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2881b8189dcacc8ab6a336f0e107d72752c8c47e Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Wed, 14 Mar 2012 11:20:08 -0400 -Subject: [PATCH 3/3] r600: Add read_global_size and read_local_size builtins - ---- - include/clang/Basic/BuiltinsR600.def | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) - -diff --git a/include/clang/Basic/BuiltinsR600.def b/include/clang/Basic/BuiltinsR600.def -index ce1f30e..c81758e 100644 ---- a/include/clang/Basic/BuiltinsR600.def -+++ b/include/clang/Basic/BuiltinsR600.def -@@ -17,6 +17,14 @@ - - // The format of this database matches clang/Basic/Builtins.def. - -+BUILTIN(__builtin_r600_read_global_size_x, "z", "nc") -+BUILTIN(__builtin_r600_read_global_size_y, "z", "nc") -+BUILTIN(__builtin_r600_read_global_size_z, "z", "nc") -+ -+BUILTIN(__builtin_r600_read_local_size_x, "z", "nc") -+BUILTIN(__builtin_r600_read_local_size_y, "z", "nc") -+BUILTIN(__builtin_r600_read_local_size_z, "z", "nc") -+ - BUILTIN(__builtin_r600_read_ngroups_x, "z", "nc") - BUILTIN(__builtin_r600_read_ngroups_y, "z", "nc") - BUILTIN(__builtin_r600_read_ngroups_z, "z", "nc") --- -1.7.7.6 - diff --git a/llvm-3.2-clang-driver-secondary-arch-triplets.patch b/llvm-3.2-clang-driver-secondary-arch-triplets.patch new file mode 100644 index 0000000..cfbbd36 --- /dev/null +++ b/llvm-3.2-clang-driver-secondary-arch-triplets.patch @@ -0,0 +1,26 @@ +--- llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp~ 2012-12-17 00:59:27.000000000 +0900 ++++ llvm-3.2.src/tools/clang/lib/Driver/ToolChains.cpp 2013-02-12 19:18:00.755164292 +0900 +@@ -1054,10 +1054,12 @@ + static const char *const ARMLibDirs[] = { "/lib" }; + static const char *const ARMTriples[] = { + "arm-linux-gnueabi", +- "arm-linux-androideabi" ++ "arm-linux-androideabi", ++ "armv5tel-redhat-linux-gnueabi", + }; + static const char *const ARMHFTriples[] = { + "arm-linux-gnueabihf", ++ "armv7hl-redhat-linux-gnueabi", + }; + + static const char *const X86_64LibDirs[] = { "/lib64", "/lib" }; +@@ -1104,7 +1106,8 @@ + "powerpc-linux-gnu", + "powerpc-unknown-linux-gnu", + "powerpc-suse-linux", +- "powerpc-montavista-linuxspe" ++ "powerpc-montavista-linuxspe", ++ "ppc64-redhat-linux", + }; + static const char *const PPC64LibDirs[] = { "/lib64", "/lib" }; + static const char *const PPC64Triples[] = { diff --git a/llvm.spec b/llvm.spec index 49d7a9f..bd994ee 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,7 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version -%global gcc_version 4.8.0 +%global gcc_version %(gcc -dumpversion) %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -35,8 +35,8 @@ ExcludeArch: s390 s390x ppc ppc64 %endif Name: llvm -Version: 3.1 -Release: 16%{?dist} +Version: 3.2 +Release: 1%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -48,23 +48,14 @@ Source1: %{downloadurl}/clang-%{version}%{?prerel:%{prerel}}.src.tar.gz Source2: llvm-Config-config.h Source3: llvm-Config-llvm-config.h - # Data files should be installed with timestamps preserved Patch0: llvm-2.6-timestamp.patch -# r600 llvm and clang patches -Patch600: 0001-r600-Add-some-intrinsic-definitions.patch -Patch601: 0002-r600-Add-get_global_size-and-get_local_size-intrinsi.patch +Patch10: llvm-3.2-clang-driver-secondary-arch-triplets.patch -Patch610: 0001-Add-r600-TargetInfo.patch -Patch611: 0002-r600-Add-some-target-builtins.patch -Patch612: 0003-r600-Add-read_global_size-and-read_local_size-builti.patch - -# ghc -Patch700: llvm-fix-ghc.patch - -# doc -Patch800: llvm-3.1-docs-pod-markup-fixes.patch +# diff generated against http://cgit.freedesktop.org/~tstellar/llvm/ +# (includes committed http://people.freedesktop.org/~tstellar/llvm/3.2/bug-fixes/) +Patch600: llvm-3.2-R600-tstellar-git-b53ed46.patch.gz BuildRequires: bison BuildRequires: chrpath @@ -262,24 +253,11 @@ mv clang-%{version}%{?prerel}.src tools/clang # llvm patches %patch0 -p1 -b .timestamp -#patch1 -p1 -b .link_llvmgold_to_lto -# r600 llvm patch -%patch600 -p1 -b .r600 -%patch601 -p1 -b .r601 +# clang triplets +%patch10 -p1 -b .orig -# clang patches -%if %{with clang} -pushd tools/clang -%patch610 -p1 -b .r610 -%patch611 -p1 -b .r611 -%patch612 -p1 -b .r612 -popd -%endif - -%patch700 -p0 -b .ghc - -%patch800 -p1 -b .r800 +%patch600 -p1 -b .orig # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ @@ -291,6 +269,9 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ # https://bugzilla.redhat.com/show_bug.cgi?id=791365 %global optflags %(echo %{optflags} | sed 's/-O2 /-O2 -fno-tree-pre /') +# building with clang failing +export CC=gcc +export CXX=c++ # Disabling assertions now, rec. by pure and needed for OpenGTL %configure \ --prefix=%{_prefix} \ @@ -317,7 +298,8 @@ sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ --enable-jit \ --enable-libffi \ --enable-shared \ - --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) + --with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/%{gcc_version}/include) \ + --enable-experimental-targets=R600 # FIXME file this # configure does not properly specify libdir @@ -487,7 +469,6 @@ exit 0 %exclude %{_mandir}/man1/clang.1.* %endif %doc %{_mandir}/man1/*.1.* -%exclude %{_mandir}/man1/llvm-config.1.* %files devel %defattr(-,root,root,-) @@ -495,7 +476,6 @@ exit 0 %{_includedir}/%{name} %{_includedir}/%{name}-c %{_libdir}/%{name}/*.a -%doc %{_mandir}/man1/llvm-config.1.* %files libs %defattr(-,root,root,-) @@ -567,6 +547,16 @@ exit 0 %endif %changelog +* Wed Feb 13 2013 Jens Petersen - 3.2-1 +- update to 3.2 +- update R600 patches to Tom Stellard's git tree +- llvm-fix-ghc.patch is upstream +- llvm-3.1-docs-pod-markup-fixes.patch no longer needed +- add llvm-3.2-clang-driver-secondary-arch-triplets.patch (#803433) +- build with gcc/g++ even if clang is installed +- use gcc -dumpversion again to set gcc_version +- llvm-config.1 manpage is no longer + * Mon Feb 4 2013 Jens Petersen - 3.1-16 - bring back configuration for gcc arch include dir (Yury Zaytsev, #893817) which was dropped in 3.0-0.1.rc3 diff --git a/sources b/sources index 7c21d05..15c790f 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ -59bf2d3120a3805f27cafda3823caaf8 clang-3.1.src.tar.gz -16eaa7679f84113f65b12760fdfe4ee1 llvm-3.1.src.tar.gz +3896ef4334df08563b05d0848ba80582 clang-3.2.src.tar.gz +71610289bbc819e3e15fdd562809a2d7 llvm-3.2.src.tar.gz +0c32fc1b5ccabe5470c0d1083f6d800c llvm-3.2-R600-tstellar-git-b53ed46.patch.gz From e00c2256e8205af8aced0b9a5b8708880999de26 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 19 Feb 2013 16:19:03 +0900 Subject: [PATCH 07/10] do not version the gcc BRs to keep koji srpm creation happy koji does not have gcc in the srpm buildroot --- llvm.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm.spec b/llvm.spec index bd994ee..73b0809 100644 --- a/llvm.spec +++ b/llvm.spec @@ -60,8 +60,8 @@ Patch600: llvm-3.2-R600-tstellar-git-b53ed46.patch.gz BuildRequires: bison BuildRequires: chrpath BuildRequires: flex -BuildRequires: gcc = %{gcc_version} -BuildRequires: gcc-c++ = %{gcc_version} +BuildRequires: gcc +BuildRequires: gcc-c++ BuildRequires: groff BuildRequires: libffi-devel BuildRequires: libtool-ltdl-devel @@ -134,7 +134,7 @@ License: NCSA Group: Development/Languages Requires: llvm%{?_isa} = %{version}-%{release} # clang requires gcc, clang++ requires libstdc++-devel -Requires: gcc +Requires: gcc = %{gcc_version} Requires: libstdc++-devel = %{gcc_version} %description -n clang From 4e85cfa1b52bfc72d9361a5505ce66f1bd98b68d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 19 Feb 2013 16:29:30 +0900 Subject: [PATCH 08/10] ok hardcode gcc_version again for koji building --- llvm.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/llvm.spec b/llvm.spec index 73b0809..75f1606 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,7 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version -%global gcc_version %(gcc -dumpversion) +%global gcc_version 4.8.0 %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -60,8 +60,8 @@ Patch600: llvm-3.2-R600-tstellar-git-b53ed46.patch.gz BuildRequires: bison BuildRequires: chrpath BuildRequires: flex -BuildRequires: gcc -BuildRequires: gcc-c++ +BuildRequires: gcc = %{gcc_version} +BuildRequires: gcc-c++ = %{gcc_version} BuildRequires: groff BuildRequires: libffi-devel BuildRequires: libtool-ltdl-devel @@ -554,7 +554,6 @@ exit 0 - llvm-3.1-docs-pod-markup-fixes.patch no longer needed - add llvm-3.2-clang-driver-secondary-arch-triplets.patch (#803433) - build with gcc/g++ even if clang is installed -- use gcc -dumpversion again to set gcc_version - llvm-config.1 manpage is no longer * Mon Feb 4 2013 Jens Petersen - 3.1-16 From 97e156aa421670bd286ac2eb006f0cb70fa1bc57 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 8 Mar 2013 05:41:56 -0500 Subject: [PATCH 09/10] Update R600 patches - Move static libs to -static subpackage - Prep for F18 backport --- .gitignore | 1 + ...low-type-promotion-for-scalar-stores.patch | 30 ++++++++++ ...eDAG-Allow-promotion-of-scalar-loads.patch | 29 +++++++++ ...d-generating-illegal-vector-INT_TO_F.patch | 53 ++++++++++++++++ llvm.spec | 60 ++++++++++++++----- sources | 2 +- 6 files changed, 160 insertions(+), 15 deletions(-) create mode 100644 0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch create mode 100644 0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch create mode 100644 0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch diff --git a/.gitignore b/.gitignore index 2c6da01..f398901 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /llvm-3.2-R600-tstellar-git-b53ed46.patch.gz /llvm-3.2.src.tar.gz /clang-3.2.src.tar.gz +/R600-Mesa-9.1.patch.gz diff --git a/0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch b/0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch new file mode 100644 index 0000000..72c81cf --- /dev/null +++ b/0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch @@ -0,0 +1,30 @@ +From af4d115e2c9c4cfd8b099aaef9a13c2972c36272 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Thu, 6 Dec 2012 18:05:30 +0000 +Subject: [PATCH] LegalizeDAG: Allow type promotion for scalar stores + +--- + lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +index abf40b7..9946694 100644 +--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ++++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +@@ -731,9 +731,10 @@ void SelectionDAGLegalize::LegalizeStoreOps(SDNode *Node) { + return; + } + case TargetLowering::Promote: { +- assert(VT.isVector() && "Unknown legal promote case!"); +- Value = DAG.getNode(ISD::BITCAST, dl, +- TLI.getTypeToPromoteTo(ISD::STORE, VT), Value); ++ EVT NVT = TLI.getTypeToPromoteTo(ISD::STORE, VT); ++ assert(NVT.getSizeInBits() == VT.getSizeInBits() && ++ "Can only promote stores to same size type"); ++ Value = DAG.getNode(ISD::BITCAST, dl, NVT, Value); + SDValue Result = + DAG.getStore(Chain, dl, Value, Ptr, + ST->getPointerInfo(), isVolatile, +-- +1.7.11.4 + diff --git a/0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch b/0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch new file mode 100644 index 0000000..f136bda --- /dev/null +++ b/0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch @@ -0,0 +1,29 @@ +From 831cdb83e03319eeb36b6249e20e2908672397c2 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Thu, 6 Dec 2012 22:43:13 +0000 +Subject: [PATCH] LegalizeDAG: Allow promotion of scalar loads + +--- + lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +index 9946694..2596f00 100644 +--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ++++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +@@ -890,10 +890,9 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) { + break; + } + case TargetLowering::Promote: { +- // Only promote a load of vector type to another. +- assert(VT.isVector() && "Cannot promote this load!"); +- // Change base type to a different vector type. + EVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VT); ++ assert(NVT.getSizeInBits() == VT.getSizeInBits() && ++ "Can only promote loads to same size type"); + + SDValue Res = DAG.getLoad(NVT, dl, Chain, Ptr, LD->getPointerInfo(), + LD->isVolatile(), LD->isNonTemporal(), +-- +1.7.11.4 + diff --git a/0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch b/0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch new file mode 100644 index 0000000..f4c4e1e --- /dev/null +++ b/0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch @@ -0,0 +1,53 @@ +From 85259e7305201764ae9d85a7cbf2809da779bf5c Mon Sep 17 00:00:00 2001 +From: tstellar +Date: Wed, 2 Jan 2013 22:13:01 +0000 +Subject: [PATCH] DAGCombiner: Avoid generating illegal vector INT_TO_FP nodes + +DAGCombiner::reduceBuildVecConvertToConvertBuildVec() was making two +mistakes: + +1. It was checking the legality of scalar INT_TO_FP nodes and then generating +vector nodes. + +2. It was passing the result value type to +TargetLoweringInfo::getOperationAction() when it should have been +passing the value type of the first operand. + +git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171420 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 9 +++--- + .../R600/dagcombiner-bug-illegal-vec4-int-to-fp.ll | 33 ++++++++++++++++++++++ + test/CodeGen/R600/vec4-expand.ll | 3 -- + test/CodeGen/X86/cvtv2f32.ll | 4 +++ + 4 files changed, 42 insertions(+), 7 deletions(-) + create mode 100644 test/CodeGen/R600/dagcombiner-bug-illegal-vec4-int-to-fp.ll + +diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +index 37d7731..d0ca5c0 100644 +--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ++++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +@@ -8514,11 +8514,8 @@ SDValue DAGCombiner::reduceBuildVecConvertToConvertBuildVec(SDNode *N) { + if (Opcode == ISD::DELETED_NODE && + (Opc == ISD::UINT_TO_FP || Opc == ISD::SINT_TO_FP)) { + Opcode = Opc; +- // If not supported by target, bail out. +- if (TLI.getOperationAction(Opcode, VT) != TargetLowering::Legal && +- TLI.getOperationAction(Opcode, VT) != TargetLowering::Custom) +- return SDValue(); + } ++ + if (Opc != Opcode) + return SDValue(); + +@@ -8543,6 +8540,10 @@ SDValue DAGCombiner::reduceBuildVecConvertToConvertBuildVec(SDNode *N) { + assert(SrcVT != MVT::Other && "Cannot determine source type!"); + + EVT NVT = EVT::getVectorVT(*DAG.getContext(), SrcVT, NumInScalars); ++ ++ if (!TLI.isOperationLegalOrCustom(Opcode, NVT)) ++ return SDValue(); ++ + SmallVector Opnds; + for (unsigned i = 0; i != NumInScalars; ++i) { + SDValue In = N->getOperand(i); + diff --git a/llvm.spec b/llvm.spec index 75f1606..4aa3802 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,7 +6,11 @@ # clang header paths are hard-coded at compile time # and need adjustment whenever there's a new GCC version +%if 0%{?fedora} == 18 +%global gcc_version 4.7.2 +%else %global gcc_version 4.8.0 +%endif %ifarch s390 s390x sparc64 # No ocaml on these arches @@ -15,12 +19,7 @@ %bcond_without ocaml %endif -%if 0%{?rhel} >= 7 -%bcond_with clang -ExcludeArch: s390 s390x ppc ppc64 -%else %bcond_without clang -%endif #global prerel rcX %global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}} @@ -36,7 +35,7 @@ ExcludeArch: s390 s390x ppc ppc64 Name: llvm Version: 3.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine Group: Development/Languages @@ -53,9 +52,22 @@ Patch0: llvm-2.6-timestamp.patch Patch10: llvm-3.2-clang-driver-secondary-arch-triplets.patch -# diff generated against http://cgit.freedesktop.org/~tstellar/llvm/ -# (includes committed http://people.freedesktop.org/~tstellar/llvm/3.2/bug-fixes/) -Patch600: llvm-3.2-R600-tstellar-git-b53ed46.patch.gz +# hack llvm-config to print -lLLVM-3.2svn instead of ALL THE THINGS +# +# you really, really, really want not to use the static libs, otherwise +# if you ever end up with two (static) copies of llvm in the same process +# things will go boom quite nicely +# +# this isn't enabled yet because it makes the ocaml bindings fail the +# test suite. i don't even. +Patch20: llvm-3.2-llvm-config-dso-hack.patch + +# from http://people.freedesktop.org/~tstellar/llvm/3.2/ as of 7 March 2013 +# ref: http://lists.freedesktop.org/archives/mesa-dev/2013-March/035561.html +Patch600: R600-Mesa-9.1.patch.gz +Patch601: 0001-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch +Patch602: 0002-LegalizeDAG-Allow-promotion-of-scalar-loads.patch +Patch603: 0003-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch BuildRequires: bison BuildRequires: chrpath @@ -96,7 +108,6 @@ Group: Development/Languages Requires: %{name}%{?_isa} = %{version}-%{release} Requires: libffi-devel Requires: libstdc++-devel >= 3.4 -Provides: llvm-static = %{version}-%{release} Requires(posttrans): /usr/sbin/alternatives Requires(postun): /usr/sbin/alternatives @@ -127,6 +138,16 @@ Group: System Environment/Libraries Shared libraries for the LLVM compiler infrastructure. +%package static +Summary: LLVM static libraries +Group: Development/Languages +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description static +Static libraries for the LLVM compiler infrastructure. Not recommended +for general consumption. + + %if %{with clang} %package -n clang Summary: A C language family front-end for LLVM @@ -257,7 +278,13 @@ mv clang-%{version}%{?prerel}.src tools/clang # clang triplets %patch10 -p1 -b .orig +# fix llvm-config --libs +#patch20 -p1 -b .orig + %patch600 -p1 -b .orig +%patch601 -p1 -b .orig +%patch602 -p1 -b .orig +%patch603 -p1 -b .orig # fix ld search path sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' \ @@ -282,9 +309,6 @@ export CXX=c++ %if %{with gold} --with-binutils-include=%{_includedir} \ %endif -%if 0%{?rhel} >= 7 - --enable-targets=host \ -%endif %ifarch armv7hl armv7l --with-cpu=cortex-a8 \ --with-tune=cortex-a8 \ @@ -475,7 +499,6 @@ exit 0 %{_bindir}/llvm-config-%{__isa_bits} %{_includedir}/%{name} %{_includedir}/%{name}-c -%{_libdir}/%{name}/*.a %files libs %defattr(-,root,root,-) @@ -486,6 +509,10 @@ exit 0 %endif %{_libdir}/%{name}/*.so +%files static +%defattr(-,root,root,-) +%{_libdir}/%{name}/*.a + %if %{with clang} %files -n clang %defattr(-,root,root,-) @@ -547,6 +574,11 @@ exit 0 %endif %changelog +* Fri Mar 08 2013 Adam Jackson 3.2-2 +- Update R600 patches +- Move static libs to -static subpackage +- Prep for F18 backport + * Wed Feb 13 2013 Jens Petersen - 3.2-1 - update to 3.2 - update R600 patches to Tom Stellard's git tree diff --git a/sources b/sources index 15c790f..ee6fb33 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ 3896ef4334df08563b05d0848ba80582 clang-3.2.src.tar.gz 71610289bbc819e3e15fdd562809a2d7 llvm-3.2.src.tar.gz -0c32fc1b5ccabe5470c0d1083f6d800c llvm-3.2-R600-tstellar-git-b53ed46.patch.gz +610deacbd5928bbc62f630512f7d0292 R600-Mesa-9.1.patch.gz From bd03f325e13e6f4c9ef6f516fb0ffee5cd7bb2e5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 8 Mar 2013 06:04:03 -0500 Subject: [PATCH 10/10] a pre-push hook to check if you +PatchN'd and didn't git-add might be cool --- llvm-3.2-llvm-config-dso-hack.patch | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 llvm-3.2-llvm-config-dso-hack.patch diff --git a/llvm-3.2-llvm-config-dso-hack.patch b/llvm-3.2-llvm-config-dso-hack.patch new file mode 100644 index 0000000..00dc39f --- /dev/null +++ b/llvm-3.2-llvm-config-dso-hack.patch @@ -0,0 +1,30 @@ +diff -up llvm-3.2.src/tools/llvm-config/llvm-config.cpp.jx llvm-3.2.src/tools/llvm-config/llvm-config.cpp +--- llvm-3.2.src/tools/llvm-config/llvm-config.cpp.jx 2013-03-07 07:13:24.000000000 -0500 ++++ llvm-3.2.src/tools/llvm-config/llvm-config.cpp 2013-03-07 07:39:26.485677609 -0500 +@@ -316,7 +316,9 @@ int main(int argc, char **argv) { + if (!HasAnyOption) + usage(); + +- if (PrintLibs || PrintLibNames || PrintLibFiles) { ++ if (PrintLibs) { ++ OS << "-lLLVM-3.2svn"; ++ } else if (PrintLibNames || PrintLibFiles) { + // If no components were specified, default to "all". + if (Components.empty()) + Components.push_back("all"); +@@ -335,15 +337,6 @@ int main(int argc, char **argv) { + OS << Lib; + } else if (PrintLibFiles) { + OS << ActiveLibDir << '/' << Lib; +- } else if (PrintLibs) { +- // If this is a typical library name, include it using -l. +- if (Lib.startswith("lib") && Lib.endswith(".a")) { +- OS << "-l" << Lib.slice(3, Lib.size()-2); +- continue; +- } +- +- // Otherwise, print the full path. +- OS << ActiveLibDir << '/' << Lib; + } + } + OS << '\n';