Skip to content

patches for additional libc backend#28

Open
ahgamut wants to merge 9 commits intograalvm:masterfrom
elide-dev:cosmo
Open

patches for additional libc backend#28
ahgamut wants to merge 9 commits intograalvm:masterfrom
elide-dev:cosmo

Conversation

@ahgamut
Copy link

@ahgamut ahgamut commented Feb 2, 2026

(WIP) related to oracle/graal#12865

Gautham added 5 commits January 24, 2026 22:55
skipping alsa means we will not build libjsound
skipping libx11 means we will not build libjawt or any of its deps
@olpaw
Copy link
Member

olpaw commented Feb 9, 2026

@ahgamut thanks for providing this PR.

Many changes of this PR can and should be avoided by providing additional stub implementations for https://github.com/jart/cosmopolitan, just like ones you already have in https://github.com/ahgamut/cosmopolitan/tree/header-stubs

For the sake of labsjdk maintainability using the stubs header approach is much more reasonable.

For the remaining changes, every modification that is specific to cosmo-support must be guarded with ifdefs (or m4 macro name) to be acceptable. No hacks like e.g.
0da77ca#diff-229b30d66ee3168bdb7b0cadec57c5b39145f5b08a1c3416248721ecc1d901c0
0da77ca#diff-83ba4f513f316e2b1bd706bba84a9eb39515b17c5a0685ff671d16b37f01f776
...

In other words, if I preprocess all sources with __COSMOPOLITAN__ undefined (and the equivalent for m4) I must end up with quasi-identical source state to current master.

Once there is a cosmopolitan release with all the necessary stubs, and the above issues are resolved we can take another look.

cc @lewurm @christianhaeubl @wirthi

Gautham added 4 commits February 14, 2026 22:02
ifdef'd out ptrace, if_nametoindex, epoll, eventfd, timer_*, some
constants, ipv6, and some aarch64 headers.
@olpaw
Copy link
Member

olpaw commented Feb 24, 2026

@ahgamut I saw you pushed some commits last week.

Is this ready for another round or do you plan more changes before I have another look?

@ahgamut
Copy link
Author

ahgamut commented Feb 24, 2026

I think I've fixed all the ifdef guards discussed earlier. Also expect 0d70347 is not required, but have not been able to fix that one yet.

I was trying a couple of separate changes, but if this one is ok, we can look at those later.

@olpaw
Copy link
Member

olpaw commented Feb 24, 2026

Thanks for the update.

Where are you on getting your Cosmo changes from
https://github.com/ahgamut/cosmopolitan/tree/header-stubs
merged upstream? Any progress there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants