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, Dec 14, 9:23 AM
Unknown Object (File)
Dec 5 2024, 8:07 AM
Unknown Object (File)
Oct 22 2024, 1:24 PM
Unknown Object (File)
Oct 20 2024, 3:54 AM
Unknown Object (File)
Oct 2 2024, 8:20 AM
Unknown Object (File)
Oct 2 2024, 6:14 AM
Unknown Object (File)
Oct 1 2024, 7:16 AM
Unknown Object (File)
Sep 30 2024, 10:39 PM
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.