1- From 47f113bfa3cfa5c6b8c37636cedb4cf4d12d65aa Mon Sep 17 00:00:00 2001
1+ From acb9eb72087a5ca9e408c8642c316f663f91cd9f Mon Sep 17 00:00:00 2001
22From: Michael Platings <
[email protected] >
33Date: Fri, 29 Sep 2023 09:35:52 +0100
4- Subject: [PATCH 2/4 ] Add check for building with picolibc
4+ Subject: [PATCH 2/5 ] Add check for building with picolibc
55
66This is intended to identify changes that would fail to build on
77embedded platforms e.g. D152382
@@ -31,7 +31,6 @@ Differential Revision: https://reviews.llvm.org/D154246
3131 .../atomic_fetch_xor_explicit.pass.cpp | 2 +
3232 .../ctor.pass.cpp | 2 +
3333 .../depr.c.headers/fenv_h.compile.pass.cpp | 3 +
34- .../depr.c.headers/stdio_h.compile.pass.cpp | 3 +
3534 .../depr.c.headers/uchar_h.compile.pass.cpp | 3 +
3635 .../reference_assignment.pass.cpp | 3 +
3736 .../narrow.stream.objects/cerr.sh.cpp | 2 +
@@ -50,14 +49,14 @@ Differential Revision: https://reviews.llvm.org/D154246
5049 .../time.clock.system/to_time_t.pass.cpp | 3 +
5150 .../op_-duration.pass.cpp | 3 +
5251 libcxx/utils/ci/BOT_OWNERS.txt | 2 +-
53- libcxx/utils/ci/build-picolibc.sh | 109 ++++++++++++++++++
52+ libcxx/utils/ci/build-picolibc.sh | 111 ++++++++++++++++++
5453 libcxx/utils/ci/buildkite-pipeline.yml | 5 +
5554 libcxx/utils/ci/run-buildbot | 35 ++++++
5655 libcxx/utils/libcxx/test/features.py | 29 ++++-
5756 .../test/configs/armv7m-libc++abi.cfg.in | 33 ++++++
5857 libcxxabi/test/test_demangle.pass.cpp | 3 +
5958 .../test/configs/armv7m-libunwind.cfg.in | 33 ++++++
60- 47 files changed, 430 insertions(+), 14 deletions(-)
59+ 46 files changed, 429 insertions(+), 14 deletions(-)
6160 create mode 100644 libcxx/cmake/caches/Armv7M-picolibc.cmake
6261 create mode 100644 libcxx/test/configs/armv7m-libc++.cfg.in
6362 create mode 100755 libcxx/utils/ci/build-picolibc.sh
@@ -445,20 +444,6 @@ index fda5e186c036..dcc97573d607 100644
445444 // <fenv.h>
446445
447446 #include <fenv.h>
448- diff --git a/libcxx/test/std/depr/depr.c.headers/stdio_h.compile.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdio_h.compile.pass.cpp
449- index 55731c857ecf..af97ef2fddfb 100644
450- --- a/libcxx/test/std/depr/depr.c.headers/stdio_h.compile.pass.cpp
451- +++ b/libcxx/test/std/depr/depr.c.headers/stdio_h.compile.pass.cpp
452- @@ -6,6 +6,9 @@
453- //
454- //===----------------------------------------------------------------------===//
455-
456- + // stderr et al are not macros in picolibc's tinystdio.
457- + // XFAIL: LIBCXX-PICOLIBC-FIXME
458- +
459- // test <stdio.h>
460-
461- #include <stdio.h>
462447diff --git a/libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp b/libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp
463448index 2b6455466681..a1560c8ee585 100644
464449--- a/libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp
@@ -707,10 +692,10 @@ index 721b19e52d8b..de575c591383 100644
707692708693diff --git a/libcxx/utils/ci/build-picolibc.sh b/libcxx/utils/ci/build-picolibc.sh
709694new file mode 100755
710- index 000000000000..acdcabe96e96
695+ index 000000000000..078c2bdf5ebc
711696--- /dev/null
712697+++ b/libcxx/utils/ci/build-picolibc.sh
713- @@ -0,0 +1,109 @@
698+ @@ -0,0 +1,111 @@
714699+ #!/usr/bin/env bash
715700+ #===----------------------------------------------------------------------===##
716701+ #
@@ -783,9 +768,11 @@ index 000000000000..acdcabe96e96
783768+ mkdir -p "${picolibc_source_dir}"
784769+ mkdir -p "${picolibc_build_dir}"
785770+ # Download the version of picolibc that was the latest at the time this script was written.
786- + # The picolibc linker script was changed after version 1.8.2 to work with ld.lld so a
787- + # more recent version is required, which at the time of writing is not yet released.
788- + picolibc_commit="8dd225aa1469c03805617106020d494912c6d265"
771+ + # Following changes are required and were introduced after version 1.8.5:
772+ + # - updated semihost arguments handling,
773+ + # - added missing macros in stdio.h
774+ + # Version following 1.8.5, was not released by the time of writing.
775+ + picolibc_commit="4b9b8ef01d18cf0563348ad4af4ae89a7277e7ca"
789776+ curl -L "https://github.com/picolibc/picolibc/archive/${picolibc_commit}.zip" --output "${picolibc_source_dir}/picolibc.zip"
790777+ unzip -q "${picolibc_source_dir}/picolibc.zip" -d "${picolibc_source_dir}"
791778+ mv "${picolibc_source_dir}/picolibc-${picolibc_commit}"/* "${picolibc_source_dir}"
0 commit comments