[nanvix] fix(z): disable libc++ wide characters (incomplete Nanvix libc)#35
Merged
Merged
Conversation
The stage-1 build cleared libunwind and then failed building libc++/libc++abi: build-runtimes/include/c++/v1/wchar.h:152: error: use of undeclared identifier 'wcspbrk' libc++'s <wchar.h> wrapper (guarded by _LIBCPP_HAS_WIDE_CHARACTERS) defines const-correct overloads that call the C library's ::wcspbrk (and ::wcschr, ::wcsrchr, ::wcsstr, ::wmemchr). The in-source Nanvix libc does not fully implement the wide-character API: wcspbrk is neither declared in <wchar.h> nor defined in libc.a (the others are). So libc++ cannot be built with wide characters against this libc. Set LIBCXX_ENABLE_WIDE_CHARACTERS=OFF to match libc++ to the libc's actual capabilities. This guards out the entire wide-character wrapper class (not just wcspbrk), so it also avoids any further wide-char gaps in one step. Reversible: re-enable once the Nanvix libc provides the full wide-character set (declarations + implementations). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The #34 merge cleared the libunwind header errors; the stage-1 build then failed compiling libc++/libc++abi:
libc++'s
<wchar.h>wrapper (guarded by_LIBCPP_HAS_WIDE_CHARACTERS) defines const-correct overloads that call the C library's::wcspbrk/::wcschr/::wcsrchr/::wcsstr/::wmemchr. The in-source Nanvix libc does not fully implement the wide-character API:wcspbrkis neither declared in<wchar.h>nor defined inlibc.a(the others are). So libc++ can't be built with wide characters against this libc.Fix
Set
-DLIBCXX_ENABLE_WIDE_CHARACTERS=OFF. This guards out the entire wide-character wrapper class (not justwcspbrk), aligning libc++ with the libc's actual capabilities and avoiding further wide-char gaps in one step.Validation
bash -n zclean.wcspbrkconfirmed absent fromlibc.aviallvm-nm; the wrapper block confirmed guarded by_LIBCPP_HAS_WIDE_CHARACTERS.Caveat
Iterative stage-1 bring-up: this clears the wide-character blocker. Further libc++/libc++abi compile or link issues against the in-source libc may surface next; I'll continue iterating. Validated on merge (PR CI verifies stage 0 only).