From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/mgorny:master commit in: sys-devel/llvm/files/, sys-devel/llvm/
Date: Fri, 19 Jul 2013 11:02:29 +0000 (UTC) [thread overview]
Message-ID: <1374231742.e40ec51ba4cad589b411a3289052b30faf59dd43.mgorny@gentoo> (raw)
commit: e40ec51ba4cad589b411a3289052b30faf59dd43
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 19 11:02:22 2013 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 19 11:02:22 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=e40ec51b
Backport sed->patch to llvm 3.3.
---
...nstall.patch => clang-3.3-gentoo-install.patch} | 0
sys-devel/llvm/files/llvm-3.3-gentoo-install.patch | 112 +++++++++++++++++++++
sys-devel/llvm/llvm-3.3-r1.ebuild | 58 ++++-------
sys-devel/llvm/llvm-9999-r1.ebuild | 2 +-
4 files changed, 130 insertions(+), 42 deletions(-)
diff --git a/sys-devel/llvm/files/clang-3.4-gentoo-install.patch b/sys-devel/llvm/files/clang-3.3-gentoo-install.patch
similarity index 100%
rename from sys-devel/llvm/files/clang-3.4-gentoo-install.patch
rename to sys-devel/llvm/files/clang-3.3-gentoo-install.patch
diff --git a/sys-devel/llvm/files/llvm-3.3-gentoo-install.patch b/sys-devel/llvm/files/llvm-3.3-gentoo-install.patch
new file mode 100644
index 0000000..d6c0d7a
--- /dev/null
+++ b/sys-devel/llvm/files/llvm-3.3-gentoo-install.patch
@@ -0,0 +1,112 @@
+From 1430e07a00ca87b665c5f9ed53512e896cce729c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl>
+Date: Fri, 19 Jul 2013 10:10:52 +0200
+Subject: [PATCH] gentoo install fixes
+
+---
+ Makefile.config.in | 6 +++---
+ Makefile.rules | 7 +++----
+ tools/gold/Makefile | 2 +-
+ tools/llvm-config/llvm-config.cpp | 2 +-
+ utils/FileCheck/Makefile | 2 +-
+ 5 files changed, 9 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile.config.in b/Makefile.config.in
+index fd4f6ef..ad6595f 100644
+--- a/Makefile.config.in
++++ b/Makefile.config.in
+@@ -95,10 +95,10 @@ PROJ_internal_prefix := $(prefix)
+ endif
+
+ PROJ_bindir := $(PROJ_prefix)/bin
+-PROJ_libdir := $(PROJ_prefix)/lib
++PROJ_libdir := $(PROJ_prefix)/@libdir@/llvm
+ PROJ_datadir := $(PROJ_prefix)/share
+-PROJ_docsdir := $(PROJ_prefix)/docs/llvm
+-PROJ_etcdir := $(PROJ_prefix)/etc/llvm
++PROJ_docsdir := $(PROJ_prefix)/share/doc/@PF@
++PROJ_etcdir := @EPREFIX@/etc/llvm
+ PROJ_includedir := $(PROJ_prefix)/include
+ PROJ_infodir := $(PROJ_prefix)/info
+ PROJ_mandir := $(PROJ_prefix)/share/man
+diff --git a/Makefile.rules b/Makefile.rules
+index f0c542b..db252f7 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -276,7 +276,7 @@ ifeq ($(ENABLE_OPTIMIZED),1)
+ # Don't use -fomit-frame-pointer on Darwin or FreeBSD.
+ ifneq ($(HOST_OS),FreeBSD)
+ ifneq ($(HOST_OS),Darwin)
+- OmitFramePointer := -fomit-frame-pointer
++ OmitFramePointer :=
+ endif
+ endif
+
+@@ -601,7 +601,6 @@ endif
+ ifdef SHARED_LIBRARY
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ ifneq ($(HOST_OS),Darwin)
+- LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
+ endif
+ endif
+ endif
+@@ -639,7 +638,7 @@ endif
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ ifneq ($(HOST_OS), Darwin)
+ ifdef TOOLNAME
+- LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
++ LD.Flags += $(RPATH) -Wl,'$(PROJ_libdir)'
+ ifdef EXAMPLE_TOOL
+ LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag)
+ else
+@@ -648,7 +647,7 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ endif
+ else
+ ifneq ($(DARWIN_MAJVERS),4)
+- LD.Flags += $(RPATH) -Wl,@executable_path/../lib
++ LD.Flags += $(RPATH) -Wl,'$(PROJ_libdir)'
+ endif
+ ifeq ($(RC_XBS),YES)
+ TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/llvm-lto.XXXXXX)
+diff --git a/tools/gold/Makefile b/tools/gold/Makefile
+index 496e31c..d36b340 100644
+--- a/tools/gold/Makefile
++++ b/tools/gold/Makefile
+@@ -24,7 +24,7 @@ include $(LEVEL)/Makefile.config
+ # Because off_t is used in the public API, the largefile parts are required for
+ # ABI compatibility.
+ CXXFLAGS += -I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+-LDFLAGS += -L$(SharedLibDir)/$(SharedPrefix)
++LDFLAGS += -L$(PROJ_libdir)
+
+ include $(LEVEL)/Makefile.common
+
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 7edf5ec..4ea5ca3 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -250,7 +250,7 @@ int main(int argc, char **argv) {
+ ActivePrefix = CurrentExecPrefix;
+ ActiveIncludeDir = ActivePrefix + "/include";
+ ActiveBinDir = ActivePrefix + "/bin";
+- ActiveLibDir = ActivePrefix + "/lib";
++ ActiveLibDir = ActivePrefix + "/@libdir@/llvm";
+ ActiveIncludeOption = "-I" + ActiveIncludeDir;
+ }
+
+diff --git a/utils/FileCheck/Makefile b/utils/FileCheck/Makefile
+index 268b7bc..e7674f9 100644
+--- a/utils/FileCheck/Makefile
++++ b/utils/FileCheck/Makefile
+@@ -15,7 +15,7 @@ USEDLIBS = LLVMSupport.a
+ TOOL_NO_EXPORTS = 1
+
+ # Don't install this utility
+-NO_INSTALL = 1
++#NO_INSTALL = 1
+
+ include $(LEVEL)/Makefile.common
+
+--
+1.8.3.2
+
diff --git a/sys-devel/llvm/llvm-3.3-r1.ebuild b/sys-devel/llvm/llvm-3.3-r1.ebuild
index 5cd52a6..a6b057d 100644
--- a/sys-devel/llvm/llvm-3.3-r1.ebuild
+++ b/sys-devel/llvm/llvm-3.3-r1.ebuild
@@ -91,27 +91,23 @@ src_prepare() {
multilib_src_prepare() {
cd "${BUILD_DIR}" || die
+ local sub_files=(
+ Makefile.config.in
+ Makefile.rules
+ tools/llvm-config/llvm-config.cpp
+ )
+ use clang && sub_files+=(
+ tools/clang/lib/Driver/Tools.cpp
+ tools/clang/tools/scan-build/scan-build
+ )
+
# unfortunately ./configure won't listen to --mandir and the-like, so take
# care of this.
- einfo "Fixing install dirs"
- sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \
- -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \
- -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/${PN}, \
- -i Makefile.config.in || die "Makefile.config sed failed"
- sed -e "/ActiveLibDir = ActivePrefix/s/lib/$(get_libdir)\/${PN}/" \
- -i tools/llvm-config/llvm-config.cpp || die "llvm-config sed failed"
-
- einfo "Fixing rpath and CFLAGS"
- sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \
- -e '/OmitFramePointer/s/-fomit-frame-pointer//' \
- -i Makefile.rules || die "rpath sed failed"
-
- if use clang; then
- # Set correct path for the coverage lib
- sed -e "s#lib\(/libprofile_rt.a\)#$(get_libdir)/llvm\1#" \
- -i tools/clang/lib/Driver/Tools.cpp \
- || die "driver tools paths sed failed"
- fi
+ sed -e "s,@libdir@,$(get_libdir),g" \
+ -e "s,@PF@,${PF},g" \
+ -e "s,@EPREFIX@,${EPREFIX},g" \
+ -i "${sub_files[@]}" \
+ || die "install paths sed failed"
}
rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \
@@ -121,29 +117,7 @@ src_prepare() {
mv "${WORKDIR}"/compiler-rt-${PV}.src "${S}"/projects/compiler-rt \
|| die "compiler-rt source directory move failed"
-
- if use gold; then
- sed -e 's,\$(SharedLibDir),'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \
- -i tools/gold/Makefile || die "gold rpath sed failed"
- fi
-
- # FileCheck is needed at least for dragonegg tests
- sed -e "/NO_INSTALL = 1/s/^/#/" -i utils/FileCheck/Makefile \
- || die "FileCheck Makefile sed failed"
-
if use clang; then
- # fix the static analyzer for in-tree install
- sed -e 's/import ScanView/from clang \0/' \
- -i tools/clang/tools/scan-view/scan-view \
- || die "scan-view sed failed"
- sed -e "/scanview.css\|sorttable.js/s#\$RealBin#${EPREFIX}/usr/share/${PN}#" \
- -i tools/clang/tools/scan-build/scan-build \
- || die "scan-build sed failed"
- # Set correct path for gold plugin
- sed -e "/LLVMgold.so/s#lib/#$(get_libdir)/llvm/#" \
- -i tools/clang/lib/Driver/Tools.cpp \
- || die "driver tools paths sed failed"
-
# Automatically select active system GCC's libraries, bugs #406163 and #417913
epatch "${FILESDIR}"/clang-3.1-gentoo-runtime-gcc-detection-v3.patch
@@ -159,6 +133,8 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch
epatch "${FILESDIR}"/${P}-R600_debug.patch
+ epatch "${FILESDIR}"/${PN}-3.3-gentoo-install.patch
+ use clang && epatch "${FILESDIR}"/clang-3.3-gentoo-install.patch
# User patches
epatch_user
diff --git a/sys-devel/llvm/llvm-9999-r1.ebuild b/sys-devel/llvm/llvm-9999-r1.ebuild
index cbd1966..e87142d 100644
--- a/sys-devel/llvm/llvm-9999-r1.ebuild
+++ b/sys-devel/llvm/llvm-9999-r1.ebuild
@@ -124,7 +124,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch
epatch "${FILESDIR}"/${PN}-3.4-gentoo-install.patch
- use clang && epatch "${FILESDIR}"/clang-3.4-gentoo-install.patch
+ use clang && epatch "${FILESDIR}"/clang-3.3-gentoo-install.patch
# User patches
epatch_user
next reply other threads:[~2013-07-19 11:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-19 11:02 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-20 14:00 [gentoo-commits] dev/mgorny:master commit in: sys-devel/llvm/files/, sys-devel/llvm/ Michał Górny
2013-07-20 14:00 Michał Górny
2013-07-20 6:28 Michał Górny
2013-07-19 21:24 Michał Górny
2013-07-19 10:44 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1374231742.e40ec51ba4cad589b411a3289052b30faf59dd43.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox