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
F153669674: D41983.id.diff
Wed, Apr 22, 7:24 PM
Unknown Object (File)
Tue, Apr 21, 4:04 AM
Unknown Object (File)
Mon, Apr 20, 1:34 AM
Unknown Object (File)
Mon, Apr 20, 12:59 AM
Unknown Object (File)
Sun, Apr 19, 6:32 PM
Unknown Object (File)
Wed, Apr 8, 4:09 PM
Unknown Object (File)
Wed, Apr 8, 12:33 AM
Unknown Object (File)
Tue, Apr 7, 11:36 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.