Skip to content

Commit 629ba0a

Browse files
committed
Revert commits for changes that did not make it into LLVM-19
The following changes to LLVM ET were made in response to changes in LLVM which happened after the LLVM 19 branch, and therefore do not need to be on our branch either: Statically link libc++abi into libc++ (ARM-software#483) e80e252 Update a downstream patch for altered context (NFC) d95a4fa Fix a patch conflict in libc++ tests. 7616f8c Do not default to linking crt0 when using crt0-semihosting (ARM-software#460) 39523a0 Remove patch since llvm sort.pass.cpp is already marked as a long test (ARM-software#458) 3b32a82
1 parent 5d42433 commit 629ba0a

File tree

22 files changed

+94
-55
lines changed

22 files changed

+94
-55
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,12 @@ endif()
278278
# ed551e0778a35f00ab60f1c80d83ea8274d8d400.
279279
set(
280280
llvm_project_patches
281-
${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0001-libc-tests-with-picolibc-xfail-one-remaining-test.patch
281+
${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0001-libc-tests-with-picolibc-xfail-two-remaining-tests.patch
282282
${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0002-libc-tests-with-picolibc-disable-large-tests.patch
283283
${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0003-Disable-failing-compiler-rt-test.patch
284-
${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0004-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch
285-
${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0005-libc-tests-with-picolibc-mark-two-more-large-tests.patch
284+
${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0004-libc-tests-with-picolibc-mark-sort-test-as-long-one.patch
285+
${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0005-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch
286+
${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0006-libc-tests-with-picolibc-mark-two-more-large-tests.patch
286287
)
287288
FetchContent_Declare(llvmproject
288289
GIT_REPOSITORY https://github.com/llvm/llvm-project.git
@@ -1074,7 +1075,7 @@ Hard-float library with target triple \"${target_triple}\" must end \"-eabihf\""
10741075

10751076
get_runtimes_flags("${directory}" "${flags}")
10761077

1077-
set(compiler_rt_test_flags "${runtimes_flags} -fno-exceptions -fno-rtti -nostartfiles -lcrt0-semihost -lsemihost -T picolibcpp.ld")
1078+
set(compiler_rt_test_flags "${runtimes_flags} -fno-exceptions -fno-rtti -lcrt0-semihost -lsemihost -T picolibcpp.ld")
10781079
if(variant STREQUAL "armv6m_soft_nofp")
10791080
set(compiler_rt_test_flags "${compiler_rt_test_flags} -fomit-frame-pointer")
10801081
endif()
@@ -1201,7 +1202,6 @@ function(
12011202
-DLIBCXXABI_TEST_PARAMS=executor=${test_executor}
12021203
-DLIBCXX_ABI_UNSTABLE=ON
12031204
-DLIBCXX_CXX_ABI=libcxxabi
1204-
-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON
12051205
-DLIBCXX_ENABLE_FILESYSTEM=OFF
12061206
-DLIBCXX_ENABLE_SHARED=OFF
12071207
-DLIBCXX_ENABLE_STATIC=ON

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ To use the toolchain, on the command line you need to provide the following opti
8787
* The FPU to use.
8888
* Disabling/enabling C++ exceptions and RTTI.
8989
* The C runtime library: either `crt0` or `crt0-semihost`.
90-
`crt0` will be linked automatically, but this can be suppressed
91-
with the `-nostartfiles` option so that `crt0-semihost` can be used.
9290
* The semihosting library, if using `crt0-semihost`.
9391
* A [linker script](
9492
https://sourceware.org/binutils/docs/ld/Scripts.html) specified with `-T`.
@@ -104,7 +102,6 @@ $ clang \
104102
-mfpu=none \
105103
-fno-exceptions \
106104
-fno-rtti \
107-
-nostartfiles \
108105
-lcrt0-semihost \
109106
-lsemihost \
110107
-T picolibc.ld \
@@ -133,7 +130,6 @@ $ clang \
133130
-mfpu=none \
134131
-fno-exceptions \
135132
-fno-rtti \
136-
-nostartfiles \
137133
-lcrt0-semihost \
138134
-lsemihost \
139135
-T picolibc.ld \

docs/migrating.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ however uses different command line options to control selection of semihosting.
8888

8989
|Use case|GNU options|LLVM options|
9090
|--------|-----------|------------|
91-
|No semihosting|`--specs=nosys.specs`|
92-
|Semihosting|`--specs=rdimon.specs`|`-nostartfiles -lcrt0-semihost -lsemihost`|
91+
|No semihosting|`--specs=nosys.specs`|`-lcrt0`|
92+
|Semihosting|`--specs=rdimon.specs`|`-lcrt0-semihost -lsemihost`|
9393
|Newlib-nano|`--specs=nano.specs`|Not available: `picolibc` is an equivalent of `newlib-nano`.
9494

9595
## Linker

packagetest/hello.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -T %S/Inputs/microbit.ld %s -o %t.out
1+
// RUN: %clang --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -T %S/Inputs/microbit.ld %s -o %t.out
22
// RUN: qemu-system-arm -M microbit -semihosting -nographic -device loader,file=%t.out 2>&1 | FileCheck %s
33

44
#include <stdio.h>

packagetest/hello.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -T %S/Inputs/microbit.ld %s -o %t.out
1+
// RUN: %clangxx --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -T %S/Inputs/microbit.ld %s -o %t.out
22
// RUN: qemu-system-arm -M microbit -semihosting -nographic -device loader,file=%t.out 2>&1 | FileCheck %s
33

44
// Include as many C++17 headers as possible.

patches/llvm-project/0001-libc-tests-with-picolibc-xfail-one-remaining-test.patch

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From cb6cfe0e5fc29d3867f523900f0d46a4ef5dff1b Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Dominik=20W=C3=B3jt?= <[email protected]>
3+
Date: Mon, 16 Oct 2023 11:35:48 +0200
4+
Subject: [libc++] tests with picolibc: xfail two remaining tests
5+
6+
---
7+
.../cmp/cmp.alg/strong_order_long_double.verify.cpp | 5 +++++
8+
.../language.support/support.start.term/quick_exit.pass.cpp | 3 +++
9+
2 files changed, 8 insertions(+)
10+
11+
diff --git a/libcxx/test/std/language.support/cmp/cmp.alg/strong_order_long_double.verify.cpp b/libcxx/test/std/language.support/cmp/cmp.alg/strong_order_long_double.verify.cpp
12+
index c9c2ba200214..4898a9a06e09 100644
13+
--- a/libcxx/test/std/language.support/cmp/cmp.alg/strong_order_long_double.verify.cpp
14+
+++ b/libcxx/test/std/language.support/cmp/cmp.alg/strong_order_long_double.verify.cpp
15+
@@ -12,6 +12,11 @@
16+
// This test does apply to aarch64 where Arm's AAPCS64 is followed. There they are different sizes.
17+
// XFAIL: target={{arm64|arm64e|armv(7|8)(l|m)?|powerpc|powerpc64}}-{{.+}}
18+
19+
+// In internal LLVM arm BMT tests the target is fixed to "arm-none-eabi", so the
20+
+// "unsupported" cluase above does not work. TODO: find more generic way to
21+
+// detect equal sizes of double and long double
22+
+// XFAIL: LIBCXX-PICOLIBC-FIXME
23+
+
24+
// MSVC configurations have long double equal to regular double on all
25+
// architectures.
26+
// XFAIL: target={{.+}}-pc-windows-msvc
27+
diff --git a/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp b/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp
28+
index 5a70ea5bd570..92dfbe8eb1ab 100644
29+
--- a/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp
30+
+++ b/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp
31+
@@ -16,6 +16,9 @@
32+
33+
// test quick_exit and at_quick_exit
34+
35+
+// TODO: Find out why the at_quick_exit symbol is not found.
36+
+// XFAIL: LIBCXX-PICOLIBC-FIXME
37+
+
38+
#include <cstdlib>
39+
40+
void f() {}
41+
--
42+
2.34.1
43+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 7071eeaeafa681f281434d38223618165560efee Mon Sep 17 00:00:00 2001
2+
From: vrupan01 <[email protected]>
3+
Date: Thu, 25 Jul 2024 15:44:04 +0100
4+
Subject: [PATCH] [libc++] tests with picolibc: mark sort test as long one
5+
6+
---
7+
.../test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
11+
index da7794e8c85d..a904b2ee3f78 100644
12+
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
13+
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
14+
@@ -8,7 +8,7 @@
15+
16+
// This test did pass but is very slow when run using qemu. ~7 minutes on a
17+
// Neoverse N1 (AArch64) server core.
18+
-// UNSUPPORTED: LIBCXX-PICOLIBC-FIXME
19+
+// REQUIRES: long_test
20+
21+
// <algorithm>
22+
23+
--
24+
2.34.1
25+

patches/llvm-project/0004-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch renamed to patches/llvm-project/0005-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ index 000000000000..5ecc58f3e385
3939
+if "has-no-atomics" in config.available_features:
4040
+ config.unsupported = True
4141
diff --git a/libcxx/test/libcxx/thread/thread.stoptoken/intrusive_shared_ptr.pass.cpp b/libcxx/test/libcxx/thread/thread.stoptoken/intrusive_shared_ptr.pass.cpp
42-
index 99d4226662a0..243aa21c87b4 100644
42+
index 47440015f2c5..4350de3dfa65 100644
4343
--- a/libcxx/test/libcxx/thread/thread.stoptoken/intrusive_shared_ptr.pass.cpp
4444
+++ b/libcxx/test/libcxx/thread/thread.stoptoken/intrusive_shared_ptr.pass.cpp
4545
@@ -7,6 +7,8 @@
@@ -49,8 +49,8 @@ index 99d4226662a0..243aa21c87b4 100644
4949
+// XFAIL: has-no-atomics
5050
+
5151
// UNSUPPORTED: c++03, c++11, c++14, c++17
52-
// ADDITIONAL_COMPILE_FLAGS: -Wno-private-header
5352

53+
#include <__stop_token/intrusive_shared_ptr.h>
5454
diff --git a/libcxx/test/std/atomics/lit.local.cfg b/libcxx/test/std/atomics/lit.local.cfg
5555
new file mode 100644
5656
index 000000000000..5ecc58f3e385

0 commit comments

Comments
 (0)