Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=xorgtesting.git;a=commitdiff;h=bff0aff97234adab375b35150bafc99a9df39fb9
commit bff0aff97234adab375b35150bafc99a9df39fb9 Author: Marius Cirsta <[email protected]> Date: Sun Mar 11 05:08:05 2012 +0000 llvm-3.0-1-x86_64 * changed m8r * version bump * clean the mess diff --git a/source/devel-extra/llvm/FrugalBuild b/source/devel-extra/llvm/FrugalBuild index 905df43..a649688 100644 --- a/source/devel-extra/llvm/FrugalBuild +++ b/source/devel-extra/llvm/FrugalBuild @@ -1,30 +1,27 @@ -# Compiling Time: 0.18 SBU -# Maintainer: James Buren <[email protected]> +# Compiling Time: 4.74 SBU +# Maintainer: Marius Cirsta <[email protected]> pkgname=llvm -pkgver=2.9 -pkgrel=4 +pkgver=3.0 +pkgrel=1 url="http://www.llvm.org" -pkgdesc="Low Level Virtual Machine ( Compiler , Tools and Libs )" +pkgdesc="Low Level Virtual Machine (Compiler , Tools and Libs)" depends=('libstdc++') makedepends=('groff' 'libffi' 'python' 'ocaml') groups=('devel-extra') -archs=('i686' 'x86_64' 'ppc' 'arm') +archs=('i686' 'x86_64' 'arm') up2date="Flasttar $url/releases/download.html" -source=(http://llvm.org/releases/$pkgver/$pkgname-$pkgver.tgz \ - http://llvm.org/releases/$pkgver/clang-$pkgver.tgz \ - clang-plugin-loader-registry.patch \ - cindexer-clang-path.patch \ - clang-toolchains-gcc-versions.patch \ - clang-pure64.patch \ - enable-lto.patch) -sha1sums=('500f587f840199ac53c4fc7572839d08fa9d9123' \ - '5fd3b5cec050ec12858c1602b23cf096282ad4a4' \ - 'f616f6147bb6bd752b9f3f3e93a569cc70442107' \ - '8d091c17cb43e6afbaa5c5381a29764676b3017f' \ - 'c55bfa2448b605e9eb300b07950860eb2f9cc8a1' \ - 'f2ed97c095d8ffd04f8e2dd623ab38eb6db0d020' \ - 'c59f4bb865f9f513096fff12cefa4583fa5d9e59') +source=(http://llvm.org/releases/$pkgver/$pkgname-$pkgver.tar.gz \ + http://llvm.org/releases/$pkgver/clang-$pkgver.tar.gz \ + path-fix.patch ocaml-fix.patch rpath-fix.patch clang-pure64.patch) +_F_cd_path=${pkgname}-${pkgver}.src +_F_make_opts="REQUIRES_RTTI=1" +sha1sums=('b683e7294fcf69887c0d709025d4640f5dca755b' \ + '1fa11f07f957bd9c9de003d1b5a7a9ba1e0055e4' \ + '078ace62073031ca58312555f1c1c09be232deef' \ + 'b35b5b984ff5b362de5d68162fc3cc0b12cb3632' \ + 'be384a4393b30004d46740e7c7742d4c8c172f8d' \ + 'fe4845cd0a6078b812a2cc9efe8630b975a0d01d') subpkgs=("${subpkgs[@]}" "clang") subdescs=("${subdescs[@]}" "C language family frontend for LLVM") @@ -41,123 +38,43 @@ subgroups=("${subgroups[@]}" 'devel-extra') subarchs=("${subarchs[@]}" 'i686 x86_64') build() { - Fcd - # At the present, clang must reside inside the LLVM source code tree to build - # See http://llvm.org/bugs/show_bug.cgi?id=4840 - rm -rf tools/clang || Fdie - cp -r "$Fsrcdir/clang-$pkgver" tools/clang || Fdie + Fpatch path-fix.patch + Fpatch ocaml-fix.patch + Fpatch rpath-fix.patch - # Fix symbolic links from OCaml bindings to LLVM libraries - sed -i 's:\$(PROJ_libdir):/usr/lib/llvm:' bindings/ocaml/Makefile.ocaml || Fdie + # clang must be copied here to build with llvm + mv ../clang-${pkgver}.src/ ./tools/clang - # Fix installation directories, ./configure doesn't seem to set them right - sed -i -e 's:\$(PROJ_prefix)/etc/llvm:/etc/llvm:' \ - -e 's:\$(PROJ_prefix)/lib:$(PROJ_prefix)/lib/llvm:' \ - -e 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \ - Makefile.config.in || Fdie + pwd + file ./tools/clang/lib/Driver/Tools.cpp + #patches for clang + [ "$CARCH" == "x86_64" ] && Fpatch clang-pure64.patch - # Fix insecure rpath (http://bugs.archlinux.org/task/14017) - sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' Makefile.rules || Fdie - - # Get the correct list of symbols to export - # See http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-April/008559.html - Fpatch clang-plugin-loader-registry.patch - - # Fix clang path in CIndexer.cpp (https://bugs.archlinux.org/task/22799) - cd tools/clang || Fdie - Fpatch cindexer-clang-path.patch - - # Add GCC 4.6.1 to GccVersions (FS#23631) - Fpatch clang-toolchains-gcc-versions.patch - - if [[ $CARCH == x86_64 ]]; then - # Adjust lib paths - Fpatch clang-pure64.patch - fi - - # Make -flto work - # Use gold instead of default linker, and always use the plugin - Fpatch enable-lto.patch - - # Apply strip option to configure + #Apply strip option to configure _optimized_switch="enable" [[ $(check_option strip) == n ]] && _optimized_switch="disable" - # Include location of libffi headers in CPPFLAGS - export CPPFLAGS="$CPPFLAGS $(pkg-config --cflags libffi)" - - _cxx_headers="/usr/include/c++/clang-$pkgver" - - cd ../.. || Fdie - Fconf \ - --prefix=/usr \ - --libdir=/usr/lib/llvm \ - --sysconfdir=/etc \ - --enable-shared \ - --enable-libffi \ - --enable-targets=all \ - --disable-expensive-checks \ - --disable-debug-runtime \ - --disable-assertions \ - #--with-binutils-include=/usr/include \ - --with-cxx-include-root=$_cxx_headers \ - --with-cxx-include-arch=$CHOST \ - --$_optimized_switch-optimized - - make REQUIRES_RTTI=1 || Fdie - - # We move the clang directory out of the tree so it won't get installed and - # then we bring it back in for the clang package - mv tools/clang "$Fsrcdir" - # -j1 is due to race conditions during the installation of the OCaml bindings - make -j1 DESTDIR="$Fdestdir" install || Fdie - mv "$Fsrcdir/clang" tools || Fdie + Fmake --libdir=/usr/lib/llvm \ + --enable-shared \ + --enable-libffi \ + --enable-targets=all \ + --$_optimized_switch-optimized - # Remove duplicate files installed by the OCaml bindings - rm "$Fdestdir"/usr/{lib/llvm/libllvm*,share/doc/llvm/ocamldoc.tar.gz} || Fdie + Fmakeinstall - # Fix permissions of static libs - chmod -x "$Fdestdir"/usr/lib/llvm/*.a || Fdie - - # Fix libdir in llvm-config (http://bugs.archlinux.org/task/14487) + # Fix libdir in llvm-config, llvm libs won't be found otherwise sed -i 's:\(ABS_RUN_DIR/lib\):\1/llvm:' "$Fdestdir/usr/bin/llvm-config" || Fdie - # Get rid of example Hello transformation - rm "$Fdestdir"/usr/lib/llvm/*LLVMHello.* || Fdie - - # Symlink the gold plugin where clang expects it - ln -s llvm/LLVMgold.so "$Fdestdir/usr/lib/LLVMgold.so" || Fdie - # Add ld.so.conf.d entry - install -d "$Fdestdir/etc/ld.so.conf.d" || Fdie + Fmkdir "etc/ld.so.conf.d" echo /usr/lib/llvm >"$Fdestdir/etc/ld.so.conf.d/llvm.conf" || Fdie - Fcd - - # Remove execute bit from static libraries - chmod -x "$Fdestdir"/usr/lib/ocaml/libllvm*.a || Fdie - - # Fix installation path for clang docs - sed -i 's:$(PROJ_prefix)/share/doc/llvm:$(PROJ_prefix)/share/doc/clang:' \ - "$Fsrcdir/llvm-$pkgver/Makefile.config" || Fdie - - cd "$Fsrcdir/llvm-$pkgver/tools/clang" || Fdie - make DESTDIR="$Fdestdir" install || Fdie - - # Fix permissions of static libs - chmod -x "$Fdestdir"/usr/lib/llvm/*.a || Fdie - - # Revert the path change in case we want to do a repackage later - sed -i 's:$(PROJ_prefix)/share/doc/clang:$(PROJ_prefix)/share/doc/llvm:' \ - "$Fsrcdir/llvm-$pkgver/Makefile.config" || Fdie - - Fsplit clang /usr/bin/clang* - Fsplit clang /usr/include/clang* + Fsplit clang usr/bin/clang* + Fsplit clang usr/include/clang* - Fsplit clang /usr/lib/clang/ - Fsplit clang /usr/lib/llvm/libclang* - Fsplit clang /usr/share/doc/clang - Fsplit clang /usr/share/man/man1/clang* + Fsplit clang usr/lib/clang/ + Fsplit clang usr/lib/llvm/libclang* + Fsplit clang usr/share/man/man1/clang* Fsplit $pkgname-ocaml usr/lib/ocaml/ Fsplit $pkgname-ocaml usr/share/doc/llvm/ocamldoc/ diff --git a/source/devel-extra/llvm/cindexer-clang-path.patch b/source/devel-extra/llvm/cindexer-clang-path.patch deleted file mode 100644 index ddaab69..0000000 --- a/source/devel-extra/llvm/cindexer-clang-path.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- tools/libclang/CIndexer.cpp.orig 2011-04-07 13:08:24.000000000 +0300 -+++ tools/libclang/CIndexer.cpp 2011-04-07 13:11:52.224884642 +0300 -@@ -80,6 +80,7 @@ std::string CIndexer::getClangResourcesP - - // We now have the CIndex directory, locate clang relative to it. - LibClangPath.eraseComponent(); -+ LibClangPath.eraseComponent(); - #endif - - LibClangPath.appendComponent("clang"); diff --git a/source/devel-extra/llvm/clang-plugin-loader-registry.patch b/source/devel-extra/llvm/clang-plugin-loader-registry.patch deleted file mode 100644 index f46eb9f..0000000 --- a/source/devel-extra/llvm/clang-plugin-loader-registry.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -upr llvm-2.7.orig/autoconf/ExportMap.map llvm-2.7/autoconf/ExportMap.map ---- llvm-2.7.orig/autoconf/ExportMap.map 2010-02-25 00:33:41.000000000 +0200 -+++ llvm-2.7/autoconf/ExportMap.map 2010-05-10 14:14:22.000000000 +0300 -@@ -2,6 +2,7 @@ - global: main; - __progname; - environ; -+ _ZN4llvm8RegistryIN5clang14FrontendActionENS_14RegistryTraitsIS2_EEE4HeadE; - - local: *; - }; diff --git a/source/devel-extra/llvm/clang-pure64.patch b/source/devel-extra/llvm/clang-pure64.patch index da61785..b689ab1 100644 --- a/source/devel-extra/llvm/clang-pure64.patch +++ b/source/devel-extra/llvm/clang-pure64.patch @@ -1,38 +1,11 @@ -Index: lib/Driver/Tools.cpp -=================================================================== ---- lib/Driver/Tools.cpp (revision 123373) -+++ lib/Driver/Tools.cpp (working copy) +--- llvm-3.0.src/tools/clang/lib/Driver/Tools.cpp ++++ llvm-3.0.src.new/tools/clang/lib/Driver/Tools.cpp @@ -3306,7 +3306,7 @@ - else if (ToolChain.getArch() == llvm::Triple::arm) - CmdArgs.push_back("/lib/ld-linux.so.3"); + else if (ToolChain.getArch() == llvm::Triple::ppc64) + CmdArgs.push_back("/lib64/ld64.so.1"); else - CmdArgs.push_back("/lib64/ld-linux-x86-64.so.2"); + CmdArgs.push_back("/lib/ld-linux-x86-64.so.2"); } CmdArgs.push_back("-o"); -Index: lib/Driver/ToolChains.cpp -=================================================================== ---- lib/Driver/ToolChains.cpp (revision 123373) -+++ lib/Driver/ToolChains.cpp (working copy) -@@ -1317,18 +1317,10 @@ - if (Arch == llvm::Triple::x86) - Suffix64 = "/64"; - -- std::string Lib32 = "lib"; -- -- bool Exists; -- if (!llvm::sys::fs::exists("/lib32", Exists) && Exists) -- Lib32 = "lib32"; -- -+ std::string Lib32 = "lib32"; - std::string Lib64 = "lib"; -- bool Symlink; -- if (!llvm::sys::fs::exists("/lib64", Exists) && Exists && -- (llvm::sys::fs::is_symlink("/lib64", Symlink) || !Symlink)) -- Lib64 = "lib64"; - -+ bool Exists; - std::string GccTriple = ""; - if (Arch == llvm::Triple::arm) { - if (!llvm::sys::fs::exists("/usr/lib/gcc/arm-linux-gnueabi", Exists) && diff --git a/source/devel-extra/llvm/clang-toolchains-gcc-versions.patch b/source/devel-extra/llvm/clang-toolchains-gcc-versions.patch deleted file mode 100644 index 7e00837..0000000 --- a/source/devel-extra/llvm/clang-toolchains-gcc-versions.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upr clang-2.9.orig/lib/Driver/ToolChains.cpp clang-2.9/lib/Driver/ToolChains.cpp ---- clang-2.9.orig/lib/Driver/ToolChains.cpp 2011-03-21 23:29:27.000000000 +0200 -+++ clang-2.9/lib/Driver/ToolChains.cpp 2011-04-08 00:03:34.000000000 +0300 -@@ -1449,7 +1449,7 @@ Linux::Linux(const HostInfo &Host, const - GccTriple = "i586-suse-linux"; - } - -- const char* GccVersions[] = {"4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4", -+ const char* GccVersions[] = {"4.6.1", "4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4", - "4.4.3", "4.4", "4.3.4", "4.3.3", "4.3.2", - "4.3", "4.2.4", "4.2.3", "4.2.2", "4.2.1", - "4.2"}; diff --git a/source/devel-extra/llvm/enable-lto.patch b/source/devel-extra/llvm/enable-lto.patch deleted file mode 100644 index 40d9310..0000000 --- a/source/devel-extra/llvm/enable-lto.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: lib/Driver/ToolChains.cpp -=================================================================== ---- lib/Driver/ToolChains.cpp (revision 123373) -+++ lib/Driver/ToolChains.cpp (working copy) -@@ -1398,11 +1398,11 @@ - Lib = Lib64; - } - -- llvm::sys::Path LinkerPath(Base + "/../../../../" + GccTriple + "/bin/ld"); -+ llvm::sys::Path LinkerPath(Base + "/../../../../" + GccTriple + "/bin/ld.gold"); - if (!llvm::sys::fs::exists(LinkerPath.str(), Exists) && Exists) - Linker = LinkerPath.str(); - else -- Linker = GetProgramPath("ld"); -+ Linker = GetProgramPath("ld.gold"); - - LinuxDistro Distro = DetectLinuxDistro(Arch); - -Index: lib/Driver/Tools.cpp -=================================================================== ---- lib/Driver/Tools.cpp (revision 123373) -+++ lib/Driver/Tools.cpp (working copy) -@@ -3412,11 +3412,11 @@ - } - } - -- if (Args.hasArg(options::OPT_use_gold_plugin)) { -+ // if (Args.hasArg(options::OPT_use_gold_plugin)) { - CmdArgs.push_back("-plugin"); - std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so"; - CmdArgs.push_back(Args.MakeArgString(Plugin)); -- } -+ // } - - C.addCommand(new Command(JA, *this, ToolChain.Linker.c_str(), CmdArgs)); - } diff --git a/source/devel-extra/llvm/ocaml-fix.patch b/source/devel-extra/llvm/ocaml-fix.patch new file mode 100644 index 0000000..6695b0c --- /dev/null +++ b/source/devel-extra/llvm/ocaml-fix.patch @@ -0,0 +1,11 @@ +--- llvm-3.0.src/bindings/ocaml/llvm/Makefile 2011-10-14 20:38:02.000000000 +0000 ++++ llvm-3.0.src.new/bindings/ocaml/llvm/Makefile 2012-03-08 02:30:43.000000000 +0000 +@@ -30,7 +30,7 @@ + $(OcamlDir)/META.llvm: META.llvm + $(Verb) $(CP) -f $< $@ + +-install-meta:: $(ObjDir)/META.llvm ++install-meta:: $(ObjDir)/../META.llvm + $(Echo) "Install $(BuildMode) $(DestMETA)" + $(Verb) $(MKDIR) $(PROJ_libocamldir) + $(Verb) $(DataInstall) META.llvm "$(DestMETA)" diff --git a/source/devel-extra/llvm/path-fix.patch b/source/devel-extra/llvm/path-fix.patch new file mode 100644 index 0000000..e6ece29 --- /dev/null +++ b/source/devel-extra/llvm/path-fix.patch @@ -0,0 +1,16 @@ +--- llvm-3.0.src/Makefile.config.in 2011-10-13 17:27:34.000000000 +0000 ++++ llvm-3.0.src.new/Makefile.config.in 2012-03-08 02:30:43.000000000 +0000 +@@ -81,10 +81,10 @@ + LLVMMAKE := $(LLVM_SRC_ROOT)/make + + PROJ_bindir := $(PROJ_prefix)/bin +-PROJ_libdir := $(PROJ_prefix)/lib ++PROJ_libdir := $(PROJ_prefix)/lib/llvm + PROJ_datadir := $(PROJ_prefix)/share +-PROJ_docsdir := $(PROJ_prefix)/docs/llvm +-PROJ_etcdir := $(PROJ_prefix)/etc/llvm ++PROJ_docsdir := $(PROJ_prefix)/share/doc/llvm ++PROJ_etcdir := /etc/llvm + PROJ_includedir := $(PROJ_prefix)/include + PROJ_infodir := $(PROJ_prefix)/info + PROJ_mandir := $(PROJ_prefix)/share/man diff --git a/source/devel-extra/llvm/rpath-fix.patch b/source/devel-extra/llvm/rpath-fix.patch new file mode 100644 index 0000000..b60101d --- /dev/null +++ b/source/devel-extra/llvm/rpath-fix.patch @@ -0,0 +1,14 @@ +--- llvm-3.0.src/Makefile.rules 2011-10-11 12:51:44.000000000 +0000 ++++ llvm-3.0.src.new/Makefile.rules 2012-03-08 02:30:43.000000000 +0000 +@@ -546,9 +546,9 @@ + ifdef TOOLNAME + LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' + ifdef EXAMPLE_TOOL +- LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag) ++ LD.Flags += $(DynamicFlag) + else +- LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag) ++ LD.Flags += $(DynamicFlag) + endif + endif + else _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
