summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2012-06-07 00:27:56 +0000
committerRichard Yao <ryao@gentoo.org>2012-06-07 00:27:56 +0000
commitaf6f6fef5c5759c0a7b783e09626dd0078be0a09 (patch)
treef3c40588e7ab8ab29bbb4a76fac56b334339385e /sys-devel/clang
parentFix some repoman complains (diff)
downloadhistorical-af6f6fef5c5759c0a7b783e09626dd0078be0a09.tar.gz
historical-af6f6fef5c5759c0a7b783e09626dd0078be0a09.tar.bz2
historical-af6f6fef5c5759c0a7b783e09626dd0078be0a09.zip
Fix bug #417913
Package-Manager: portage-2.1.10.49/cvs/Linux x86_64
Diffstat (limited to 'sys-devel/clang')
-rw-r--r--sys-devel/clang/ChangeLog10
-rw-r--r--sys-devel/clang/Manifest7
-rw-r--r--sys-devel/clang/clang-3.1-r4.ebuild (renamed from sys-devel/clang/clang-3.1-r3.ebuild)11
-rw-r--r--sys-devel/clang/files/clang-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch188
-rw-r--r--sys-devel/clang/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch (renamed from sys-devel/clang/files/clang-3.1-gentoo-runtime-gcc-detection-v2.patch)5
5 files changed, 208 insertions, 13 deletions
diff --git a/sys-devel/clang/ChangeLog b/sys-devel/clang/ChangeLog
index ef49ef765adc..06aa6bb173fc 100644
--- a/sys-devel/clang/ChangeLog
+++ b/sys-devel/clang/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-devel/clang
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.69 2012/06/05 02:03:46 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.70 2012/06/07 00:27:55 ryao Exp $
+
+*clang-3.1-r4 (07 Jun 2012)
+
+ 07 Jun 2012; Richard Yao <ryao@gentoo.org> +clang-3.1-r4.ebuild,
+ +files/clang-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch,
+ +files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch, -clang-3.1-r3.ebuild,
+ -files/clang-3.1-gentoo-runtime-gcc-detection-v2.patch:
+ Fix bug #417913
*clang-3.1-r3 (05 Jun 2012)
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest
index 9117b9c267e4..5d6fe2890a46 100644
--- a/sys-devel/clang/Manifest
+++ b/sys-devel/clang/Manifest
@@ -10,10 +10,11 @@ AUX clang-3.0-gentoo-binutils-apple.patch 1113 RMD160 117b47ecb72589f5226bba9add
AUX clang-3.0-linux-runtime-gcc-detection.patch 1728 RMD160 113d1b57ac276bd0eb312ae9540be82575706c99 SHA1 327be62747e8c78bea725036e3d4113a12816725 SHA256 aed41e3d05c57d2dd027a13023b12c2ea0d90b56427b0af393264f2a5a242595
AUX clang-3.0-recognize-amd-k10-enable-sse4a.patch 2555 RMD160 de8ebe104708ac4f8c2effae7b0982e92bd31564 SHA1 5065ca8005a8a47649d5bc18eac78db12e5c27db SHA256 46d05e49cefe2f86a562062d7b11e03ecb4ec7a146ee9f674d9a31dda4af9faf
AUX clang-3.1-fix_cxx_include_root.patch 1132 RMD160 68e10411c7848dcedd58707f3284766c05a024fc SHA1 37ce2ac8dca7b0ccf63136f9c1898503b98e5ec4 SHA256 9b26379cc9f73dbc9d395a64e46bcec5544866409be6258316ad4fb6ec697f1b
+AUX clang-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch 8033 RMD160 834e01b86129508f5630eaad263b56383d204d79 SHA1 3c89348592aa3bfc3f28bb086c8628e2231bfe69 SHA256 ab6206b70185c7dd4dfc280c18f3af2e4a77798d8b62e43770b55285ff1c11e8
AUX clang-3.1-gentoo-freebsd-fix-cxx-paths.patch 7959 RMD160 c00347f375bde4ef8c3aed9f1fe839175997fa6a SHA1 115bc02cf3ff10020da1d5fb6236ed38bf4aa635 SHA256 60e2477ff37baa3c43877a5962e39d88b1ad885f50aee418a44f53d7f5e87632
AUX clang-3.1-gentoo-freebsd-fix-lib-path.patch 646 RMD160 5c78398bf16c0cad3cc1d4c018cd8eb3dfeac30d SHA1 e9d5e4183ab8729d167afcdb7923ab8e9abe7c49 SHA256 4e0ac4fd0d5ce22d055c010d6696f8e625cfe56b10e26dc6575c81084c151751
AUX clang-3.1-gentoo-linux-fix-cxx-include.patch 836 RMD160 1ec5d07904cb6f8bac1bd6b364a23529695385ec SHA1 1e9d097f521bc1ac5ee04971442c069b07c20607 SHA256 5fa3d5094321084fdffad75492007c5f194cab2d4bb3b6d5eceaeae28ee1a1c0
-AUX clang-3.1-gentoo-runtime-gcc-detection-v2.patch 1402 RMD160 461b44ceb03a6032a61f208a0db209d148aef85d SHA1 bf583f79ecf0f2e5696ae39e953ceaf2d0ef8139 SHA256 3a3bca77dd11d7adb912e6c6f11b4cf3d4060e60e8e5475e979c118ab2dccb2c
+AUX clang-3.1-gentoo-runtime-gcc-detection-v3.patch 1457 RMD160 1c12bf8351c5147c727c3a932a4335f616d59e5d SHA1 410f0d3360b5590025398f10f067132843f0baa7 SHA256 f4b22281d21e39bc4681519cec90243c0e50262ce56ae68b0a8d9e7d92ce0375
AUX clang-3.1-gentoo-runtime-gcc-detection.patch 1272 RMD160 c204c5aac4eb7be0247c65f2fee6246d63b3cb72 SHA1 a86028612d67b16d77973735028778260cbd3832 SHA256 d50176ae5aa1264bc8dd18c8e25e316d14bc0e8237e58980779d7f76d528d187
AUX clang-3.1-increase-parser-recursion-limit.patch 495 RMD160 ee36c645b66a71839fb8fef8827b51652ee0a0c2 SHA1 154f47395be58673b814c8140bde3dcb42edcc82 SHA256 a0800603a8162de3beff5cc508648d6c4f5c0b095635ec8317682b04c6ce8e95
DIST clang-2.8.tgz 5666777 RMD160 f00956b6de29cc09f3992aeabd140f2189c6cf39 SHA1 94977c84ce136307dbbeade95e67bfe3c25161ff SHA256 ed83481553e6a39a8a2953e89630d881d87833506f096a90f18d93ec2bdee0c1
@@ -30,7 +31,7 @@ EBUILD clang-2.9-r1.ebuild 6431 RMD160 cb9ed182675f9a76beb2caa0fc1fe26bfc534dd9
EBUILD clang-3.0-r4.ebuild 7155 RMD160 65d79627dfaa26bfd327dd173bb4b2b69883e4ca SHA1 ded3b2503e357a8335a816774fb4fcc4deceb50c SHA256 012f34451fdaaf2cc6947e013ba584a8df07bd37b15fb48ba436da71da436aad
EBUILD clang-3.1-r1.ebuild 6078 RMD160 9240f45ff4f9b9fefde458968aa4002bd6409aa3 SHA1 60421abed151ce0a463b978c2d15d0236fb16d97 SHA256 92f13108a43de981b35437e9b7b68861fce5be395f313d4298b53d2e7e6999fe
EBUILD clang-3.1-r2.ebuild 6504 RMD160 7b5701a3420c6fc86c4c23ec7391f4ccef5769a4 SHA1 7578a7bfc609a697724998adeaf62f09ecd67cb6 SHA256 572e92bfffd67eda07839a6a4f46469187cd5067ec98884cdc656688ea304849
-EBUILD clang-3.1-r3.ebuild 6522 RMD160 8693be517eb064780c91b0cb721c4b11500aaf3b SHA1 bf80bf19a353759e64eb45125b1f856a48a9000a SHA256 0ac56487d24d885234b58c1ae72295f2a9949edd1a278b45fb0852812f72afe4
+EBUILD clang-3.1-r4.ebuild 6375 RMD160 fe635ceec8cb3cc2fa02381d932e724653353464 SHA1 b253a31284a66ff84ca6f31c6ff64382151879bd SHA256 f63a2d99a1ada65f2735844c841200c18f8e651382ef2139f6b803f54bc52f92
EBUILD clang-9999.ebuild 5654 RMD160 841c52548946fbb662ecf07653d8f7d77ba83607 SHA1 f1a1639d29f9da5e775c9df29620df16168fe801 SHA256 f6c8ec9c9439859eae3f1a71d55e91fe8f51ba07249cddaaf2191898743cd7cd
-MISC ChangeLog 13318 RMD160 879f41ca8508b10e3681aa6df1908c21a7c633da SHA1 a3731d5094b5af6558f69537378c92e1c0537648 SHA256 22929e32bac8772fe7d2d7aa7be180793a8e021877aa543970b8395b899297c2
+MISC ChangeLog 13629 RMD160 691c7cf7f8b5f63e342a72e2f6683e1f71770af2 SHA1 2085916d52946e34bf8c8caf58e1c66108957d5d SHA256 15316b0264bd820123b1cf74b239d4e167828d67aa931f8d4e4c65c2a985606d
MISC metadata.xml 1526 RMD160 d9a78d39d6024f98a9f7ed4bcb8479019b07e21e SHA1 d4aac42fd7d0cbc6570d0cadd0666eda7a3f8bf5 SHA256 142d229331f82d741b95b794866ca22b753722efd86d5d0e054f69cb5286f4bb
diff --git a/sys-devel/clang/clang-3.1-r3.ebuild b/sys-devel/clang/clang-3.1-r4.ebuild
index 33daa251a623..ff132f889baa 100644
--- a/sys-devel/clang/clang-3.1-r3.ebuild
+++ b/sys-devel/clang/clang-3.1-r4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-3.1-r3.ebuild,v 1.1 2012/06/05 02:03:46 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-3.1-r4.ebuild,v 1.1 2012/06/07 00:27:55 ryao Exp $
EAPI=4
@@ -74,17 +74,14 @@ src_prepare() {
sed -e "/^llc_props =/s/os.path.join(llvm_tools_dir, 'llc')/'llc'/" \
-i tools/clang/test/lit.cfg || die "test path sed failed"
- # Automatically select active system GCC's libraries, bugs #406163, #417913, #418141
- epatch "${FILESDIR}"/${P}-gentoo-runtime-gcc-detection-v2.patch
+ # Automatically select active system GCC's libraries, bugs #406163 and #417913
+ epatch "${FILESDIR}"/${P}-gentoo-runtime-gcc-detection-v3.patch
# Fix search paths on FreeBSD, bug #409269
epatch "${FILESDIR}"/${P}-gentoo-freebsd-fix-lib-path.patch
# Fix regression caused by removal of USE=system-cxx-headers, bug #417541
- epatch "${FILESDIR}"/${P}-gentoo-freebsd-fix-cxx-paths.patch
-
- # Fix regression that prevents Clang from building itself on Linux, bug #417537
- epatch "${FILESDIR}"/${P}-gentoo-linux-fix-cxx-include.patch
+ epatch "${FILESDIR}"/${P}-gentoo-freebsd-fix-cxx-paths-v2.patch
# Increase recursion limit, bug #417545, upstream r155737
epatch "${FILESDIR}"/${P}-increase-parser-recursion-limit.patch
diff --git a/sys-devel/clang/files/clang-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch b/sys-devel/clang/files/clang-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch
new file mode 100644
index 000000000000..1053bf3642bc
--- /dev/null
+++ b/sys-devel/clang/files/clang-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch
@@ -0,0 +1,188 @@
+diff --git a/a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp b/b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp
+index 1e282f2..1d6835b 100644
+--- a/a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp
++++ b/b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp
+@@ -2305,6 +2305,162 @@ void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
+ }
+ }
+
++void FreeBSD::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
++ ArgStringList &CC1Args) const {
++ const Driver &D = getDriver();
++
++ if (DriverArgs.hasArg(options::OPT_nostdinc))
++ return;
++
++ if (!DriverArgs.hasArg(options::OPT_nostdlibinc))
++ addSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/local/include");
++
++ if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
++ llvm::sys::Path P(D.ResourceDir);
++ P.appendComponent("include");
++ addSystemInclude(DriverArgs, CC1Args, P.str());
++ }
++
++ if (DriverArgs.hasArg(options::OPT_nostdlibinc))
++ return;
++
++ // Check for configure-time C include directories.
++ StringRef CIncludeDirs(C_INCLUDE_DIRS);
++ if (CIncludeDirs != "") {
++ SmallVector<StringRef, 5> dirs;
++ CIncludeDirs.split(dirs, ":");
++ for (SmallVectorImpl<StringRef>::iterator I = dirs.begin(), E = dirs.end();
++ I != E; ++I) {
++ StringRef Prefix = llvm::sys::path::is_absolute(*I) ? D.SysRoot : "";
++ addExternCSystemInclude(DriverArgs, CC1Args, Prefix + *I);
++ }
++ return;
++ }
++
++ // Lacking those, try to detect the correct set of system includes for the
++ // target triple.
++
++ // Implement generic Debian multiarch support.
++ const StringRef X86_64MultiarchIncludeDirs[] = {
++ "/usr/include/x86_64-linux-gnu",
++
++ // FIXME: These are older forms of multiarch. It's not clear that they're
++ // in use in any released version of Debian, so we should consider
++ // removing them.
++ "/usr/include/i686-linux-gnu/64",
++ "/usr/include/i486-linux-gnu/64"
++ };
++ const StringRef X86MultiarchIncludeDirs[] = {
++ "/usr/include/i386-linux-gnu",
++
++ // FIXME: These are older forms of multiarch. It's not clear that they're
++ // in use in any released version of Debian, so we should consider
++ // removing them.
++ "/usr/include/x86_64-linux-gnu/32",
++ "/usr/include/i686-linux-gnu",
++ "/usr/include/i486-linux-gnu"
++ };
++ const StringRef ARMMultiarchIncludeDirs[] = {
++ "/usr/include/arm-linux-gnueabi"
++ };
++ const StringRef MIPSMultiarchIncludeDirs[] = {
++ "/usr/include/mips-linux-gnu"
++ };
++ const StringRef MIPSELMultiarchIncludeDirs[] = {
++ "/usr/include/mipsel-linux-gnu"
++ };
++ const StringRef PPCMultiarchIncludeDirs[] = {
++ "/usr/include/powerpc-linux-gnu"
++ };
++ const StringRef PPC64MultiarchIncludeDirs[] = {
++ "/usr/include/powerpc64-linux-gnu"
++ };
++ ArrayRef<StringRef> MultiarchIncludeDirs;
++ if (getTriple().getArch() == llvm::Triple::x86_64) {
++ MultiarchIncludeDirs = X86_64MultiarchIncludeDirs;
++ } else if (getTriple().getArch() == llvm::Triple::x86) {
++ MultiarchIncludeDirs = X86MultiarchIncludeDirs;
++ } else if (getTriple().getArch() == llvm::Triple::arm) {
++ MultiarchIncludeDirs = ARMMultiarchIncludeDirs;
++ } else if (getTriple().getArch() == llvm::Triple::mips) {
++ MultiarchIncludeDirs = MIPSMultiarchIncludeDirs;
++ } else if (getTriple().getArch() == llvm::Triple::mipsel) {
++ MultiarchIncludeDirs = MIPSELMultiarchIncludeDirs;
++ } else if (getTriple().getArch() == llvm::Triple::ppc) {
++ MultiarchIncludeDirs = PPCMultiarchIncludeDirs;
++ } else if (getTriple().getArch() == llvm::Triple::ppc64) {
++ MultiarchIncludeDirs = PPC64MultiarchIncludeDirs;
++ }
++ for (ArrayRef<StringRef>::iterator I = MultiarchIncludeDirs.begin(),
++ E = MultiarchIncludeDirs.end();
++ I != E; ++I) {
++ if (llvm::sys::fs::exists(D.SysRoot + *I)) {
++ addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + *I);
++ break;
++ }
++ }
++
++ if (getTriple().getOS() == llvm::Triple::RTEMS)
++ return;
++
++ // Add an include of '/include' directly. This isn't provided by default by
++ // system GCCs, but is often used with cross-compiling GCCs, and harmless to
++ // add even when Clang is acting as-if it were a system compiler.
++ addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/include");
++
++ addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/include");
++}
++
++/// \brief Helper to add the thre variant paths for a libstdc++ installation.
++/*static*/ bool FreeBSD::addLibStdCXXIncludePaths(Twine Base, Twine TargetArchDir,
++ const ArgList &DriverArgs,
++ ArgStringList &CC1Args) {
++ if (!llvm::sys::fs::exists(Base))
++ return false;
++ addSystemInclude(DriverArgs, CC1Args, Base);
++ addSystemInclude(DriverArgs, CC1Args, Base + "/" + TargetArchDir);
++ addSystemInclude(DriverArgs, CC1Args, Base + "/backward");
++ return true;
++}
++
++void FreeBSD::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
++ ArgStringList &CC1Args) const {
++ if (DriverArgs.hasArg(options::OPT_nostdlibinc) ||
++ DriverArgs.hasArg(options::OPT_nostdincxx))
++ return;
++
++ // Check if libc++ has been enabled and provide its include paths if so.
++ if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) {
++ // libc++ is always installed at a fixed path on Linux currently.
++ addSystemInclude(DriverArgs, CC1Args,
++ getDriver().SysRoot + "/usr/include/c++/v1");
++ return;
++ }
++
++ // We need a detected GCC installation on Linux to provide libstdc++'s
++ // headers. We handled the libc++ case above.
++ if (!GCCInstallation.isValid())
++ return;
++
++ // By default, look for the C++ headers in an include directory adjacent to
++ // the lib directory of the GCC installation. Note that this is expect to be
++ // equivalent to '/usr/include/c++/X.Y' in almost all cases.
++ StringRef LibDir = GCCInstallation.getParentLibPath();
++ StringRef InstallDir = GCCInstallation.getInstallPath();
++ StringRef Version = GCCInstallation.getVersion();
++ if (!addLibStdCXXIncludePaths(LibDir + "/../include/c++/" + Version,
++ (GCCInstallation.getTriple().str() +
++ GCCInstallation.getMultiarchSuffix()),
++ DriverArgs, CC1Args)) {
++ // Gentoo is weird and places its headers inside the GCC install, so if the
++ // first attempt to find the headers fails, try this pattern.
++ addLibStdCXXIncludePaths(InstallDir + "/include/g++-v4",
++ (GCCInstallation.getTriple().str() +
++ GCCInstallation.getMultiarchSuffix()),
++ DriverArgs, CC1Args);
++ }
++}
++
+ /// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly.
+
+ DragonFly::DragonFly(const Driver &D, const llvm::Triple& Triple, const ArgList &Args)
+diff --git a/a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.h b/b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.h
+index eaa6be1..bba891e 100644
+--- a/a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.h
++++ b/b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.h
+@@ -489,6 +489,16 @@ public:
+
+ virtual Tool &SelectTool(const Compilation &C, const JobAction &JA,
+ const ActionList &Inputs) const;
++
++ virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs,
++ ArgStringList &CC1Args) const;
++ virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
++ ArgStringList &CC1Args) const;
++
++private:
++ static bool addLibStdCXXIncludePaths(Twine Base, Twine TargetArchDir,
++ const ArgList &DriverArgs,
++ ArgStringList &CC1Args);
+ };
+
+ class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF {
diff --git a/sys-devel/clang/files/clang-3.1-gentoo-runtime-gcc-detection-v2.patch b/sys-devel/clang/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch
index 47d554357bd8..49f108533404 100644
--- a/sys-devel/clang/files/clang-3.1-gentoo-runtime-gcc-detection-v2.patch
+++ b/sys-devel/clang/files/clang-3.1-gentoo-runtime-gcc-detection-v3.patch
@@ -1,11 +1,11 @@
diff -upNr a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp
--- a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-24 03:32:31.593191000 -0400
+++ b/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-24 03:38:31.733163513 -0400
-@@ -1145,6 +1145,24 @@ Generic_GCC::GCCInstallationDetector::GC
+@@ -1145,6 +1145,25 @@ Generic_GCC::GCCInstallationDetector::GC
Prefixes.push_back(D.InstalledDir + "/..");
}
-+ llvm::OwningPtr<llvm::MemoryBuffer> File;
++ llvm::OwningPtr<llvm::MemoryBuffer> File;
+ for (unsigned k = 0, ke = CandidateTripleAliases.size(); k < ke; ++k) {
+ if (!llvm::MemoryBuffer::getFile(D.SysRoot + "/etc/env.d/gcc/config-" + CandidateTripleAliases[k].str(), File))
+ {
@@ -17,6 +17,7 @@ diff -upNr a/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp b/llvm-3.1.src/t
+ Version = GCCVersion::Parse(VersionText);
+ GCCInstallPath = GentooPath;
+ GCCParentLibPath = GCCInstallPath + "/../../..";
++ GCCTriple.setTriple(CandidateTripleAliases[k]);
+ IsValid = true;
+ return;
+ }