Page MenuHomeFreeBSD

localedef: extract ctype defs from _ctype.h instead of including it
Needs ReviewPublic

Authored by yuripv on Sep 26 2023, 11:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 5, 7:07 AM
Unknown Object (File)
Sat, Sep 5, 5:51 AM
Unknown Object (File)
Sat, Sep 5, 5:15 AM
Unknown Object (File)
Thu, Sep 3, 5:02 PM
Unknown Object (File)
Thu, Sep 3, 6:32 AM
Unknown Object (File)
Thu, Sep 3, 1:35 AM
Unknown Object (File)
Tue, Sep 1, 6:27 AM
Unknown Object (File)
Tue, Sep 1, 1:30 AM
Subscribers

Details

Summary

Directly including _ctype.h from source tree while building bootstrap
version can pick up undesired changes that require new libc to run.
Instead simply extract the required _CTYPE definitions.

This is a prerequisite for other work that modifies _ctype.h and bootstrap/native
localedef dumps core as the changes in _ctype.h require changes in libc.

Test Plan

native buildworld, still not able to setup proper linux cross-build environment

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This will almost certainly break the cross build. The typedefs in the local _ctype.h are needed. Can you modify that file to include the new generated header?

This will almost certainly break the cross build. The typedefs in the local _ctype.h are needed. Can you modify that file to include the new generated header?

Yep, I am working on getting cross-build, but I don't see why it would break though, nothing in ctype.c uses those types and we are not including/using the is*() functions.

This will almost certainly break the cross build. The typedefs in the local _ctype.h are needed. Can you modify that file to include the new generated header?

Yep, I am working on getting cross-build, but I don't see why it would break though, nothing in ctype.c uses those types and we are not including/using the is*() functions.

I even tried the following after the includes and before runefile.h, does not seem to break anything (real testing is pending, yes):

#define        __ct_rune_t foo
#define        __rune_t foo
#define        __wint_t foo

You could push to a GitHub fork, then it will run the bootstrap steps as part of the GitHub action

You could push to a GitHub fork, then it will run the bootstrap steps as part of the GitHub action

Sorry for being slow (that's not the first I'm told about this), but I don't know where exactly should I push? To a branch in my fork of freebsd-src on github (and create a pull request?)?

You could push to a GitHub fork, then it will run the bootstrap steps as part of the GitHub action

Sorry for being slow (that's not the first I'm told about this), but I don't know where exactly should I push? To a branch in my fork of freebsd-src on github (and create a pull request?)?

Yes, that should work. It might also be sufficient to push to your fork's main branch.