Skip to content

Conversation

@Prabhuk
Copy link
Contributor

@Prabhuk Prabhuk commented Nov 6, 2025

No description provided.

@llvmbot llvmbot added the libc label Nov 6, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 6, 2025

@llvm/pr-subscribers-backend-risc-v

@llvm/pr-subscribers-libc

Author: Prabhu Rajasekaran (Prabhuk)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/166677.diff

1 Files Affected:

  • (modified) libc/config/baremetal/arm/entrypoints.txt (+1)
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index 82e257c1d2b0d..ab8d4cbeea0c3 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -269,6 +269,7 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.time.difftime
     libc.src.time.gmtime
     libc.src.time.gmtime_r
+    libc.src.time.localtime_r
     libc.src.time.mktime
     libc.src.time.strftime
     libc.src.time.strftime_l

libc.src.time.difftime
libc.src.time.gmtime
libc.src.time.gmtime_r
libc.src.time.localtime_r
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also include libc.src.time.localtime and update other baremetal/*/entrypoints.txt files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to include this for aarch64 baremetal target as well? I see @michaelrj-google removed localtime* from aarch64 in this PR after it had previously landed: #156776

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that was just a quick fix, if the tests are passing now feel free to enable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I'll merge this and keep an eye out for post submit builder emails.

@Prabhuk
Copy link
Contributor Author

Prabhuk commented Nov 6, 2025

While building the Fuchsia toolchain locally, baremetal runtimes builds are failing. I am debugging them currently. Marking the PR as draft until I resolve the failures.

[514/554] Building CXX object libcxx/src/CMakeFiles/cxx_static.dir/charconv.cpp.obj
FAILED: [code=1] libcxx/src/CMakeFiles/cxx_static.dir/charconv.cpp.obj 
/usr/local/google/home/prabhukr/llvm-builds/build/./bin/clang++ --target=armv8.1m.main-none-eabi -DLIBC_NAMESPACE=__llvm_libc_common_utils -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_SINGLE -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_LARGEFILE_SOURCE -D_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_LINK_PTHREAD_LIB -D_LIBCPP_LINK_RT_LIB -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/local/google/home/prabhukr/llvm/llvm-project/libcxx/src -I/usr/local/google/home/prabhukr/llvm-builds/build/include/armv8.1m.main-unknown-none-eabi/c++/v1 -I/usr/local/google/home/prabhukr/llvm-builds/build/include/c++/v1 -I/usr/local/google/home/prabhukr/llvm/llvm-project/cmake/Modules/../../libc -isystem /usr/local/google/home/prabhukr/llvm-builds/build/include/armv8.1m.main-unknown-none-eabi --target=armv8.1m.main-none-eabi -Wno-atomic-alignment "-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)" "-Dfprintf(stream, format, ...)=printf(format)" "-Dfputs(string, stream)=puts(string)" -D_LIBCPP_PRINT=1 -mthumb -mfloat-abi=hard -march=armv8.1-m.main+mve.fp+fp.dp -mcpu=cortex-m55 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -ffile-prefix-map=/usr/local/google/home/prabhukr/llvm-builds/build/runtimes/runtimes-armv8.1m.main-none-eabi-bins=../../../../llvm/llvm-project -ffile-prefix-map=/usr/local/google/home/prabhukr/llvm/llvm-project/= -no-canonical-prefixes -Os -DNDEBUG -std=c++2b -UNDEBUG -faligned-allocation -nostdinc++ -fvisibility-inlines-hidden -fvisibility=hidden -fsized-deallocation -Wall -Wextra -Wnewline-eof -Wshadow -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wunused-template -Wformat-nonliteral -Wzero-length-array -Wdeprecated-redundant-constexpr-static-def -Wno-nullability-completeness -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-error -fno-exceptions -fno-rtti -fdebug-prefix-map=/usr/local/google/home/prabhukr/llvm-builds/build/include/c++/v1=/usr/local/google/home/prabhukr/llvm/llvm-project/libcxx/include -nostdlibinc -idirafter/usr/include -MD -MT libcxx/src/CMakeFiles/cxx_static.dir/charconv.cpp.obj -MF libcxx/src/CMakeFiles/cxx_static.dir/charconv.cpp.obj.d -o libcxx/src/CMakeFiles/cxx_static.dir/charconv.cpp.obj -c /usr/local/google/home/prabhukr/llvm/llvm-project/libcxx/src/charconv.cpp
In file included from /usr/local/google/home/prabhukr/llvm/llvm-project/libcxx/src/charconv.cpp:12:
In file included from /usr/local/google/home/prabhukr/llvm/llvm-project/libcxx/src/include/from_chars_floating_point.h:14:
In file included from /usr/local/google/home/prabhukr/llvm/llvm-project/cmake/Modules/../../libc/shared/str_to_float.h:13:
In file included from /usr/local/google/home/prabhukr/llvm/llvm-project/cmake/Modules/../../libc/src/__support/str_to_float.h:29:
In file included from /usr/local/google/home/prabhukr/llvm/llvm-project/cmake/Modules/../../libc/src/__support/high_precision_decimal.h:22:
In file included from /usr/local/google/home/prabhukr/llvm/llvm-project/cmake/Modules/../../libc/src/__support/str_to_integer.h:28:
In file included from /usr/local/google/home/prabhukr/llvm/llvm-project/cmake/Modules/../../libc/src/__support/wctype_utils.h:12:
In file included from /usr/local/google/home/prabhukr/llvm/llvm-project/cmake/Modules/../../libc/hdr/types/wint_t.h:19:
In file included from /usr/local/google/home/prabhukr/llvm/llvm-project/cmake/Modules/../../libc/hdr/wchar_overlay.h:46:
In file included from /usr/local/google/home/prabhukr/llvm-builds/build/include/c++/v1/wchar.h:122:
In file included from /usr/local/google/home/prabhukr/llvm-builds/build/include/c++/v1/__mbstate_t.h:43:
/usr/include/bits/types/mbstate_t.h:6:21: error: typedef redefinition with different types ('__mbstate_t' vs 'struct mbstate_t')
    6 | typedef __mbstate_t mbstate_t;
      |                     ^
/usr/local/google/home/prabhukr/llvm-builds/build/include/armv8.1m.main-unknown-none-eabi/llvm-libc-types/mbstate_t.h:18:3: note: previous definition is here
   18 | } mbstate_t;
      |   ^
1 error generated.
[538/554] Building CXX object libcxx/src/CMakeFiles/cxx_static.dir/print.cpp.obj
FAILED: [code=1] libcxx/src/CMakeFiles/cxx_static.dir/print.cpp.obj 
/usr/local/google/home/prabhukr/llvm-builds/build/./bin/clang++ --target=armv8.1m.main-none-eabi -DLIBC_NAMESPACE=__llvm_libc_common_utils -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_SINGLE -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_LARGEFILE_SOURCE -D_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_LINK_PTHREAD_LIB -D_LIBCPP_LINK_RT_LIB -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/local/google/home/prabhukr/llvm/llvm-project/libcxx/src -I/usr/local/google/home/prabhukr/llvm-builds/build/include/armv8.1m.main-unknown-none-eabi/c++/v1 -I/usr/local/google/home/prabhukr/llvm-builds/build/include/c++/v1 -I/usr/local/google/home/prabhukr/llvm/llvm-project/cmake/Modules/../../libc -isystem /usr/local/google/home/prabhukr/llvm-builds/build/include/armv8.1m.main-unknown-none-eabi --target=armv8.1m.main-none-eabi -Wno-atomic-alignment "-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)" "-Dfprintf(stream, format, ...)=printf(format)" "-Dfputs(string, stream)=puts(string)" -D_LIBCPP_PRINT=1 -mthumb -mfloat-abi=hard -march=armv8.1-m.main+mve.fp+fp.dp -mcpu=cortex-m55 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -ffile-prefix-map=/usr/local/google/home/prabhukr/llvm-builds/build/runtimes/runtimes-armv8.1m.main-none-eabi-bins=../../../../llvm/llvm-project -ffile-prefix-map=/usr/local/google/home/prabhukr/llvm/llvm-project/= -no-canonical-prefixes -Os -DNDEBUG -std=c++2b -UNDEBUG -faligned-allocation -nostdinc++ -fvisibility-inlines-hidden -fvisibility=hidden -fsized-deallocation -Wall -Wextra -Wnewline-eof -Wshadow -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wunused-template -Wformat-nonliteral -Wzero-length-array -Wdeprecated-redundant-constexpr-static-def -Wno-nullability-completeness -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-error -fno-exceptions -fno-rtti -fdebug-prefix-map=/usr/local/google/home/prabhukr/llvm-builds/build/include/c++/v1=/usr/local/google/home/prabhukr/llvm/llvm-project/libcxx/include -nostdlibinc -idirafter/usr/include -MD -MT libcxx/src/CMakeFiles/cxx_static.dir/print.cpp.obj -MF libcxx/src/CMakeFiles/cxx_static.dir/print.cpp.obj.d -o libcxx/src/CMakeFiles/cxx_static.dir/print.cpp.obj -c /usr/local/google/home/prabhukr/llvm/llvm-project/libcxx/src/print.cpp
In file included from /usr/local/google/home/prabhukr/llvm/llvm-project/libcxx/src/print.cpp:24:
/usr/include/unistd.h:27:1: error: unknown type name '__BEGIN_DECLS'
   27 | __BEGIN_DECLS
      | ^
/usr/include/unistd.h:287:52: error: expected function body after function declarator
  287 | extern int access (const char *__name, int __type) __THROW __nonnull ((1));
      |                                                    ^
/usr/include/unistd.h:339:65: error: expected function body after function declarator
  339 | extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
      |                                                                 ^
/usr/include/unistd.h:371:62: error: expected function body after function declarator
  371 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
      |                                                              ^
/usr/include/unistd.h:378:64: error: expected function body after function declarator
  378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                                                                ^
/usr/include/unistd.h:437:36: error: expected function body after function declarator
  437 | extern int pipe (int __pipedes[2]) __THROW __wur;
      |                                    ^
/usr/include/unistd.h:452:52: error: expected function body after function declarator
  452 | extern unsigned int alarm (unsigned int __seconds) __THROW;
      |                                                    ^
/usr/include/unistd.h:494:6: error: expected function body after function declarator
  494 |      __THROW __nonnull ((1)) __wur;
      |      ^
/usr/include/unistd.h:517:39: error: expected function body after function declarator
  517 | extern int chdir (const char *__path) __THROW __nonnull ((1)) __wur;
      |                                       ^
/usr/include/unistd.h:531:50: error: expected function body after function declarator
  531 | extern char *getcwd (char *__buf, size_t __size) __THROW __wur;
      |                                                  ^
/usr/include/unistd.h:552:27: error: expected function body after function declarator
  552 | extern int dup (int __fd) __THROW __wur;
      |                           ^
/usr/include/unistd.h:555:39: error: expected function body after function declarator
  555 | extern int dup2 (int __fd, int __fd2) __THROW;
      |                                       ^
/usr/include/unistd.h:573:28: error: expected function body after function declarator
  573 |                    char *const __envp[]) __THROW __nonnull ((1, 2));
      |                                          ^
/usr/include/unistd.h:585:6: error: expected function body after function declarator
  585 |      __THROW __nonnull ((1, 2));
      |      ^
/usr/include/unistd.h:590:6: error: expected function body after function declarator
  590 |      __THROW __nonnull ((1, 2));
      |      ^
/usr/include/unistd.h:595:6: error: expected function body after function declarator
  595 |      __THROW __nonnull ((1, 2));
      |      ^
/usr/include/unistd.h:600:6: error: expected function body after function declarator
  600 |      __THROW __nonnull ((1, 2));
      |      ^
/usr/include/unistd.h:606:6: error: expected function body after function declarator
  606 |      __THROW __nonnull ((1, 2));
      |      ^
/usr/include/unistd.h:634:6: error: expected function body after function declarator
  634 |      __THROW __nonnull ((1));
      |      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[547/554] Building CXX object libcxx/src/CMakeFiles/cxx_static.dir/chrono.cpp.obj

@Prabhuk Prabhuk marked this pull request as draft November 6, 2025 19:11
@Prabhuk Prabhuk marked this pull request as ready for review November 6, 2025 22:11
@Prabhuk
Copy link
Contributor Author

Prabhuk commented Nov 6, 2025

The libcxx build failure downstream is a local environment issue. Verified that this change builds Fuchsia toolchain with arm and riscv 32 targets successfully in our bots https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci.shadow/clang-linux-x64/b8698914645026512801/overview

@Prabhuk Prabhuk merged commit bf1b866 into llvm:main Nov 7, 2025
18 of 20 checks passed
vinay-deshmukh pushed a commit to vinay-deshmukh/llvm-project that referenced this pull request Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants