Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add OpenBSD libc as a cross compilation target #2878

Open
Tracked by #1002
andrewrk opened this issue Jul 12, 2019 · 8 comments
Open
Tracked by #1002

add OpenBSD libc as a cross compilation target #2878

andrewrk opened this issue Jul 12, 2019 · 8 comments
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-openbsd
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Jul 12, 2019

Extracted from #514.

This is needed for OpenBSD to become a tier 1 target.

The example set by glibc can be followed.

See also this wiki page: https://github.com/ziglang/zig/wiki/Updating-libc

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. os-openbsd labels Jul 12, 2019
@andrewrk andrewrk added this to the 0.6.0 milestone Jul 12, 2019
@norcalli
Copy link

@andrewrk is that link broken? It leads to a "create new page" for me.

@redj
Copy link
Contributor

redj commented Dec 23, 2019

Is this the right wiki page?
https://github.com/ziglang/zig/wiki/Updating-libc

same issue in : #2877 (NetBSD) and #2878 (OpenBSD)

@daurnimator

This comment has been minimized.

@andrewrk andrewrk modified the milestones: 0.6.0, 0.7.0 Feb 10, 2020
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Oct 14, 2020
@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 Nov 6, 2020
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
@iacore
Copy link
Contributor

iacore commented Mar 19, 2022

What should I do to add OpenBSD libc?
This project can fetch openbsd libc files.

@semarie
Copy link
Contributor

semarie commented Mar 19, 2022

@locriacyber, openbsd-ziglibc is getting real libc and headers files. I think what is expected here is to get only functions stubs.

@iacore
Copy link
Contributor

iacore commented Mar 19, 2022

not header files? openbsd use clang as the compiler and I think it has its own libc headers. Given how OpenBSD has no ABI guarantee, every version of OpenBSD has its own libc.a libc.so to link with.

@semarie
Copy link
Contributor

semarie commented Mar 19, 2022

to build C program (using zig compiler), you need both (libc stubs and header files). to build ZIG program (using zig compiler), you need only libc stubs (assuming no C dependency).

openbsd-ziglibc extracts the whole sets of C headers which are normally installed (~50 Mo for only one OS version and only one architecture).

(and not all architectures are using clang as compiler, but it is another discussion)

@iacore
Copy link
Contributor

iacore commented Mar 19, 2022

What do you mean by "libc stubs" in case of OpenBSD? The symbol table of libc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-openbsd
Projects
None yet
Development

No branches or pull requests

6 participants