diff options
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/llvm/ChangeLog | 7 | ||||
-rw-r--r-- | sys-devel/llvm/files/clang-3.4-darwin_build_fix.patch | 47 | ||||
-rw-r--r-- | sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch | 18 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-3.4.2.ebuild | 52 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-3.5.0.ebuild | 52 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-9999.ebuild | 6 |
6 files changed, 140 insertions, 42 deletions
diff --git a/sys-devel/llvm/ChangeLog b/sys-devel/llvm/ChangeLog index a4db6a8fba5e..de56b4f82165 100644 --- a/sys-devel/llvm/ChangeLog +++ b/sys-devel/llvm/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-devel/llvm # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.209 2014/10/20 07:08:16 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.210 2014/11/10 20:37:57 grobian Exp $ + + 10 Nov 2014; Fabian Groffen <grobian@gentoo.org> llvm-3.4.2.ebuild, + llvm-3.5.0.ebuild, llvm-9999.ebuild, +files/clang-3.4-darwin_build_fix.patch, + +files/clang-3.4-darwin_prefix-include-paths.patch: + Make clang 3.4.2 find Prefix headers on Darwin 20 Oct 2014; Michał Górny <mgorny@gentoo.org> llvm-3.5.0.ebuild, llvm-9999.ebuild: diff --git a/sys-devel/llvm/files/clang-3.4-darwin_build_fix.patch b/sys-devel/llvm/files/clang-3.4-darwin_build_fix.patch new file mode 100644 index 000000000000..113b04bc6637 --- /dev/null +++ b/sys-devel/llvm/files/clang-3.4-darwin_build_fix.patch @@ -0,0 +1,47 @@ +Our (gcc/binutils) toolchain doesn't do ARM targets, hence we will get +"unable to interface with target machine" errors while building if we +attempt to. Disable those targets. + +Patch by Reza Jelveh from +https://github.com/fishman/timebomb-gentoo-osx-overlay/blob/master/sys-devel/llvm/files/llvm-3.4-fix_darwin_build.patch + +--- a/projects/compiler-rt/make/platform/clang_darwin_embedded.mk ++++ b/projects/compiler-rt/make/platform/clang_darwin_embedded.mk +@@ -27,20 +27,20 @@ UniversalArchs := + # Soft-float version of the runtime. No floating-point instructions will be used + # and the ABI (out of necessity) passes floating values in normal registers: + # non-VFP variant of the AAPCS. +-Configs += soft_static +-UniversalArchs.soft_static := armv6m armv7m armv7em armv7 ++# Configs += soft_static ++# UniversalArchs.soft_static := armv6m armv7m armv7em armv7 + + # Hard-float version of the runtime. On ARM VFP instructions and registers are + # allowed, and floating point values get passed in them. VFP variant of the + # AAPCS. + Configs += hard_static +-UniversalArchs.hard_static := armv7em armv7 i386 x86_64 ++UniversalArchs.hard_static := i386 x86_64 + +-Configs += soft_pic +-UniversalArchs.soft_pic := armv6m armv7m armv7em armv7 ++# Configs += soft_pic ++# UniversalArchs.soft_pic := armv6m armv7m armv7em armv7 + + Configs += hard_pic +-UniversalArchs.hard_pic := armv7em armv7 i386 x86_64 ++UniversalArchs.hard_pic := i386 x86_64 + + CFLAGS := -Wall -Werror -Oz -fomit-frame-pointer -ffreestanding + +--- a/tools/clang/runtime/compiler-rt/Makefile ++++ b/tools/clang/runtime/compiler-rt/Makefile +@@ -85,7 +85,7 @@ RuntimeLibrary.darwin.Configs := \ + profile_osx.a profile_ios.a \ + ubsan_osx.a + RuntimeLibrary.darwin_embedded.Configs := \ +- soft_static.a hard_static.a soft_pic.a hard_pic.a ++ hard_static.a hard_pic.a + + # Support building compiler-rt with relocatable SDKs. + # diff --git a/sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch b/sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch new file mode 100644 index 000000000000..f5f1d9e387e9 --- /dev/null +++ b/sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch @@ -0,0 +1,18 @@ +--- tools/clang/lib/Frontend/InitHeaderSearch.cpp ++++ tools/clang/lib/Frontend/InitHeaderSearch.cpp +@@ -233,6 +233,7 @@ + case llvm::Triple::Bitrig: + break; + default: ++ AddPath("@GENTOO_PORTAGE_EPREFIX@/usr/include", System, false); + // FIXME: temporary hack: hard-coded paths. + AddPath("/usr/local/include", System, false); + break; +@@ -505,6 +506,7 @@ + // Add the default framework include paths on Darwin. + if (HSOpts.UseStandardSystemIncludes) { + if (triple.isOSDarwin()) { ++ AddPath("@GENTOO_PORTAGE_EPREFIX@/Frameworks", System, true); + AddPath("/System/Library/Frameworks", System, true); + AddPath("/Library/Frameworks", System, true); + } diff --git a/sys-devel/llvm/llvm-3.4.2.ebuild b/sys-devel/llvm/llvm-3.4.2.ebuild index 4002db0aaca9..9c1bb5ee6d3f 100644 --- a/sys-devel/llvm/llvm-3.4.2.ebuild +++ b/sys-devel/llvm/llvm-3.4.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-3.4.2.ebuild,v 1.3 2014/09/17 23:29:09 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-3.4.2.ebuild,v 1.4 2014/11/10 20:37:57 grobian Exp $ EAPI=5 @@ -10,7 +10,7 @@ PYTHON_COMPAT=( python2_7 pypy ) WANT_CMAKE=cmake inherit cmake-utils eutils flag-o-matic multibuild multilib \ - multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs + multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="http://llvm.org/" @@ -22,7 +22,7 @@ SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.gz LICENSE="UoI-NCSA" SLOT="0/3.4" -KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="clang debug doc gold +libffi multitarget ncurses ocaml python +static-analyzer test udis86 xml video_cards_radeon kernel_Darwin kernel_FreeBSD" @@ -179,11 +179,14 @@ src_prepare() { epatch "${FILESDIR}"/clang-3.1-gentoo-runtime-gcc-detection-v3.patch epatch "${FILESDIR}"/clang-3.4-gentoo-install.patch + epatch "${FILESDIR}"/clang-3.4-darwin_build_fix.patch + epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch + eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp fi if use prefix && use clang; then - sed -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ - -i 'projects/compiler-rt/make/platform/clang_linux.mk' || die + sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ + projects/compiler-rt/make/platform/clang_*.mk || die fi local sub_files=( @@ -442,11 +445,11 @@ multilib_src_install() { # Fix install_names on Darwin. The build system is too complicated # to just fix this, so we correct it post-install - local lib= f= odylib= libpv=${PV} + local lib= f= odylib= ndylib= libpv=${PV} if [[ ${CHOST} == *-darwin* ]] ; then eval $(grep PACKAGE_VERSION= configure) [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} - for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib ; do + for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_osx_dynamic.dylib; do # libEnhancedDisassembly is Darwin10 only, so non-fatal # + omit clang libs if not enabled [[ -f ${ED}/usr/lib/${lib} ]] || continue @@ -457,21 +460,32 @@ multilib_src_install() { "${ED}"/usr/lib/${lib} eend $? done - for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib{LTO,clang}.dylib ; do + for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do # omit clang libs if not enabled [[ -f ${ED}/usr/lib/${lib} ]] || continue - odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib) - ebegin "fixing install_name reference to ${odylib} of ${f##*/}" - install_name_tool \ - -change "${odylib}" \ - "${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib \ - -change "@rpath/libclang.dylib" \ - "${EPREFIX}"/usr/lib/libclang.dylib \ - -change "${S}"/Release/lib/libclang.dylib \ - "${EPREFIX}"/usr/lib/libclang.dylib \ - "${f}" - eend $? + scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ + while read odylib ; do + ndylib= + case ${odylib} in + */libclang.dylib) + ndylib="${EPREFIX}"/usr/lib/libclang.dylib + ;; + */libLLVM-${libpv}.dylib) + ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib + ;; + */libLTO.dylib) + ndylib="${EPREFIX}"/usr/lib/libLTO.dylib + ;; + esac + if [[ -n ${ndylib} ]] ; then + ebegin "fixing install_name reference to ${odylib} of ${f##*/}" + install_name_tool \ + -change "${odylib}" "${ndylib}" \ + "${f}" + eend $? + fi + done done fi } diff --git a/sys-devel/llvm/llvm-3.5.0.ebuild b/sys-devel/llvm/llvm-3.5.0.ebuild index 72cdedab1f5f..f63f50a8995e 100644 --- a/sys-devel/llvm/llvm-3.5.0.ebuild +++ b/sys-devel/llvm/llvm-3.5.0.ebuild @@ -1,13 +1,13 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-3.5.0.ebuild,v 1.4 2014/10/20 07:08:16 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-3.5.0.ebuild,v 1.5 2014/11/10 20:37:57 grobian Exp $ EAPI=5 PYTHON_COMPAT=( python2_7 pypy ) inherit eutils flag-o-matic multibuild multilib \ - multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs + multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="http://llvm.org/" @@ -19,7 +19,7 @@ SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz LICENSE="UoI-NCSA" SLOT="0/3.5" -KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml python +static-analyzer test xml video_cards_radeon kernel_Darwin kernel_FreeBSD" @@ -75,6 +75,7 @@ S=${WORKDIR}/${P}.src CMAKE_MAKEFILE_GENERATOR=emake pkg_pretend() { + $(tc-is-static-only && echo --disable-shared) \ # in megs # !clang !debug !multitarget -O2 400 # !clang !debug multitarget -O2 550 @@ -154,11 +155,13 @@ src_prepare() { epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch epatch "${FILESDIR}"/clang-3.5-gentoo-install.patch + epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch + eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp fi if use prefix && use clang; then - sed -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ - -i 'projects/compiler-rt/make/platform/clang_linux.mk' || die + sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ + projects/compiler-rt/make/platform/clang_*.mk || die fi local sub_files=( @@ -429,11 +432,11 @@ multilib_src_install() { # Fix install_names on Darwin. The build system is too complicated # to just fix this, so we correct it post-install - local lib= f= odylib= libpv=${PV} + local lib= f= odylib= ndylib= libpv=${PV} if [[ ${CHOST} == *-darwin* ]] ; then eval $(grep PACKAGE_VERSION= configure) [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} - for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib ; do + for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_osx_dynamic.dylib; do # libEnhancedDisassembly is Darwin10 only, so non-fatal # + omit clang libs if not enabled [[ -f ${ED}/usr/lib/${lib} ]] || continue @@ -444,21 +447,32 @@ multilib_src_install() { "${ED}"/usr/lib/${lib} eend $? done - for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib{LTO,clang}.dylib ; do + for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do # omit clang libs if not enabled [[ -f ${ED}/usr/lib/${lib} ]] || continue - odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib) - ebegin "fixing install_name reference to ${odylib} of ${f##*/}" - install_name_tool \ - -change "${odylib}" \ - "${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib \ - -change "@rpath/libclang.dylib" \ - "${EPREFIX}"/usr/lib/libclang.dylib \ - -change "${S}"/Release/lib/libclang.dylib \ - "${EPREFIX}"/usr/lib/libclang.dylib \ - "${f}" - eend $? + scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ + while read odylib ; do + ndylib= + case ${odylib} in + */libclang.dylib) + ndylib="${EPREFIX}"/usr/lib/libclang.dylib + ;; + */libLLVM-${libpv}.dylib) + ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib + ;; + */libLTO.dylib) + ndylib="${EPREFIX}"/usr/lib/libLTO.dylib + ;; + esac + if [[ -n ${ndylib} ]] ; then + ebegin "fixing install_name reference to ${odylib} of ${f##*/}" + install_name_tool \ + -change "${odylib}" "${ndylib}" \ + "${f}" + eend $? + fi + done done fi } diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild index e3d1aa4429c6..e84f45b3b8c5 100644 --- a/sys-devel/llvm/llvm-9999.ebuild +++ b/sys-devel/llvm/llvm-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.92 2014/10/20 07:08:16 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.93 2014/11/10 20:37:57 grobian Exp $ EAPI=5 @@ -155,8 +155,8 @@ src_prepare() { fi if use prefix && use clang; then - sed -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ - -i 'projects/compiler-rt/make/platform/clang_linux.mk' || die + sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ + projects/compiler-rt/make/platform/clang_*.mk || die fi local sub_files=( |