Mercurial > mxe-octave
annotate src/llvm-1-llvm-config.patch @ 5893:53a6c7df43f8
Mesa 3D: Update to version 21.1.8.
* src/mesa.mk: Update version and checksum.
* src/mesa-2-uninitialized.patch: Remove file.
* dist-files.mk: Remove file from list.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 16 Sep 2021 22:37:45 +0200 |
parents | 76a8a2d86ab8 |
children |
rev | line source |
---|---|
5597
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
1 If `llvm-config` is build as native version on the build system with a |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
2 cross-compile target system (i.e. as a build-tool for other project that want |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
3 to cross-compile), expose the settings for the target of the cross-compiler. |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
4 Also use the file naming conventions for the target of the cross-compiler. |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
5 |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
6 diff --git "a/include/llvm/Config/llvm-config.h.cmake" "b/include/llvm/Config/llvm-config.h.cmake" |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
7 index 872a315..9ad3055 100644 |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
8 --- "a/include/llvm/Config/llvm-config.h.cmake" |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
9 +++ "b/include/llvm/Config/llvm-config.h.cmake" |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
10 @@ -65,6 +65,9 @@ |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
11 /* Define if we have the perf JIT-support library */ |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
12 #cmakedefine01 LLVM_USE_PERF |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
13 |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
14 +/* Define if this is a native build for a cross-compiler */ |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
15 +#cmakedefine LLVM_TARGET_IS_CROSSCOMPILE_HOST ${LLVM_TARGET_IS_CROSSCOMPILE_HOST} |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
16 + |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
17 /* Major version of the LLVM API */ |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
18 #define LLVM_VERSION_MAJOR ${LLVM_VERSION_MAJOR} |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
19 |
5803
76a8a2d86ab8
LLVM: Update to version 12.0.1.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5597
diff
changeset
|
20 diff -up "./tools/llvm-config/llvm-config.cpp.orig" "./tools/llvm-config/llvm-config.cpp" |
76a8a2d86ab8
LLVM: Update to version 12.0.1.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5597
diff
changeset
|
21 --- ./tools/llvm-config/llvm-config.cpp.orig 2021-06-28 18:23:38.000000000 +0200 |
76a8a2d86ab8
LLVM: Update to version 12.0.1.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5597
diff
changeset
|
22 +++ ./tools/llvm-config/llvm-config.cpp 2021-07-19 17:23:35.059439097 +0200 |
76a8a2d86ab8
LLVM: Update to version 12.0.1.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5597
diff
changeset
|
23 @@ -36,7 +36,12 @@ using namespace llvm; |
5597
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
24 |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
25 // Include the build time variables we can report to the user. This is generated |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
26 // at build time from the BuildVariables.inc.in file by the build system. |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
27 -#include "BuildVariables.inc" |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
28 +#if defined(LLVM_TARGET_IS_CROSSCOMPILE_HOST) |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
29 +// include the .inc file with the settings for the cross-compiler |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
30 +# include "../../../tools/llvm-config/BuildVariables.inc" |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
31 +#else |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
32 +# include "BuildVariables.inc" |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
33 +#endif |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
34 |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
35 // Include the component table. This creates an array of struct |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
36 // AvailableComponent entries, which record the component name, library name, |
5803
76a8a2d86ab8
LLVM: Update to version 12.0.1.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5597
diff
changeset
|
37 @@ -377,15 +382,17 @@ int main(int argc, char **argv) { |
76a8a2d86ab8
LLVM: Update to version 12.0.1.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5597
diff
changeset
|
38 StaticPrefix, StaticDir = "lib"; |
76a8a2d86ab8
LLVM: Update to version 12.0.1.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5597
diff
changeset
|
39 std::string DirSep = "/"; |
5597
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
40 const Triple HostTriple(Triple::normalize(LLVM_HOST_TRIPLE)); |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
41 - if (HostTriple.isOSWindows()) { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
42 + const Triple TargetTriple(Triple::normalize(LLVM_DEFAULT_TARGET_TRIPLE)); |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
43 + if (TargetTriple.isOSWindows()) { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
44 SharedExt = "dll"; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
45 SharedVersionedExt = LLVM_DYLIB_VERSION ".dll"; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
46 - if (HostTriple.isOSCygMing()) { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
47 + if (TargetTriple.isOSCygMing()) { |
5803
76a8a2d86ab8
LLVM: Update to version 12.0.1.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5597
diff
changeset
|
48 SharedPrefix = "lib"; |
5597
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
49 StaticExt = "a"; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
50 StaticPrefix = "lib"; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
51 } else { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
52 StaticExt = "lib"; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
53 + if (HostTriple.isOSWindows()) { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
54 DirSep = "\\"; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
55 std::replace(ActiveObjRoot.begin(), ActiveObjRoot.end(), '/', '\\'); |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
56 std::replace(ActivePrefix.begin(), ActivePrefix.end(), '/', '\\'); |
5803
76a8a2d86ab8
LLVM: Update to version 12.0.1.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5597
diff
changeset
|
57 @@ -394,10 +401,11 @@ int main(int argc, char **argv) { |
5597
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
58 std::replace(ActiveCMakeDir.begin(), ActiveCMakeDir.end(), '/', '\\'); |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
59 std::replace(ActiveIncludeOption.begin(), ActiveIncludeOption.end(), '/', |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
60 '\\'); |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
61 + } |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
62 } |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
63 SharedDir = ActiveBinDir; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
64 StaticDir = ActiveLibDir; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
65 - } else if (HostTriple.isOSDarwin()) { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
66 + } else if (TargetTriple.isOSDarwin()) { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
67 SharedExt = "dylib"; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
68 SharedVersionedExt = LLVM_DYLIB_VERSION ".dylib"; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
69 StaticExt = "a"; |
5803
76a8a2d86ab8
LLVM: Update to version 12.0.1.
Markus Mützel <markus.muetzel@gmx.de>
parents:
5597
diff
changeset
|
70 @@ -694,7 +703,7 @@ int main(int argc, char **argv) { |
5597
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
71 } else if (PrintLibs) { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
72 // On Windows, output full path to library without parameters. |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
73 // Elsewhere, if this is a typical library name, include it using -l. |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
74 - if (HostTriple.isWindowsMSVCEnvironment()) { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
75 + if (TargetTriple.isWindowsMSVCEnvironment()) { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
76 OS << GetComponentLibraryPath(Lib, Shared); |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
77 } else { |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
78 StringRef LibName; |
f367e764ca55
LLVM: Enable exception handling (bug #59599).
Markus Mützel <markus.muetzel@gmx.de>
parents:
diff
changeset
|
79 |