SHA256
1
0
forked from pool/llvm15

49 Commits

Author SHA256 Message Date
5167204776 Accepting request 1295844 from devel:tools:compiler
- Disable ASLR during build to make libomp.so reproducible (boo#1199076)

OBS-URL: https://build.opensuse.org/request/show/1295844
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=20
2025-07-26 11:42:22 +00:00
Aaron Puchert
903a252218 Disable ASLR during build to make libomp.so reproducible (boo#1199076)
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=50
2025-07-25 22:16:04 +00:00
f1cfc5188e Accepting request 1292354 from devel:tools:compiler
- Add reproducible.patch to make libomp.so reproducible (boo#1199076)
- Replace usage of %jobs for reproducible builds (boo#1237231)

OBS-URL: https://build.opensuse.org/request/show/1292354
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=19
2025-07-14 08:51:22 +00:00
Aaron Puchert
2c267fdc50 * Add reproducible.patch to make libomp.so reproducible (boo#1199076)
* Replace usage of %jobs for reproducible builds (boo#1237231)

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=48
2025-07-12 13:35:42 +00:00
69fc699874 Accepting request 1289504 from devel:tools:compiler
- Add llvm-fix-gcc15-build.patch to fix build with GCC 15.

OBS-URL: https://build.opensuse.org/request/show/1289504
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=18
2025-07-02 10:10:29 +00:00
Aaron Puchert
424bb239c3 - Add llvm-fix-gcc15-build.patch to fix build with GCC 15.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=46
2025-07-01 11:34:21 +00:00
629b636c9e Accepting request 1251062 from devel:tools:compiler
OBS-URL: https://build.opensuse.org/request/show/1251062
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=17
2025-03-07 15:43:36 +00:00
Aaron Puchert
5435029fbe - Add patches, to actually fix the build with Python 3.13:
* libcxx-use-shlex-quote.patch
  * libcxx-remove-unused-imports.patch
  * lldb-support-python-3.13.patch
  * use-shlex-quote.patch

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=44
2025-03-06 23:47:08 +00:00
ea81ebb6c2 Accepting request 1224728 from devel:tools:compiler
- Apply clang-shlib-symbol-versioning.patch to add symbol versions
  to libclang-cpp.so similar to libLLVM.so. This is required when
  multiple versions of the library are loaded into the same
  process. (boo#1219405, boo#1221183, boo#1233220)

OBS-URL: https://build.opensuse.org/request/show/1224728
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=16
2024-11-18 19:01:19 +00:00
Aaron Puchert
624dee5c5c - Apply clang-shlib-symbol-versioning.patch to add symbol versions
to libclang-cpp.so similar to libLLVM.so. This is required when
  multiple versions of the library are loaded into the same
  process. (boo#1219405, boo#1221183, boo#1233220)

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=42
2024-11-17 20:09:14 +00:00
bf47457a7c Accepting request 1195708 from devel:tools:compiler
- Add minor version to Python shebangs. (boo#1212476)
- Remove shebang and executable bit where not needed.

OBS-URL: https://build.opensuse.org/request/show/1195708
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=15
2024-08-25 10:09:55 +00:00
e965932128 Accepting request 1164601 from devel:tools:compiler
- Use old conflicts/provides for python3-clang on Leap.

OBS-URL: https://build.opensuse.org/request/show/1164601
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=14
2024-04-05 18:27:30 +00:00
Aaron Puchert
5858c6c9d8 - Use old conflicts/provides for python3-clang on Leap.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=37
2024-04-03 21:17:46 +00:00
5dad10d0bc Accepting request 1156031 from devel:tools:compiler
- Explicitly define PYTHON3_EXECUTABLE, since python 3.11 is being
  pulled in by cmake in SLE-15-SP6.
- Fix PowerPC triples: use powerpc[64[le]] instead of ppc[64[le]].
- Require 8 GB memory for 64-bit architectures to prevent OOM.
- Disable test that fails on ppc64le.
- Use %patch -P N instead of deprecated %patchN.

OBS-URL: https://build.opensuse.org/request/show/1156031
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=13
2024-03-08 17:08:30 +00:00
Aaron Puchert
5cb7475a21 - Explicitly define PYTHON3_EXECUTABLE, since python 3.11 is being
pulled in by cmake in SLE-15-SP6.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=35
2024-03-07 01:34:54 +00:00
Aaron Puchert
4cca689cfc - Fix PowerPC triples: use powerpc[64[le]] instead of ppc[64[le]].
- Require 8 GB memory for 64-bit architectures to prevent OOM.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=34
2024-03-04 21:57:00 +00:00
Aaron Puchert
54e2b2e872 - Disable test that fails on ppc64le.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=33
2024-03-04 00:33:31 +00:00
Aaron Puchert
ca30ec3f09 Accepting request 1154120 from home:pgajdos:l
- Use %patch -P N instead of deprecated %patchN.

OBS-URL: https://build.opensuse.org/request/show/1154120
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=32
2024-03-01 21:56:06 +00:00
a7efc575d1 Accepting request 1146032 from devel:tools:compiler
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1146032
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=12
2024-02-12 17:52:39 +00:00
Aaron Puchert
afd15335d0 - Use %_target_* for determining the compiler host triple (boo#1218701)
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=30
2024-02-04 20:50:18 +00:00
953a93ecc9 Accepting request 1130466 from devel:tools:compiler
- Manage clang-cpp with update-alternatives like other binaries.

OBS-URL: https://build.opensuse.org/request/show/1130466
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=11
2023-12-03 19:48:29 +00:00
Aaron Puchert
fb27179f05 - Manage clang-cpp with update-alternatives like other binaries.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=28
2023-12-01 21:36:48 +00:00
7267371896 Accepting request 1119116 from devel:tools:compiler
- Disable zstd support for now regardless of whether libzstd-devel
  is installed. (boo#1216121)

OBS-URL: https://build.opensuse.org/request/show/1119116
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=10
2023-11-10 11:28:41 +00:00
Aaron Puchert
1ce3a6787f - Disable zstd support for now regardless of whether libzstd-devel
is installed. (boo#1216121)

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=26
2023-10-20 00:42:33 +00:00
6c0bea0c0e Accepting request 1093401 from devel:tools:compiler
- Make python3-clang noarch again and fix conflicts/provides to
  point to %python3_sitelib instead of %python3_sitearch.

OBS-URL: https://build.opensuse.org/request/show/1093401
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=9
2023-06-17 20:20:11 +00:00
Aaron Puchert
69ca4dfaf5 - Make python3-clang noarch again and fix conflicts/provides to
point to %python3_sitelib instead of %python3_sitearch.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=24
2023-06-16 01:10:14 +00:00
7c01aa291d Accepting request 1070944 from devel:tools:compiler
- Add llvm-suse-implicit-gnu.patch to recognize <arch>-suse-linux
  as implicitly GNU. Without this we would get library calls for
  fused-multiply-add even if it's available in hardware.
- Add openmp-drop-rpath.patch: backport revert of adding RUNPATH
  to openmp executables. (boo#1206837)
- update constraints to exclude workers with very slow CPU

OBS-URL: https://build.opensuse.org/request/show/1070944
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=8
2023-03-13 11:39:55 +00:00
Aaron Puchert
0b5e480781 - Add llvm-suse-implicit-gnu.patch to recognize <arch>-suse-linux
as implicitly GNU. Without this we would get library calls for
  fused-multiply-add even if it's available in hardware.
- Add openmp-drop-rpath.patch: backport revert of adding RUNPATH
  to openmp executables. (boo#1206837)

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=22
2023-03-11 14:10:21 +00:00
Aaron Puchert
ace2a39c9e Accepting request 1070516 from home:dirkmueller:Factory
- update constraints to exclude workers with very slow CPU

OBS-URL: https://build.opensuse.org/request/show/1070516
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=21
2023-03-10 20:27:29 +00:00
843eb90638 Accepting request 1059871 from devel:tools:compiler
- Update to version 15.0.7.
  * This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Rebase llvm-do-not-install-static-libraries.patch.
- Build stage 2 with -fno-plt on x86_64: since building with
  -Wl,-z,now the PLT stubs are basically dead code, so eliminating
  the indirection reduces the number of branches and improves code
  locality for the quite frequent cross-DSO calls.
- Add llvm-workaround-superfluous-branches.patch: hints LLVM to
  eliminate branches until gh#llvm/llvm-project#28804 is solved.

OBS-URL: https://build.opensuse.org/request/show/1059871
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=7
2023-01-21 18:09:53 +00:00
Aaron Puchert
d0057caff2 - Undo unnecessary changes.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=19
2023-01-19 22:47:39 +00:00
Aaron Puchert
cdc7a41102 - Add llvm-workaround-superfluous-branches.patch: hints LLVM to
eliminate branches until gh#llvm/llvm-project#28804 is solved.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=18
2023-01-19 20:24:57 +00:00
Aaron Puchert
04d8fe57b7 - Use quotes to prevent a line break.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=17
2023-01-14 17:06:31 +00:00
Aaron Puchert
fd7506d9e1 - Drop line breaks from flags.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=16
2023-01-14 15:26:22 +00:00
Aaron Puchert
8960de2413 - Update to version 15.0.7.
* This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Rebase llvm-do-not-install-static-libraries.patch.
- Build stage 2 with -fno-plt if we're using LTO: since building
  with -Wl,-z,now the PLT stubs are basically dead code, and
  eliminating the indirection should improve code locality and
  reduce BTB pressure for the quite frequent cross-DSO calls.
  With LTO we should not need linker relaxation.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=15
2023-01-14 14:15:05 +00:00
97b956f05a Accepting request 1040098 from devel:tools:compiler
- Update to version 15.0.6.
  * This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Rebase llvm-do-not-install-static-libraries.patch.

OBS-URL: https://build.opensuse.org/request/show/1040098
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=6
2022-12-07 16:33:18 +00:00
Aaron Puchert
f89973a798 - Update to version 15.0.6.
* This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Rebase llvm-do-not-install-static-libraries.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=13
2022-12-04 21:49:01 +00:00
9a389837d7 Accepting request 1036301 from devel:tools:compiler
- Update to version 15.0.5.
  * This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Remove obsolete lldb-swig-4.1.0-build-fix.patch.
- Rebase llvm-do-not-install-static-libraries.patch.

OBS-URL: https://build.opensuse.org/request/show/1036301
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=5
2022-11-18 14:42:47 +00:00
Aaron Puchert
59979293cd - Update to version 15.0.5.
* This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Remove obsolete lldb-swig-4.1.0-build-fix.patch.
- Rebase llvm-do-not-install-static-libraries.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=11
2022-11-17 00:32:10 +00:00
85caa9a272 Accepting request 1035533 from devel:tools:compiler
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1035533
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=4
2022-11-15 12:18:08 +00:00
Aaron Puchert
2084b76b6f - Update to version 15.0.4.
* This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Rebase llvm-do-not-install-static-libraries.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=9
2022-11-06 19:16:50 +00:00
2d8ebd3948 Accepting request 1031948 from devel:tools:compiler
- Update to version 15.0.3.
  * This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Add llvm-armv7-fix-vector-compare-with-zero-lowering.patch: Fix
  lowering of non-canonical vector comparison with zero on armv7,
  preventing a crash (boo#1204267, gh#llvm/llvm-project#58514).
- Add lldb-swig-4.1.0-build-fix.patch: Fix build with Swig 4.1.0.
- Rebase llvm-do-not-install-static-libraries.patch.

OBS-URL: https://build.opensuse.org/request/show/1031948
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=3
2022-10-29 18:15:04 +00:00
Aaron Puchert
3771228637 - Update to version 15.0.3.
* This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Add llvm-armv7-fix-vector-compare-with-zero-lowering.patch: Fix
  lowering of non-canonical vector comparison with zero on armv7,
  preventing a crash (boo#1204267, gh#llvm/llvm-project#58514).
- Add lldb-swig-4.1.0-build-fix.patch: Fix build with Swig 4.1.0.
- Rebase llvm-do-not-install-static-libraries.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=7
2022-10-28 00:08:04 +00:00
9369e9872c Accepting request 1008060 from devel:tools:compiler
- Update to version 15.0.2.
  * This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Rebase llvm-do-not-install-static-libraries.patch.

OBS-URL: https://build.opensuse.org/request/show/1008060
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=2
2022-10-11 16:01:42 +00:00
Aaron Puchert
5f29e80d74 - Update to version 15.0.2.
* This release contains bug-fixes for the LLVM 15.0.0 release.
    This release is API and ABI compatible with 15.0.0.
- Rebase llvm-do-not-install-static-libraries.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=5
2022-10-04 21:44:26 +00:00
1605db3ba7 Accepting request 1005588 from devel:tools:compiler
- Initial submit based on version 15.0.1.
* For details, see the release notes:
- https://releases.llvm.org/15.0.0/docs/ReleaseNotes.html
- https://releases.llvm.org/15.0.0/tools/clang/docs/ReleaseNotes.html
- https://releases.llvm.org/15.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html
- https://releases.llvm.org/15.0.0/projects/libcxx/docs/ReleaseNotes.html
- https://releases.llvm.org/15.0.0/tools/lld/docs/ReleaseNotes.html
* New LLVM tools:
- llvm-debuginfod: Provides debug info to remote hosts.
- llvm-dwarfutil: Can copy and manipulate debug info.
- llvm-remark-size-diff: Compute diff between remark files.
* New Clang tools:
- clang-offload-packager: Bundle multiple objects into single
fat binaries including offload code.
- clang-pseudo: Approximate heuristic parser for C++.
- Rebase patches:
* check-no-llvm-exegesis.patch
* link-clang-tools-extra-shared.patch
* lld-default-sha1.patch
* llvm-do-not-install-static-libraries.patch
* lto-disable-cache.patch
- Drop patches that have landed upstream:
* clang-repl-private-deps.patch
* llvm-glibc-2-36.patch
* llvm-scev-fix-isImpliedViaMerge.patch
- Drop llvm-lifetime-for-rust.patch: this is now solved via
attributes and LLVM doesn't need a hardcoded list of allocation
functions anymore.
- Add llvm-link-atomic.patch to fix build on ppc.
- Add libcxx-test-library-path.patch to fix libc++ tests failing
without RUNPATH on libc++.so.
- Add libcxxabi-fix-armv7-test.patch to fix tests on armv7l.
- Use correct LLVM_HOST_TRIPLE for riscv64.
- Always drop -gnu from triple for consistency. Patch a test that
  was looking for -linux- in clang-test-xfail-gnuless-triple.patch.

OBS-URL: https://build.opensuse.org/request/show/1005588
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=1
2022-10-04 18:37:23 +00:00
Aaron Puchert
33e568f2f7 Accepting request 1005584 from home:aaronpuchert:llvm-next
- Update to version 15.0.1.
  * This release contains bug-fixes for the LLVM 15.0.1 release.
    This release is API and ABI compatible with 15.0.0.
- Rebase llvm-do-not-install-static-libraries.patch.
- Always drop -gnu from triple for consistency. Patch a test that
  was looking for -linux- in clang-test-xfail-gnuless-triple.patch.

OBS-URL: https://build.opensuse.org/request/show/1005584
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=3
2022-09-23 09:33:16 +00:00
9fce52f067 Accepting request 1002900 from home:Andreas_Schwab:riscv:llvm
- Use correct LLVM_HOST_TRIPLE for riscv64

OBS-URL: https://build.opensuse.org/request/show/1002900
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=2
2022-09-12 12:36:45 +00:00
43f9d469ce Accepting request 1002539 from home:aaronpuchert:llvm-next
- Update to version 15.0.0.
  * For details, see the release notes:
    - https://releases.llvm.org/15.0.0/docs/ReleaseNotes.html
    - https://releases.llvm.org/15.0.0/tools/clang/docs/ReleaseNotes.html
    - https://releases.llvm.org/15.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html
    - https://releases.llvm.org/15.0.0/projects/libcxx/docs/ReleaseNotes.html
    - https://releases.llvm.org/15.0.0/tools/lld/docs/ReleaseNotes.html
  * New LLVM tools:
    - llvm-debuginfod: Provides debug info to remote hosts.
    - llvm-dwarfutil: Can copy and manipulate debug info.
    - llvm-remark-size-diff: Compute diff between remark files.
  * New Clang tools:
    - clang-offload-packager: Bundle multiple objects into single
      fat binaries including offload code.
    - clang-pseudo: Approximate heuristic parser for C++.
- Rebase patches:
  * check-no-llvm-exegesis.patch
  * link-clang-tools-extra-shared.patch
  * lld-default-sha1.patch
  * llvm-do-not-install-static-libraries.patch
  * lto-disable-cache.patch
- Drop patches that have landed upstream:
  * clang-repl-private-deps.patch
  * llvm-glibc-2-36.patch
  * llvm-scev-fix-isImpliedViaMerge.patch
- Drop llvm-lifetime-for-rust.patch: this is now solved via
  attributes and LLVM doesn't need a hardcoded list of allocation
  functions anymore.
- Add llvm-link-atomic.patch to fix build on ppc.
- Add libcxx-test-library-path.patch to fix libc++ tests failing
  without RUNPATH on libc++.so.
- Add libcxxabi-fix-armv7-test.patch to fix tests on armv7l.
- Thanks to Andreas Schwab for most of the rebasing!

OBS-URL: https://build.opensuse.org/request/show/1002539
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=1
2022-09-12 07:14:57 +00:00
9 changed files with 357 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
index aa7fcd1efed4..054c7d59ec34 100644
--- a/clang/tools/clang-shlib/CMakeLists.txt
+++ b/clang/tools/clang-shlib/CMakeLists.txt
@@ -48,6 +48,14 @@ add_clang_library(clang-cpp
${_OBJECTS}
LINK_LIBS
${_DEPS})
+
+configure_file(simple_version_script.map.in simple_version_script.map)
+
+if (NOT LLVM_LINKER_IS_SOLARISLD AND NOT MINGW)
+ # Solaris ld does not accept global: *; so there is no way to version *all* global symbols
+ target_link_options(clang-cpp PRIVATE LINKER:--version-script,${CMAKE_CURRENT_BINARY_DIR}/simple_version_script.map)
+endif()
+
# Optimize function calls for default visibility definitions to avoid PLT and
# reduce dynamic relocations.
if (NOT APPLE AND NOT MINGW)
diff --git a/clang/tools/clang-shlib/simple_version_script.map.in b/clang/tools/clang-shlib/simple_version_script.map.in
new file mode 100644
index 000000000000..cb2306d1f596
--- /dev/null
+++ b/clang/tools/clang-shlib/simple_version_script.map.in
@@ -0,0 +1 @@
+@LLVM_SHLIB_SYMBOL_VERSION@ { global: *; };

View File

@@ -0,0 +1,19 @@
From 017396310bb6515786eb9d9cf9fb0256de08d65b Mon Sep 17 00:00:00 2001
From: "Stephan T. Lavavej" <stl@nuwen.net>
Date: Tue, 28 Nov 2023 16:33:11 -0800
Subject: [PATCH] Remove unused Python imports.
Index: libcxx-15.0.7.src/utils/libcxx/test/format.py
===================================================================
--- libcxx-15.0.7.src.orig/utils/libcxx/test/format.py
+++ libcxx-15.0.7.src/utils/libcxx/test/format.py
@@ -9,9 +9,7 @@
import lit
import lit.formats
import os
-import pipes
import re
-import shutil
def _getTempPaths(test):
"""

View File

@@ -0,0 +1,51 @@
From d3ce1078186389ce39505f06c2a0100dce9187a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Mon, 27 May 2024 19:26:56 +0200
Subject: [PATCH] [libcxx] [test] Use `shlex.quote()` to fix Python 3.13
compatibility (#93376)
Replace the use of `pipes.quote()` with `shlex.quote()` to fix
compatibility with Python 3.13. The former was always an undocumented
alias to the latter, and the `pipes` module was removed completely in
Python 3.13.
Fixes #93375
---
libcxx/test/libcxx/lit.local.cfg | 5 +++--
libcxx/utils/libcxx/test/dsl.py | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
Index: libcxx-15.0.7.src/test/libcxx/lit.local.cfg
===================================================================
--- libcxx-15.0.7.src.orig/test/libcxx/lit.local.cfg
+++ libcxx-15.0.7.src/test/libcxx/lit.local.cfg
@@ -1,3 +1,3 @@
# The tests in this directory need to run Python
-import pipes, sys
-config.substitutions.append(('%{python}', pipes.quote(sys.executable)))
+import shlex, sys
+config.substitutions.append(('%{python}', shlex.quote(sys.executable)))
Index: libcxx-15.0.7.src/utils/libcxx/test/dsl.py
===================================================================
--- libcxx-15.0.7.src.orig/utils/libcxx/test/dsl.py
+++ libcxx-15.0.7.src/utils/libcxx/test/dsl.py
@@ -8,9 +8,9 @@
import os
import pickle
-import pipes
import platform
import re
+import shlex
import shutil
import tempfile
@@ -261,7 +261,7 @@ def hasAnyLocale(config, locales):
}
#endif
"""
- return programSucceeds(config, program, args=[pipes.quote(l) for l in locales])
+ return programSucceeds(config, program, args=[shlex.quote(l) for l in locales])
@_memoizeExpensiveOperation(lambda c, flags='': (c.substitutions, c.environment, flags))
def compilerMacros(config, flags=''):

View File

@@ -0,0 +1,87 @@
Index: lldb-15.0.7.src/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
===================================================================
--- lldb-15.0.7.src.orig/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ lldb-15.0.7.src/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -71,10 +71,12 @@ Expected<std::string> python::As<std::st
}
static bool python_is_finalizing() {
-#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 7
- return _Py_Finalizing != nullptr;
-#else
+#if PY_VERSION_HEX >= 0x030d0000
+ return Py_IsFinalizing();
+#elif PY_VERSION_HEX >= 0x03070000
return _Py_IsFinalizing();
+#else
+ return _Py_Finalizing != nullptr;
#endif
}
@@ -772,7 +774,7 @@ bool PythonCallable::Check(PyObject *py_
return PyCallable_Check(py_obj);
}
-#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3
+#if PY_VERSION_HEX >= 0x03030000
static const char get_arg_info_script[] = R"(
from inspect import signature, Parameter, ismethod
from collections import namedtuple
@@ -801,7 +803,7 @@ Expected<PythonCallable::ArgInfo> Python
if (!IsValid())
return nullDeref();
-#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3
+#if PY_VERSION_HEX >= 0x03030000
// no need to synchronize access to this global, we already have the GIL
static PythonScript get_arg_info(get_arg_info_script);
Index: lldb-15.0.7.src/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
===================================================================
--- lldb-15.0.7.src.orig/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ lldb-15.0.7.src/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -69,8 +69,7 @@ extern "C" PyObject *PyInit__lldb(void);
#define LLDB_USE_PYTHON_SET_INTERRUPT 0
#else
// PyErr_SetInterrupt was introduced in 3.2.
-#define LLDB_USE_PYTHON_SET_INTERRUPT \
- (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 2) || (PY_MAJOR_VERSION > 3)
+#define LLDB_USE_PYTHON_SET_INTERRUPT PY_VERSION_HEX >= 0x03020000
#endif
static ScriptInterpreterPythonImpl *GetPythonInterpreter(Debugger &debugger) {
@@ -169,24 +168,33 @@ private:
// would always return `true` and `PyGILState_Ensure/Release` flow would be
// executed instead of unlocking GIL with `PyEval_SaveThread`. When
// an another thread calls `PyGILState_Ensure` it would get stuck in deadlock.
-#if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7) || (PY_MAJOR_VERSION > 3)
+#if PY_VERSION_HEX >= 0x03070000
// The only case we should go further and acquire the GIL: it is unlocked.
if (PyGILState_Check())
return;
#endif
+// `PyEval_ThreadsInitialized` was deprecated in Python 3.9 and removed in
+// Python 3.13. It has been returning `true` always since Python 3.7.
+#if PY_VERSION_HEX < 0x03090000
if (PyEval_ThreadsInitialized()) {
+#endif
Log *log = GetLog(LLDBLog::Script);
m_was_already_initialized = true;
m_gil_state = PyGILState_Ensure();
LLDB_LOGV(log, "Ensured PyGILState. Previous state = {0}locked\n",
m_gil_state == PyGILState_UNLOCKED ? "un" : "");
+
+// `PyEval_InitThreads` was deprecated in Python 3.9 and removed in
+// Python 3.13.
+#if PY_VERSION_HEX < 0x03090000
return;
}
// InitThreads acquires the GIL if it hasn't been called before.
PyEval_InitThreads();
+#endif
}
PyGILState_STATE m_gil_state = PyGILState_UNLOCKED;

View File

@@ -0,0 +1,50 @@
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/include/llvm/ADT/SmallVector.h
@@ -19,6 +19,7 @@
#include <algorithm>
#include <cassert>
#include <cstddef>
+#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <functional>
--- a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
@@ -13,6 +13,7 @@
#ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H
#define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H
+#include <cstdint>
#include <memory>
#include <string>
--- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
+++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
@@ -15,6 +15,7 @@
#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
+#include <cstdint>
#include <memory>
namespace llvm {
--- a/llvm/utils/unittest/googletest/src/gtest-death-test.cc
+++ b/llvm/utils/unittest/googletest/src/gtest-death-test.cc
@@ -32,6 +32,7 @@
#include "gtest/gtest-death-test.h"
+#include <cstdint>
#include <utility>
#include "gtest/internal/gtest-port.h"
--- a/llvm/compiler-rt-15.0.7.src/lib/orc/error.h
+++ b/llvm/compiler-rt-15.0.7.src/lib/orc/error.h
@@ -14,6 +14,7 @@
#include "stl_extras.h"
#include <cassert>
+#include <cstdint>
#include <memory>
#include <string>
#include <type_traits>

View File

@@ -1,3 +1,36 @@
-------------------------------------------------------------------
Thu Jul 24 19:27:38 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.de>
- Disable ASLR during build to make libomp.so reproducible (boo#1199076)
-------------------------------------------------------------------
Fri Jul 11 05:41:04 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch to make libomp.so reproducible (boo#1199076)
- Replace usage of %jobs for reproducible builds (boo#1237231)
-------------------------------------------------------------------
Sat Jun 21 21:26:21 UTC 2025 - Aaron Puchert <aaronpuchert@alice-dsl.net>
- Add llvm-fix-gcc15-build.patch to fix build with GCC 15.
-------------------------------------------------------------------
Thu Mar 6 08:08:26 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
- Add patches, to actually fix the build with Python 3.13:
* libcxx-use-shlex-quote.patch
* libcxx-remove-unused-imports.patch
* lldb-support-python-3.13.patch
* use-shlex-quote.patch
-------------------------------------------------------------------
Sat Nov 16 22:38:02 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
- Apply clang-shlib-symbol-versioning.patch to add symbol versions
to libclang-cpp.so similar to libLLVM.so. This is required when
multiple versions of the library are loaded into the same
process. (boo#1219405, boo#1221183, boo#1233220)
-------------------------------------------------------------------
Tue Aug 20 21:20:37 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>

View File

@@ -1,7 +1,7 @@
#
# spec file for package llvm15
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -104,7 +104,7 @@
# Set max_<type>_jobs so that every job of the given type has at least the
# given amount of memory.
%define set_jobs() \
max_%{1}_jobs="%{?jobs:%{jobs}}" \
max_%{1}_jobs="$(echo %{?_smp_mflags} | cut -c 3-)" \
if test -n "$max_%{1}_jobs" -a "$max_%{1}_jobs" -gt 1 ; then \
max_jobs="$(($avail_mem / %2))" \
test "$max_%{1}_jobs" -gt "$max_jobs" && max_%{1}_jobs="$max_jobs" && echo "Warning: Reducing number of %{1} jobs to $max_jobs because of memory limits" \
@@ -375,6 +375,8 @@ Patch16: llvm-workaround-superfluous-branches.patch
Patch17: llvm-suse-implicit-gnu.patch
# PATCH-FIX-UPSTREAM: Don't implicitly add RUNPATHs to openmp executable. (boo#1206837)
Patch18: openmp-drop-rpath.patch
# PATCH-FIX-UPSTREAM: make libomp reproducible (boo#1199076)
Patch19: reproducible.patch
Patch20: llvm_build_tablegen_component_as_shared_library.patch
Patch21: tests-use-python3.patch
Patch22: llvm-better-detect-64bit-atomics-support.patch
@@ -384,6 +386,8 @@ Patch24: opt-viewer-Find-style-css-in-usr-share.patch
Patch25: check-no-llvm-exegesis.patch
# PATCH-FIX-OPENSUSE lld-default-sha1.patch
Patch26: lld-default-sha1.patch
# PATCH-FIX-UPSTREAM: Fix build with GCC 15.
Patch31: llvm-fix-gcc15-build.patch
# Fix lookup of targets in installed CMake files. (boo#1180748, https://reviews.llvm.org/D96670)
Patch33: CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch
# Make sure we link libatomic into libLLVM if necessary. Fixes build on ppc. (https://reviews.llvm.org/D132799)
@@ -394,6 +398,16 @@ Patch35: libcxxabi-fix-armv7-test.patch
Patch36: clang-test-xfail-gnuless-triple.patch
# Fix lowering of "icmp uge <4 x i32> zeroinitializer, ..." on armv7. (https://reviews.llvm.org/D136447?id=469567, boo#1204267, gh#llvm/llvm-project#58514)
Patch37: llvm-armv7-fix-vector-compare-with-zero-lowering.patch
# PATCH-FIX-UPSTREAM: Use symbol versioning also for libclang-cpp.so.
Patch38: clang-shlib-symbol-versioning.patch
# PATCH-FIX-UPSTREAM: use shlib.quote to fix Python 3.13 compatibility
Patch39: libcxx-use-shlex-quote.patch
# PATCH-FIX-UPSTREAM: Adapt lldb to support Python 3.13
Patch40: lldb-support-python-3.13.patch
# PATCH-FIX-UPSTREAM: Remove unused imports fix Python 3.13 compatibility
Patch41: libcxx-remove-unused-imports.patch
# PATCH-FIX-OPENSUSE: Remove shlex.quote to fix Python 3.13 compatibility
Patch42: use-shlex-quote.patch
BuildRequires: binutils-devel >= 2.21.90
BuildRequires: cmake >= 3.13.4
BuildRequires: fdupes
@@ -404,6 +418,7 @@ BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: python3-base
BuildRequires: python3-setuptools
BuildRequires: pkgconfig(libedit)
BuildRequires: pkgconfig(zlib)
Requires(post): update-alternatives
@@ -828,9 +843,11 @@ This package contains the development files for Polly.
%patch -P 22 -p1
%patch -P 24 -p1
%patch -P 25 -p2
%patch -P 31 -p2
%patch -P 33 -p2
%patch -P 34 -p2
%patch -P 37 -p1
%patch -P 42 -p1
pushd clang-%{_version}.src
%patch -P 2 -p1
@@ -840,6 +857,7 @@ pushd clang-%{_version}.src
%patch -P 9 -p2
%patch -P 18 -p2
%patch -P 36 -p2
%patch -P 38 -p2
# We hardcode openSUSE
rm unittests/Driver/DistroTest.cpp
@@ -863,6 +881,7 @@ popd
%if %{with lldb}
pushd lldb-%{_version}.src
%patch -P 11 -p1
%patch -P 40 -p1
popd
%endif
@@ -873,6 +892,8 @@ popd
pushd libcxx-%{_version}.src
%patch -P 15 -p2
%patch -P 39 -p1
%patch -P 41 -p1
rm test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
rm test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
rm test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
@@ -900,6 +921,7 @@ mv lldb-%{_version}.src tools/lldb
%if %{with openmp}
mv openmp-%{_version}.src projects/openmp
%patch -P 19 -p1
%endif
%if %{with libcxx}
@@ -1099,6 +1121,7 @@ MALLOC_CHECK_BACK=$MALLOC_CHECK_
unset MALLOC_CHECK_
%endif
setarch -R \
ninja -v %{?_smp_mflags}
%if %{with thin_lto}

47
reproducible.patch Normal file
View File

@@ -0,0 +1,47 @@
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Date: Fri, 11 Jul 2025 08:26:10 +0200
Subject: [PATCH] Drop timestamp in generated source code
Fixes #72206
This helps reproducible builds of libomp.so
probably because LLVM's LTO computed a hash of inputs
to generate its symbol names.
This patch was done while working on reproducible builds for openSUSE.
---
Index: openmp-15.0.7.src/docs/conf.py
===================================================================
--- a/projects/openmp/docs/conf.py
+++ b/projects/openmp/docs/conf.py
@@ -12,7 +12,6 @@
# serve to show the default.
import sys, os
-from datetime import date
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -42,7 +41,7 @@ master_doc = 'index'
# General information about the project.
project = u'LLVM/OpenMP'
-copyright = u'2013-%d, LLVM/OpenMP' % date.today().year
+copyright = u'2013-%d, LLVM/OpenMP' % 2023
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Index: openmp-15.0.7.src/runtime/tools/message-converter.pl
===================================================================
--- a/projects/openmp/runtime/tools/message-converter.pl
+++ b/projects/openmp/runtime/tools/message-converter.pl
@@ -50,7 +50,7 @@ sub _generate_comment($$$) {
my $bulk =
$open . " Do not edit this file! " . $close . "\n" .
$open . " The file was generated from " . get_file( $data->{ "%meta" }->{ source } ) .
- " by " . $tool . " on " . localtime() . ". " . $close . "\n";
+ " by " . $tool . ". " . $close . "\n";
return $bulk;
}; # sub _generate_comment

19
use-shlex-quote.patch Normal file
View File

@@ -0,0 +1,19 @@
Index: llvm-15.0.7.src/test/Bindings/Go/lit.local.cfg
===================================================================
--- llvm-15.0.7.src.orig/test/Bindings/Go/lit.local.cfg
+++ llvm-15.0.7.src/test/Bindings/Go/lit.local.cfg
@@ -1,5 +1,4 @@
import os
-import pipes
import shlex
import sys
@@ -56,7 +55,7 @@ def fixup_compiler_path(compiler):
except (AttributeError, OSError):
pass
- return ' '.join([pipes.quote(arg) for arg in args])
+ return ' '.join([shlex.quote(arg) for arg in args])
config.environment['CC'] = fixup_compiler_path(config.host_cc)
config.environment['CXX'] = fixup_compiler_path(config.host_cxx)