diff options
author | Fabian Groffen <grobian@gentoo.org> | 2010-10-24 12:11:06 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2010-10-24 12:11:06 +0000 |
commit | d3c0f0d428d43f4a7c27fcc6da83e981d7286031 (patch) | |
tree | 5291613c470d46aa49bfbf06de23d3f0d98cf4fe /sys-devel/clang | |
parent | Add new revision and drop ruby19 support from the previous to create a stable... (diff) | |
download | historical-d3c0f0d428d43f4a7c27fcc6da83e981d7286031.tar.gz historical-d3c0f0d428d43f4a7c27fcc6da83e981d7286031.tar.bz2 historical-d3c0f0d428d43f4a7c27fcc6da83e981d7286031.zip |
Fix compilation on Darwin, fixes bug #342373, adds back necessary bits for bug #339922
Package-Manager: portage-2.2.01.17063-prefix/cvs/Darwin powerpc
Diffstat (limited to 'sys-devel/clang')
-rw-r--r-- | sys-devel/clang/ChangeLog | 7 | ||||
-rw-r--r-- | sys-devel/clang/Manifest | 5 | ||||
-rw-r--r-- | sys-devel/clang/clang-2.8-r2.ebuild | 22 | ||||
-rw-r--r-- | sys-devel/clang/files/clang-2.8-darwin-prefix.patch | 127 |
4 files changed, 156 insertions, 5 deletions
diff --git a/sys-devel/clang/ChangeLog b/sys-devel/clang/ChangeLog index 0422ef98ec7e..e0b56f26d380 100644 --- a/sys-devel/clang/ChangeLog +++ b/sys-devel/clang/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-devel/clang # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.29 2010/10/21 08:14:07 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.30 2010/10/24 12:11:06 grobian Exp $ + + 24 Oct 2010; Fabian Groffen <grobian@gentoo.org> clang-2.8-r2.ebuild, + +files/clang-2.8-darwin-prefix.patch: + Fix compilation on Darwin, fixes bug #342373, adds back necessary bits for + bug #339922 *clang-2.8-r2 (21 Oct 2010) diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest index dc3427a520b4..0b1a6c6b4fee 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -1,12 +1,13 @@ AUX clang-2.7-darwin-prefix.patch 3294 RMD160 4968d4703833035b17ec87ddc5a03fcc242be9e1 SHA1 cfaa15d0bca9798492b68e3f36ba8a146f0c6b33 SHA256 6e14d6363ae32febb96a8ffe599b32a96691baef27c48d5186f368036d4e2378 AUX clang-2.7-fixdoc.patch 1977 RMD160 62f52e5580baa396d93c56735c0039c8691b43b6 SHA1 351c1d2cf86b6da75a6ed19083d7a857333f007c SHA256 36c2214e575ed3fd78938279739e82c4f750f8726f8387e1414c18532501314a +AUX clang-2.8-darwin-prefix.patch 4989 RMD160 e2c863f62b6f9ef3b26b9b2a41cfd9950fb174b4 SHA1 dfda0f3d1f9bac791ed7fb0c06d8c91e931a8fd5 SHA256 808d6d47b7eb133a4e1091bf24b64690fe14d3f5b66fec7a9ed3d91aeb1f03d7 DIST clang-2.7.tgz 4953739 RMD160 177fdcf59be4a60c37cf0dfb058535c9cdbbad4e SHA1 4d8326bfe2308a7355a5e4ca2eb172bffd761e1e SHA256 fb349471947f155c1cda1c8a4a3bbc7fa437b86f6875d9978f86c915dfed623a DIST clang-2.8.tgz 5666777 RMD160 f00956b6de29cc09f3992aeabd140f2189c6cf39 SHA1 94977c84ce136307dbbeade95e67bfe3c25161ff SHA256 ed83481553e6a39a8a2953e89630d881d87833506f096a90f18d93ec2bdee0c1 DIST llvm-2.7.tgz 8374297 RMD160 0fa2f362dd6a45efec35ce8fa0f8d36d98f32c8f SHA1 059fc21b0ec1b649c4a3dec81756e5f92aa131a2 SHA256 99664bdc8503a306038166af33f28eb426d99e297575a59d74a1a0dcbddbbca5 DIST llvm-2.8-r1.tgz 9112527 RMD160 3f5a71d07e105a7cf46eafc7a9006a927035012c SHA1 6d49fe039d28e8664de25491c775cb2c599e30c1 SHA256 25addb742f1c6cc12877ed0ee924dda962d848368ee095be8e48342ae613d43b EBUILD clang-2.7-r4.ebuild 5698 RMD160 3696f22da1c248567a23f7d93c074f20e4b18647 SHA1 3d68f473c04054bbed11c4397925f1bbc5fcf0e5 SHA256 ccbb47c31340d22ed2f3e78f162d6e68975107609b2dcee3bf4e61c8f29b5c3b EBUILD clang-2.8-r1.ebuild 5557 RMD160 8bfc20e270118f636cc653c6077f57744910a45f SHA1 820b2e58a0858462127481674d434306ce0b9d54 SHA256 21c9c19e4f61c1541112dee465e236390437230d88ef8433e5a8b1d5d30f9871 -EBUILD clang-2.8-r2.ebuild 5677 RMD160 db798c45bf1431772585de12563963ee390f8a01 SHA1 6e83cb7c03a662df42857b716bf84e5942a1ebc2 SHA256 e07c24c4b53972032791464cdb14b8736ab3a2625fadaa7da9719ff78868f81f +EBUILD clang-2.8-r2.ebuild 6307 RMD160 62baa0421668c71c659760738750f9d6cffc878e SHA1 98afea11daf77871d03bd6b2ac8fcfff015ba18d SHA256 a3fc1a8ecee693a981d4899d8bafe4f72d2a38d5a91d87a124d5de0cd7b2203e EBUILD clang-9999.ebuild 5344 RMD160 be0a3f8dc4ffb0d8e4a9ac5da2fb54283cadf95f SHA1 c551213b089348cae03a40ec341a99551be46e05 SHA256 3542307d01c6acc54baccd228ce159b36deea9670577ed22a5608ad4f52d28ff -MISC ChangeLog 5338 RMD160 c14f657a587144ea616a03b72786a4a8a125bbaf SHA1 6e089ce011089956c756c851ba53031e9fd595eb SHA256 106038ce4683a7330fac4f2c2b4992d10ef51a8f3b12c1a18a9d8c1e0050695d +MISC ChangeLog 5541 RMD160 6eab6fb1f2715dc2f3a0b7d8ce820b6d51c9d241 SHA1 0ade3b2b6272b7d8cc5ecefe02ccde73f28dfabc SHA256 cdad626d80f689feed50d1ac1e05d98f642ea15c9381ff8997d91a4f5427932b MISC metadata.xml 1360 RMD160 73b894c5108dd5d2d3b49f82353920da7f2adc4c SHA1 6808434002d0109de4ef8f52ad4a9cc4f4a2fbfc SHA256 14c80bf0afbebde4ec5bc2332865762d3dcd98db842cf52fc78617b4889dae38 diff --git a/sys-devel/clang/clang-2.8-r2.ebuild b/sys-devel/clang/clang-2.8-r2.ebuild index cffcbd8d3e65..a99a9f7ee4aa 100644 --- a/sys-devel/clang/clang-2.8-r2.ebuild +++ b/sys-devel/clang/clang-2.8-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-2.8-r2.ebuild,v 1.1 2010/10/21 08:14:07 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-2.8-r2.ebuild,v 1.2 2010/10/24 12:11:06 grobian Exp $ EAPI=3 @@ -33,6 +33,14 @@ src_prepare() { # Same as llvm doc patches epatch "${FILESDIR}"/${PN}-2.7-fixdoc.patch + # Fix toolchain lookup for Darwin/Prefix. + epatch "${FILESDIR}"/${PN}-2.8-darwin-prefix.patch + sed -e "s|@GENTOO_PORTAGE_CHOST_ARCH@|${CHOST%%-darwin*}-darwin|g" \ + -e "s|@GENTOO_PORTAGE_CHOST@|${CHOST}|g" \ + -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" \ + -i tools/clang/lib/Driver/ToolChains.cpp \ + || die "fixing toolchain lookup" + # multilib-strict sed -e "/PROJ_headers/s#lib/clang#$(get_libdir)/clang#" \ -i tools/clang/lib/Headers/Makefile \ @@ -149,9 +157,19 @@ src_install() { # Fix install_names on Darwin. The build system is too complicated # to just fix this, so we correct it post-install if [[ ${CHOST} == *-darwin* ]] ; then - for lib in libCIndex.dylib ; do + for lib in lib{CIndex,clang}.dylib ; do + ebegin "fixing install_name of $lib" install_name_tool -id "${EPREFIX}"/usr/lib/llvm/${lib} \ "${ED}"/usr/lib/llvm/${lib} + eend $? + done + for f in c-index-test ; do + ebegin "fixing reference to libclang.dylib in $f" + install_name_tool \ + -change "@rpath/libclang.dylib" \ + "${EPREFIX}"/usr/lib/llvm/libclang.dylib \ + "${ED}"/usr/bin/$f + eend $? done fi } diff --git a/sys-devel/clang/files/clang-2.8-darwin-prefix.patch b/sys-devel/clang/files/clang-2.8-darwin-prefix.patch new file mode 100644 index 000000000000..555b8ee0bcc9 --- /dev/null +++ b/sys-devel/clang/files/clang-2.8-darwin-prefix.patch @@ -0,0 +1,127 @@ +This code looks as if it is written by Apple, lots of assumptions that +only hold for them and their scenario. + +--- tools/clang/lib/Driver/ToolChains.cpp ++++ tools/clang/lib/Driver/ToolChains.cpp +@@ -131,7 +131,7 @@ + GCCVersion[2] = 1; + + // Set up the tool chain paths to match gcc. +- ToolChainDir = "i686-apple-darwin"; ++ ToolChainDir = "@GENTOO_PORTAGE_CHOST@"; + ToolChainDir += llvm::utostr(DarwinVersion[0]); + ToolChainDir += "/"; + ToolChainDir += llvm::utostr(GCCVersion[0]); +@@ -141,9 +141,9 @@ + ToolChainDir += llvm::utostr(GCCVersion[2]); + + // Try the next major version if that tool chain dir is invalid. +- std::string Tmp = "/usr/lib/gcc/" + ToolChainDir; ++ std::string Tmp = "@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir; + if (!llvm::sys::Path(Tmp).exists()) { +- std::string Next = "i686-apple-darwin"; ++ std::string Next = "@GENTOO_PORTAGE_CHOST_ARCH@"; + Next += llvm::utostr(DarwinVersion[0] + 1); + Next += "/"; + Next += llvm::utostr(GCCVersion[0]); +@@ -155,7 +155,7 @@ + // Use that if it exists, otherwise hope the user isn't linking. + // + // FIXME: Drop dependency on gcc's tool chain. +- Tmp = "/usr/lib/gcc/" + Next; ++ Tmp = "@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + Next; + if (llvm::sys::Path(Tmp).exists()) + ToolChainDir = Next; + } +@@ -168,7 +168,7 @@ + Path += "/x86_64"; + getFilePaths().push_back(Path); + +- Path = "/usr/lib/gcc/"; ++ Path = "@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/"; + Path += ToolChainDir; + Path += "/x86_64"; + getFilePaths().push_back(Path); +@@ -179,7 +179,7 @@ + Path += ToolChainDir; + getFilePaths().push_back(Path); + +- Path = "/usr/lib/gcc/"; ++ Path = "@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/"; + Path += ToolChainDir; + getFilePaths().push_back(Path); + +@@ -188,7 +188,7 @@ + Path += ToolChainDir; + getProgramPaths().push_back(Path); + +- Path = "/usr/libexec/gcc/"; ++ Path = "@GENTOO_PORTAGE_EPREFIX@/usr/libexec/gcc/"; + Path += ToolChainDir; + getProgramPaths().push_back(Path); + +@@ -291,14 +291,14 @@ + + // FIXME: Derive these correctly. + if (getArchName() == "x86_64") { +- CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir + ++ CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir + + "/x86_64")); + // Intentionally duplicated for (temporary) gcc bug compatibility. +- CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir + ++ CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir + + "/x86_64")); + } + +- CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/" + ToolChainDir)); ++ CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/" + ToolChainDir)); + + Tmp = getDriver().Dir + "/../lib/gcc/" + ToolChainDir; + if (llvm::sys::Path(Tmp).exists()) +@@ -306,18 +306,18 @@ + Tmp = getDriver().Dir + "/../lib/gcc"; + if (llvm::sys::Path(Tmp).exists()) + CmdArgs.push_back(Args.MakeArgString("-L" + Tmp)); +- CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir)); ++ CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir)); + // Intentionally duplicated for (temporary) gcc bug compatibility. +- CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir)); ++ CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir)); + Tmp = getDriver().Dir + "/../lib/" + ToolChainDir; + if (llvm::sys::Path(Tmp).exists()) + CmdArgs.push_back(Args.MakeArgString("-L" + Tmp)); + Tmp = getDriver().Dir + "/../lib"; + if (llvm::sys::Path(Tmp).exists()) + CmdArgs.push_back(Args.MakeArgString("-L" + Tmp)); +- CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir + ++ CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir + + "/../../../" + ToolChainDir)); +- CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + ToolChainDir + ++ CmdArgs.push_back(Args.MakeArgString("-L@GENTOO_PORTAGE_EPREFIX@/usr/lib/gcc/" + ToolChainDir + + "/../../..")); + } + +@@ -386,22 +386,7 @@ + P.eraseComponent(); // .../usr/bin -> ../usr + P.appendComponent("lib"); + P.appendComponent("gcc"); +- switch (getTriple().getArch()) { +- default: +- assert(0 && "Invalid Darwin arch!"); +- case llvm::Triple::x86: +- case llvm::Triple::x86_64: +- P.appendComponent("i686-apple-darwin10"); +- break; +- case llvm::Triple::arm: +- case llvm::Triple::thumb: +- P.appendComponent("arm-apple-darwin10"); +- break; +- case llvm::Triple::ppc: +- case llvm::Triple::ppc64: +- P.appendComponent("powerpc-apple-darwin10"); +- break; +- } ++ P.appendComponent("@GENTOO_PORTAGE_CHOST@"); + P.appendComponent("4.2.1"); + + // Determine the arch specific GCC subdirectory. |