From 77b3f7ed260fa444b5c801487fd038b422174fc4b27d18cd07b651d156df924d Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Tue, 20 Sep 2022 21:37:44 +0000 Subject: [PATCH 1/2] Accepting request 1004848 from openSUSE:Factory:RISCV - Use correct LLVM_HOST_TRIPLE for riscv64 OBS-URL: https://build.opensuse.org/request/show/1004848 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm14?expand=0&rev=41 --- llvm14.changes | 5 +++++ llvm14.spec | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/llvm14.changes b/llvm14.changes index 03d82b9..d8ff532 100644 --- a/llvm14.changes +++ b/llvm14.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 19 18:32:11 UTC 2022 - Andreas Schwab + +- Use correct LLVM_HOST_TRIPLE for riscv64 + ------------------------------------------------------------------- Sat Sep 3 15:15:10 UTC 2022 - Aaron Puchert diff --git a/llvm14.spec b/llvm14.spec index 2e77766..26cf6c0 100644 --- a/llvm14.spec +++ b/llvm14.spec @@ -79,7 +79,12 @@ %else %define host_runtime gnu %endif +%ifarch riscv64 +# This must match the gcc target exactly +%define host_triple %{host_cpu}-%{_host_vendor}-%{_host_os} +%else %define host_triple %{host_cpu}-%{_host_vendor}-%{_host_os}-%{host_runtime} +%endif # By default, build everything. %global llvm_targets "all" From abbfdf5c7ddaa8889b2be68ae983955c135b9c42969380d8e86af29e31835641 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Thu, 22 Sep 2022 18:22:31 +0000 Subject: [PATCH 2/2] Accepting request 1005471 from home:aaronpuchert:branches:devel:tools:compiler - 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/1005471 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm14?expand=0&rev=42 --- clang-test-xfail-gnuless-triple.patch | 10 ++++++++++ llvm14.changes | 6 ++++++ llvm14.spec | 11 ++++------- 3 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 clang-test-xfail-gnuless-triple.patch diff --git a/clang-test-xfail-gnuless-triple.patch b/clang-test-xfail-gnuless-triple.patch new file mode 100644 index 0000000..e5a74b1 --- /dev/null +++ b/clang-test-xfail-gnuless-triple.patch @@ -0,0 +1,10 @@ +diff --git a/clang/test/Driver/XRay/xray-instrument-os.c b/clang/test/Driver/XRay/xray-instrument-os.c +index 3a0397208326..5cf7e35fdbf3 100644 +--- a/clang/test/Driver/XRay/xray-instrument-os.c ++++ b/clang/test/Driver/XRay/xray-instrument-os.c +@@ -1,4 +1,4 @@ + // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s +-// XFAIL: -linux-, -freebsd, x86_64-apple-darwin, x86_64-apple-macos ++// XFAIL: linux, freebsd, x86_64-apple-darwin, x86_64-apple-macos + // REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64 + typedef int a; diff --git a/llvm14.changes b/llvm14.changes index d8ff532..be91f20 100644 --- a/llvm14.changes +++ b/llvm14.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 21 21:21:19 UTC 2022 - Aaron Puchert + +- Always drop -gnu from triple for consistency. Patch a test that + was looking for -linux- in clang-test-xfail-gnuless-triple.patch. + ------------------------------------------------------------------- Mon Sep 19 18:32:11 UTC 2022 - Andreas Schwab diff --git a/llvm14.spec b/llvm14.spec index 26cf6c0..e105188 100644 --- a/llvm14.spec +++ b/llvm14.spec @@ -75,15 +75,9 @@ %endif %ifarch %{arm} -%define host_runtime gnueabihf +%define host_triple %{host_cpu}-%{_host_vendor}-%{_host_os}-gnueabihf %else -%define host_runtime gnu -%endif -%ifarch riscv64 -# This must match the gcc target exactly %define host_triple %{host_cpu}-%{_host_vendor}-%{_host_os} -%else -%define host_triple %{host_cpu}-%{_host_vendor}-%{_host_os}-%{host_runtime} %endif # By default, build everything. @@ -381,6 +375,8 @@ Patch33: CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch Patch34: clang-repl-private-deps.patch # Cherry pick patch from LLVM 15: https://github.com/llvm/llvm-project/issues/56421 Patch35: llvm-glibc-2-36.patch +# Let test match for linux instead of -linux-. +Patch36: clang-test-xfail-gnuless-triple.patch BuildRequires: binutils-devel >= 2.21.90 BuildRequires: cmake >= 3.13.4 BuildRequires: fdupes @@ -818,6 +814,7 @@ pushd clang-%{_version}.src %patch6 -p1 %patch9 -p2 %patch34 -p2 +%patch36 -p2 # We hardcode openSUSE rm unittests/Driver/DistroTest.cpp