Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

netbsd patch: core/sys/netbsd#1493

Merged
dlang-bot merged 1 commit intodlang:masterfrom
sibnick:netbsd_core_sys_netbsd
Apr 8, 2017
Merged

netbsd patch: core/sys/netbsd#1493
dlang-bot merged 1 commit intodlang:masterfrom
sibnick:netbsd_core_sys_netbsd

Conversation

@sibnick
Copy link
Contributor

@sibnick sibnick commented Feb 4, 2016

A part of NetBSD support (joakim-noah suggests to split original big pull request)

@sibnick sibnick mentioned this pull request Feb 4, 2016
@@ -0,0 +1,16 @@
/**
* D header file for FreeBSD
*
Copy link
Contributor

Choose a reason for hiding this comment

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

NetBSD header

@joakim-noah
Copy link
Contributor

I diffed this PR against the pre-existing core.sys.netbsd: seems to mostly be a straight copy and rename, which is why the cdefs comment above is wrong and there are TODO comments that some files haven't been checked.

Fix that comment and the five remaining links to FreeBSD SVN headers, and I see no harm in merging.

@sibnick sibnick force-pushed the netbsd_core_sys_netbsd branch from f3835cd to d460689 Compare February 4, 2016 17:19
@sibnick
Copy link
Contributor Author

sibnick commented Feb 4, 2016

Fixed

@ibuclaw
Copy link
Member

ibuclaw commented Feb 6, 2016

Do we have links to NetBSD reference C headers?

@ibuclaw
Copy link
Member

ibuclaw commented Feb 6, 2016

What about Makefile changes to maybe compile and install these interface modules?

@dnadlinger
Copy link
Contributor

LDC doesn't use the upstream build system, and DMD doesn't support NetBSD...

@dnadlinger
Copy link
Contributor

Hmm, you might have a point regarding doc building. I always forget how that is handled, cross-platform-wise.

@ibuclaw
Copy link
Member

ibuclaw commented Feb 7, 2016

LDC doesn't use the upstream build system, and DMD doesn't support NetBSD...

Documentation for those who could support it when the time comes to downstream. :-)

@sibnick
Copy link
Contributor Author

sibnick commented Feb 9, 2016

Do we have links to NetBSD reference C headers?

Actual NetBSD layout is differ. Currently I have FreeBSD layout + NetBSD changes. I should reorganize elf related files to conform NetBSD headers.

@sibnick sibnick force-pushed the netbsd_core_sys_netbsd branch from d460689 to a9955f4 Compare February 17, 2016 18:43
@sibnick sibnick force-pushed the netbsd_core_sys_netbsd branch from a9955f4 to d7ad4d0 Compare February 27, 2016 11:03
@sibnick sibnick force-pushed the netbsd_core_sys_netbsd branch 2 times, most recently from cbeac82 to 5960696 Compare March 6, 2016 15:02
@sibnick sibnick force-pushed the netbsd_core_sys_netbsd branch from 5960696 to a9f4e7a Compare January 31, 2017 08:40
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request head (netbsd_core_sys_netbsd@a9f4e7a).


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0bf08d...a9f4e7a. Read the comment docs.

@sibnick sibnick force-pushed the netbsd_core_sys_netbsd branch from a9f4e7a to 60e2a2f Compare February 1, 2017 02:43
@joakim-noah
Copy link
Contributor

So I guess this still has to be reorganized to conform to the NetBSD layout? We try to keep these include files the same as the headers, so that would help.

@sibnick sibnick force-pushed the netbsd_core_sys_netbsd branch from 60e2a2f to accddad Compare March 17, 2017 11:40
@sibnick
Copy link
Contributor Author

sibnick commented Mar 20, 2017

I added links to netbsd headers in each file and remove one file which is not related to netbsd.

Copy link
Contributor

@joakim-noah joakim-noah left a comment

Choose a reason for hiding this comment

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

Downloaded and diffed this against the FreeBSD directory, looks pretty much the same with some tweaks. Try diffing it against the latest FreeBSD version and making any updates needed, like the alias syntax I mentioned. If you're happy with it after that, we might as well merge, considering the other NetBSD changes are in and we can always modify this later.

int __dlfunc_dummy;
};

alias void function(__dlfunc_arg) dlfunc_t;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change this to the alias = syntax, as now done in the same FreeBSD module? Same with the __externC alias below.

private alias extern(C) int function(dl_phdr_info*, size_t, void *) @nogc dl_iterate_phdr_cb_ngc;
extern int dl_iterate_phdr(dl_iterate_phdr_cb __callback, void*__data);
extern int dl_iterate_phdr(dl_iterate_phdr_cb_ngc __callback, void*__data) @nogc;

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove blank line.

@sibnick sibnick force-pushed the netbsd_core_sys_netbsd branch from accddad to f7f2836 Compare March 27, 2017 08:34
@sibnick
Copy link
Contributor Author

sibnick commented Mar 27, 2017

I fixed issues (alias & empty line). I did not find anything new in current FreeBSD sources. I agree to merge this PR now. I will wait while LDC team merge current druntime master to their repository and after this I can refresh unit tests status (new LDC, new druntime, and new NetBSD 7.1 too) and may be send additional PRs.


version (NetBSD):
extern (C):
nothrow:
Copy link
Contributor

Choose a reason for hiding this comment

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

FreeBSD file has @nogc attribute here, missing in yours. Why not add that attribute to all the header files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, my fault - fixed

@sibnick sibnick force-pushed the netbsd_core_sys_netbsd branch from f7f2836 to 24bc730 Compare April 4, 2017 05:41
Copy link
Contributor

@joakim-noah joakim-noah left a comment

Choose a reason for hiding this comment

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

Would be better if all the files had the@nogc attribute, but not a big deal.

@joakim-noah
Copy link
Contributor

btw, it will take a while before these patches get to ldc, so let me know if you'd rather work with the beta 1.2 branch or master 1.3 branch and I will cherry-pick these commits for ldc earlier.

@joakim-noah
Copy link
Contributor

Pinging @klickverbot, maybe Kai can announce NetBSD support at DConf. ;)

Copy link
Contributor

@dnadlinger dnadlinger left a comment

Choose a reason for hiding this comment

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

This only continues what has been started already, so should be fine.

@dlang-bot dlang-bot merged commit 9cfde10 into dlang:master Apr 8, 2017
@sibnick
Copy link
Contributor Author

sibnick commented Apr 9, 2017

joakim-noah
I am not sure about ldc branches 1.2 vs 1.3. I suppose 1.3 branch is better - the probability of merge conflicts is lower

@joakim-noah
Copy link
Contributor

joakim-noah commented Apr 9, 2017

I've cherry-picked the three NetBSD druntime commits into ldc's master 1.3 branch. You will need to check out the latest druntime HEAD manually, until the submodule is updated.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants