1 |
mgorny 13/11/30 10:33:59 |
2 |
|
3 |
Modified: llvm-3.4-gentoo-install.patch |
4 |
Added: clang-3.4-gentoo-install.patch |
5 |
Log: |
6 |
Drop the custom Gentoo "llvm" sub-dir that requires a lot of extra hacking, and causes bugs like #492554 and #488216. |
7 |
|
8 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.6 sys-devel/llvm/files/llvm-3.4-gentoo-install.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/llvm-3.4-gentoo-install.patch?rev=1.6&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/llvm-3.4-gentoo-install.patch?rev=1.6&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/llvm-3.4-gentoo-install.patch?r1=1.5&r2=1.6 |
16 |
|
17 |
Index: llvm-3.4-gentoo-install.patch |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm/files/llvm-3.4-gentoo-install.patch,v |
20 |
retrieving revision 1.5 |
21 |
retrieving revision 1.6 |
22 |
diff -u -r1.5 -r1.6 |
23 |
--- llvm-3.4-gentoo-install.patch 31 Oct 2013 16:22:00 -0000 1.5 |
24 |
+++ llvm-3.4-gentoo-install.patch 30 Nov 2013 10:33:58 -0000 1.6 |
25 |
@@ -6,7 +6,6 @@ |
26 |
--- |
27 |
Makefile.config.in | 6 +++--- |
28 |
Makefile.rules | 6 +++--- |
29 |
- tools/gold/Makefile | 2 +- |
30 |
tools/llvm-config/BuildVariables.inc.in | 2 ++ |
31 |
tools/llvm-config/Makefile | 4 ++++ |
32 |
tools/llvm-config/llvm-config.cpp | 5 +++-- |
33 |
@@ -22,7 +21,7 @@ |
34 |
|
35 |
PROJ_bindir := $(PROJ_prefix)/bin |
36 |
-PROJ_libdir := $(PROJ_prefix)/lib |
37 |
-+PROJ_libdir := $(PROJ_prefix)/$(GENTOO_LIBDIR)/llvm |
38 |
++PROJ_libdir := $(PROJ_prefix)/$(GENTOO_LIBDIR) |
39 |
PROJ_datadir := $(PROJ_prefix)/share |
40 |
-PROJ_docsdir := $(PROJ_prefix)/docs/llvm |
41 |
-PROJ_etcdir := $(PROJ_prefix)/etc/llvm |
42 |
@@ -44,53 +43,23 @@ |
43 |
endif |
44 |
|
45 |
CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) |
46 |
-@@ -615,11 +615,11 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) |
47 |
- endif |
48 |
- ifneq ($(HOST_OS), Darwin) |
49 |
- ifdef TOOLNAME |
50 |
-- LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' |
51 |
-+ LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' $(RPATH) -Wl,'$(PROJ_libdir)' |
52 |
- endif |
53 |
- else |
54 |
- ifneq ($(DARWIN_MAJVERS),4) |
55 |
-- LD.Flags += $(RPATH) -Wl,@executable_path/../lib |
56 |
-+ LD.Flags += $(RPATH) -Wl,@executable_path/../lib $(RPATH) -Wl,'$(PROJ_libdir)' |
57 |
- endif |
58 |
- ifeq ($(RC_XBS),YES) |
59 |
- TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/llvm-lto.XXXXXX) |
60 |
-diff --git a/tools/gold/Makefile b/tools/gold/Makefile |
61 |
-index 496e31c..d36b340 100644 |
62 |
---- a/tools/gold/Makefile |
63 |
-+++ b/tools/gold/Makefile |
64 |
-@@ -24,7 +24,7 @@ include $(LEVEL)/Makefile.config |
65 |
- # Because off_t is used in the public API, the largefile parts are required for |
66 |
- # ABI compatibility. |
67 |
- CXXFLAGS += -I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
68 |
--LDFLAGS += -L$(SharedLibDir)/$(SharedPrefix) |
69 |
-+LDFLAGS += -L$(PROJ_libdir) |
70 |
- |
71 |
- include $(LEVEL)/Makefile.common |
72 |
- |
73 |
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in |
74 |
index fe87afb..fd9f2c6 100644 |
75 |
--- a/tools/llvm-config/BuildVariables.inc.in |
76 |
+++ b/tools/llvm-config/BuildVariables.inc.in |
77 |
-@@ -25,3 +25,5 @@ |
78 |
+@@ -25,3 +25,4 @@ |
79 |
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@" |
80 |
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" |
81 |
#define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" |
82 |
-+#define LLVM_RPATH "@LLVM_RPATH@" |
83 |
+#define LLVM_LIBDIR "@LLVM_LIBDIR@" |
84 |
diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile |
85 |
index b20b6bf..fc56781 100644 |
86 |
--- a/tools/llvm-config/Makefile |
87 |
+++ b/tools/llvm-config/Makefile |
88 |
-@@ -55,6 +55,10 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir |
89 |
+@@ -55,6 +55,8 @@ $(ObjDir)/BuildVariables.inc: $(BUILDVARIABLES_SRCPATH) Makefile $(ObjDir)/.dir |
90 |
>> temp.sed |
91 |
$(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \ |
92 |
>> temp.sed |
93 |
-+ $(Verb) $(ECHO) 's/@LLVM_RPATH@/$(subst /,\/,$(RPATH))/' \ |
94 |
-+ >> temp.sed |
95 |
+ $(Verb) $(ECHO) 's/@LLVM_LIBDIR@/$(subst /,\/,$(GENTOO_LIBDIR))/' \ |
96 |
+ >> temp.sed |
97 |
$(Verb) $(SED) -f temp.sed < $< > $@ |
98 |
@@ -105,20 +74,10 @@ |
99 |
ActiveIncludeDir = ActivePrefix + "/include"; |
100 |
ActiveBinDir = ActivePrefix + "/bin"; |
101 |
- ActiveLibDir = ActivePrefix + "/lib"; |
102 |
-+ ActiveLibDir = ActivePrefix + "/" LLVM_LIBDIR "/llvm"; |
103 |
++ ActiveLibDir = ActivePrefix + "/" LLVM_LIBDIR; |
104 |
ActiveIncludeOption = "-I" + ActiveIncludeDir; |
105 |
} |
106 |
|
107 |
-@@ -277,7 +277,8 @@ int main(int argc, char **argv) { |
108 |
- } else if (Arg == "--cxxflags") { |
109 |
- OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n'; |
110 |
- } else if (Arg == "--ldflags") { |
111 |
-- OS << "-L" << ActiveLibDir << ' ' << LLVM_LDFLAGS |
112 |
-+ OS << "-L" << ActiveLibDir << ' ' |
113 |
-+ << LLVM_RPATH << " -Wl," << ActiveLibDir << ' ' << LLVM_LDFLAGS |
114 |
- << ' ' << LLVM_SYSTEM_LIBS << '\n'; |
115 |
- } else if (Arg == "--libs") { |
116 |
- PrintLibs = true; |
117 |
diff --git a/utils/FileCheck/Makefile b/utils/FileCheck/Makefile |
118 |
index 268b7bc..e7674f9 100644 |
119 |
--- a/utils/FileCheck/Makefile |
120 |
|
121 |
|
122 |
|
123 |
1.1 sys-devel/llvm/files/clang-3.4-gentoo-install.patch |
124 |
|
125 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/clang-3.4-gentoo-install.patch?rev=1.1&view=markup |
126 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/clang-3.4-gentoo-install.patch?rev=1.1&content-type=text/plain |
127 |
|
128 |
Index: clang-3.4-gentoo-install.patch |
129 |
=================================================================== |
130 |
From 1a539a8868070e49966c6b5f5e4b9f1257acd7dc Mon Sep 17 00:00:00 2001 |
131 |
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@××××××××××.pl> |
132 |
Date: Fri, 19 Jul 2013 10:23:57 +0200 |
133 |
Subject: [PATCH] clang gentoo install |
134 |
|
135 |
--- |
136 |
tools/clang/lib/Driver/Tools.cpp | 4 ++-- |
137 |
tools/clang/tools/scan-build/scan-build | 4 ++-- |
138 |
tools/clang/tools/scan-view/scan-view | 2 +- |
139 |
3 files changed, 5 insertions(+), 5 deletions(-) |
140 |
|
141 |
diff --git a/tools/clang/lib/Driver/Tools.cpp b/tools/clang/lib/Driver/Tools.cpp |
142 |
index e014980..6e60513 100644 |
143 |
--- a/tools/clang/lib/Driver/Tools.cpp |
144 |
+++ b/tools/clang/lib/Driver/Tools.cpp |
145 |
@@ -219,7 +219,7 @@ static void addProfileRT(const ToolChain &TC, const ArgList &Args, |
146 |
// libprofile_rt.so. We used to use the -l:libprofile_rt.a syntax, but that is |
147 |
// not supported by old linkers. |
148 |
std::string ProfileRT = |
149 |
- std::string(TC.getDriver().Dir) + "/../lib/libprofile_rt.a"; |
150 |
+ "-l:libprofile_rt.a"; |
151 |
|
152 |
CmdArgs.push_back(Args.MakeArgString(ProfileRT)); |
153 |
} |
154 |
@@ -6177,7 +6177,7 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA, |
155 |
// forward. |
156 |
if (D.IsUsingLTO(Args) || Args.hasArg(options::OPT_use_gold_plugin)) { |
157 |
CmdArgs.push_back("-plugin"); |
158 |
- std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so"; |
159 |
+ std::string Plugin = ToolChain.getDriver().Dir + "/../@libdir@/LLVMgold.so"; |
160 |
CmdArgs.push_back(Args.MakeArgString(Plugin)); |
161 |
|
162 |
// Try to pass driver level flags relevant to LTO code generation down to |
163 |
diff --git a/tools/clang/tools/scan-build/scan-build b/tools/clang/tools/scan-build/scan-build |
164 |
index 22d5289..dcb4822 100755 |
165 |
--- a/tools/clang/tools/scan-build/scan-build |
166 |
+++ b/tools/clang/tools/scan-build/scan-build |
167 |
@@ -410,7 +410,7 @@ sub CopyFiles { |
168 |
|
169 |
my $Dir = shift; |
170 |
|
171 |
- my $JS = Cwd::realpath("$RealBin/sorttable.js"); |
172 |
+ my $JS = Cwd::realpath("@EPREFIX@/usr/share/llvm/sorttable.js"); |
173 |
|
174 |
DieDiag("Cannot find 'sorttable.js'.\n") |
175 |
if (! -r $JS); |
176 |
@@ -420,7 +420,7 @@ sub CopyFiles { |
177 |
DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n") |
178 |
if (! -r "$Dir/sorttable.js"); |
179 |
|
180 |
- my $CSS = Cwd::realpath("$RealBin/scanview.css"); |
181 |
+ my $CSS = Cwd::realpath("@EPREFIX@/usr/share/llvm/scanview.css"); |
182 |
|
183 |
DieDiag("Cannot find 'scanview.css'.\n") |
184 |
if (! -r $CSS); |
185 |
diff --git a/tools/clang/tools/scan-view/scan-view b/tools/clang/tools/scan-view/scan-view |
186 |
index fb27da6..1f8ddb8 100755 |
187 |
--- a/tools/clang/tools/scan-view/scan-view |
188 |
+++ b/tools/clang/tools/scan-view/scan-view |
189 |
@@ -54,7 +54,7 @@ def start_browser(port, options): |
190 |
webbrowser.open(url) |
191 |
|
192 |
def run(port, options, root): |
193 |
- import ScanView |
194 |
+ from clang import ScanView |
195 |
try: |
196 |
print 'Starting scan-view at: http://%s:%d'%(options.host, |
197 |
port) |
198 |
-- |
199 |
1.8.3.2 |