Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Basic NetBSD support needed to build GDC #2472

Merged
merged 1 commit into from Jan 22, 2019
Merged

Conversation

coypoop
Copy link
Contributor

@coypoop coypoop commented Jan 22, 2019

Uncomment dlinfo, provide assert and mbstate_t

The one patch I have left for is that I had trouble using src/core/sys/netbsd/execinfo.d with GDC, it didn't seem to provide D_InlineAsm_X86_64 or D_InlineAsm_X86 (I am building on x86-64)

I worked around it by providing a declaring matching libexecinfo but that required supplying -lexecinfo.

One remaining issue I have to resolve is that time_t (src/core/sys/posix/sys/types.d:177) is considered c_long, it is actually 64bit on all archs, but only if you use the newer functions.

NetBSD has a funky way of updating libc functions, where it relies on the inclusion of headers to use the new functions (as opposed to relying on the linker with symbol versioning), which is a little problematic for languages that can't use those headers. The old references for 32bit work though.

Copy link
Contributor

@thewilsonator thewilsonator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me.

@thewilsonator
Copy link
Contributor

cc @ibuclaw

@dlang-bot dlang-bot merged commit badbc18 into dlang:master Jan 22, 2019
@ibuclaw
Copy link
Member

ibuclaw commented Jan 22, 2019

D_InlineAsm_X86_64 or D_InlineAsm_X86 (I am building on x86-64)

These are for dmd syntax inline assembler.

@rmboggs
Copy link
Contributor

rmboggs commented Jan 22, 2019

sorry to comment on a merged pull request but is there any reason why __mbstate_t is defined in both wchar_d and stdio.d files? Or am I misreading something? This can also be said for OpenBSD.

@PetarKirov
Copy link
Member

@rmboggs you're right, *mbstate_t should be defined only in core.stdc.wchar_ and imported in core.stdc.stdio. My guess is that someone needed the definition for *bsd's stdio, but since it wasn't in wchar_, they defined it inline. Feel free to open a PR that (re)moves *mbstate_t from stdio.

@rmboggs
Copy link
Contributor

rmboggs commented Jan 22, 2019

Thank you for confirming. Currently trying to work on OpenBSD support so it is good to know where it belongs. I'll see about creating a pull request to organize this for Net/OpenBSD when I can.

@rmboggs
Copy link
Contributor

rmboggs commented Jan 22, 2019

#2473

Uncomment dlinfo, provide assert and mbstate_t
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants