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)
Tue, Apr 30, 2:51 PM
Unknown Object (File)
Fri, Apr 26, 3:20 PM
Unknown Object (File)
Fri, Apr 26, 3:20 PM
Unknown Object (File)
Fri, Apr 26, 9:59 AM
Unknown Object (File)
Apr 4 2024, 12:08 PM
Unknown Object (File)
Feb 24 2024, 9:05 PM
Unknown Object (File)
Dec 23 2023, 3:42 AM
Unknown Object (File)
Dec 11 2023, 4:49 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.